• 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  * A shipment model contains a set of shipments which must be performed by a
26  * set of vehicles, while minimizing the overall cost, which is the sum of:
27  * * the cost of routing the vehicles (sum of cost per total time, cost per
28  *   travel time, and fixed cost over all vehicles).
29  * * the unperformed shipment penalties.
30  * * the cost of the global duration of the shipments
31  * </pre>
32  *
33  * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel}
34  */
35 public final class ShipmentModel extends com.google.protobuf.GeneratedMessageV3
36     implements
37     // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel)
38     ShipmentModelOrBuilder {
39   private static final long serialVersionUID = 0L;
40   // Use ShipmentModel.newBuilder() to construct.
ShipmentModel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)41   private ShipmentModel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
42     super(builder);
43   }
44 
ShipmentModel()45   private ShipmentModel() {
46     shipments_ = java.util.Collections.emptyList();
47     vehicles_ = java.util.Collections.emptyList();
48     durationDistanceMatrices_ = java.util.Collections.emptyList();
49     durationDistanceMatrixSrcTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
50     durationDistanceMatrixDstTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
51     transitionAttributes_ = java.util.Collections.emptyList();
52     shipmentTypeIncompatibilities_ = java.util.Collections.emptyList();
53     shipmentTypeRequirements_ = java.util.Collections.emptyList();
54     precedenceRules_ = java.util.Collections.emptyList();
55     breakRules_ = java.util.Collections.emptyList();
56   }
57 
58   @java.lang.Override
59   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)60   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
61     return new ShipmentModel();
62   }
63 
64   @java.lang.Override
getUnknownFields()65   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
66     return this.unknownFields;
67   }
68 
getDescriptor()69   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
70     return com.google.cloud.optimization.v1.FleetRoutingProto
71         .internal_static_google_cloud_optimization_v1_ShipmentModel_descriptor;
72   }
73 
74   @java.lang.Override
75   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()76       internalGetFieldAccessorTable() {
77     return com.google.cloud.optimization.v1.FleetRoutingProto
78         .internal_static_google_cloud_optimization_v1_ShipmentModel_fieldAccessorTable
79         .ensureFieldAccessorsInitialized(
80             com.google.cloud.optimization.v1.ShipmentModel.class,
81             com.google.cloud.optimization.v1.ShipmentModel.Builder.class);
82   }
83 
84   public interface DurationDistanceMatrixOrBuilder
85       extends
86       // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
87       com.google.protobuf.MessageOrBuilder {
88 
89     /**
90      *
91      *
92      * <pre>
93      * Specifies the rows of the duration and distance matrix. It must have as
94      * many elements as
95      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
96      * </pre>
97      *
98      * <code>
99      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
100      * </code>
101      */
102     java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
getRowsList()103         getRowsList();
104     /**
105      *
106      *
107      * <pre>
108      * Specifies the rows of the duration and distance matrix. It must have as
109      * many elements as
110      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
111      * </pre>
112      *
113      * <code>
114      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
115      * </code>
116      */
getRows(int index)117     com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row getRows(int index);
118     /**
119      *
120      *
121      * <pre>
122      * Specifies the rows of the duration and distance matrix. It must have as
123      * many elements as
124      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
125      * </pre>
126      *
127      * <code>
128      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
129      * </code>
130      */
getRowsCount()131     int getRowsCount();
132     /**
133      *
134      *
135      * <pre>
136      * Specifies the rows of the duration and distance matrix. It must have as
137      * many elements as
138      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
139      * </pre>
140      *
141      * <code>
142      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
143      * </code>
144      */
145     java.util.List<
146             ? extends
147                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder>
getRowsOrBuilderList()148         getRowsOrBuilderList();
149     /**
150      *
151      *
152      * <pre>
153      * Specifies the rows of the duration and distance matrix. It must have as
154      * many elements as
155      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
156      * </pre>
157      *
158      * <code>
159      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
160      * </code>
161      */
162     com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder
getRowsOrBuilder(int index)163         getRowsOrBuilder(int index);
164 
165     /**
166      *
167      *
168      * <pre>
169      * Tag defining to which vehicles this duration and distance matrix applies.
170      * If empty, this applies to all vehicles, and there can only be a single
171      * matrix.
172      * Each vehicle start must match exactly one matrix, i.e. exactly one of
173      * their `start_tags` field must match the `vehicle_start_tag` of a matrix
174      * (and of that matrix only).
175      * All matrices must have a different `vehicle_start_tag`.
176      * </pre>
177      *
178      * <code>string vehicle_start_tag = 2;</code>
179      *
180      * @return The vehicleStartTag.
181      */
getVehicleStartTag()182     java.lang.String getVehicleStartTag();
183     /**
184      *
185      *
186      * <pre>
187      * Tag defining to which vehicles this duration and distance matrix applies.
188      * If empty, this applies to all vehicles, and there can only be a single
189      * matrix.
190      * Each vehicle start must match exactly one matrix, i.e. exactly one of
191      * their `start_tags` field must match the `vehicle_start_tag` of a matrix
192      * (and of that matrix only).
193      * All matrices must have a different `vehicle_start_tag`.
194      * </pre>
195      *
196      * <code>string vehicle_start_tag = 2;</code>
197      *
198      * @return The bytes for vehicleStartTag.
199      */
getVehicleStartTagBytes()200     com.google.protobuf.ByteString getVehicleStartTagBytes();
201   }
202   /**
203    *
204    *
205    * <pre>
206    * Specifies a duration and distance matrix from visit and vehicle start
207    * locations to visit and vehicle end locations.
208    * </pre>
209    *
210    * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix}
211    */
212   public static final class DurationDistanceMatrix extends com.google.protobuf.GeneratedMessageV3
213       implements
214       // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
215       DurationDistanceMatrixOrBuilder {
216     private static final long serialVersionUID = 0L;
217     // Use DurationDistanceMatrix.newBuilder() to construct.
DurationDistanceMatrix(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)218     private DurationDistanceMatrix(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
219       super(builder);
220     }
221 
DurationDistanceMatrix()222     private DurationDistanceMatrix() {
223       rows_ = java.util.Collections.emptyList();
224       vehicleStartTag_ = "";
225     }
226 
227     @java.lang.Override
228     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)229     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
230       return new DurationDistanceMatrix();
231     }
232 
233     @java.lang.Override
getUnknownFields()234     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
235       return this.unknownFields;
236     }
237 
getDescriptor()238     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
239       return com.google.cloud.optimization.v1.FleetRoutingProto
240           .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_descriptor;
241     }
242 
243     @java.lang.Override
244     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()245         internalGetFieldAccessorTable() {
246       return com.google.cloud.optimization.v1.FleetRoutingProto
247           .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_fieldAccessorTable
248           .ensureFieldAccessorsInitialized(
249               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.class,
250               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder.class);
251     }
252 
253     public interface RowOrBuilder
254         extends
255         // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
256         com.google.protobuf.MessageOrBuilder {
257 
258       /**
259        *
260        *
261        * <pre>
262        * Duration values for a given row. It must have as many elements as
263        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
264        * </pre>
265        *
266        * <code>repeated .google.protobuf.Duration durations = 1;</code>
267        */
getDurationsList()268       java.util.List<com.google.protobuf.Duration> getDurationsList();
269       /**
270        *
271        *
272        * <pre>
273        * Duration values for a given row. It must have as many elements as
274        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
275        * </pre>
276        *
277        * <code>repeated .google.protobuf.Duration durations = 1;</code>
278        */
getDurations(int index)279       com.google.protobuf.Duration getDurations(int index);
280       /**
281        *
282        *
283        * <pre>
284        * Duration values for a given row. It must have as many elements as
285        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
286        * </pre>
287        *
288        * <code>repeated .google.protobuf.Duration durations = 1;</code>
289        */
getDurationsCount()290       int getDurationsCount();
291       /**
292        *
293        *
294        * <pre>
295        * Duration values for a given row. It must have as many elements as
296        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
297        * </pre>
298        *
299        * <code>repeated .google.protobuf.Duration durations = 1;</code>
300        */
getDurationsOrBuilderList()301       java.util.List<? extends com.google.protobuf.DurationOrBuilder> getDurationsOrBuilderList();
302       /**
303        *
304        *
305        * <pre>
306        * Duration values for a given row. It must have as many elements as
307        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
308        * </pre>
309        *
310        * <code>repeated .google.protobuf.Duration durations = 1;</code>
311        */
getDurationsOrBuilder(int index)312       com.google.protobuf.DurationOrBuilder getDurationsOrBuilder(int index);
313 
314       /**
315        *
316        *
317        * <pre>
318        * Distance values for a given row. If no costs or constraints refer to
319        * distances in the model, this can be left empty; otherwise it must have
320        * as many elements as `durations`.
321        * </pre>
322        *
323        * <code>repeated double meters = 2;</code>
324        *
325        * @return A list containing the meters.
326        */
getMetersList()327       java.util.List<java.lang.Double> getMetersList();
328       /**
329        *
330        *
331        * <pre>
332        * Distance values for a given row. If no costs or constraints refer to
333        * distances in the model, this can be left empty; otherwise it must have
334        * as many elements as `durations`.
335        * </pre>
336        *
337        * <code>repeated double meters = 2;</code>
338        *
339        * @return The count of meters.
340        */
getMetersCount()341       int getMetersCount();
342       /**
343        *
344        *
345        * <pre>
346        * Distance values for a given row. If no costs or constraints refer to
347        * distances in the model, this can be left empty; otherwise it must have
348        * as many elements as `durations`.
349        * </pre>
350        *
351        * <code>repeated double meters = 2;</code>
352        *
353        * @param index The index of the element to return.
354        * @return The meters at the given index.
355        */
getMeters(int index)356       double getMeters(int index);
357     }
358     /**
359      *
360      *
361      * <pre>
362      * Specifies a row of the duration and distance matrix.
363      * </pre>
364      *
365      * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row}
366      */
367     public static final class Row extends com.google.protobuf.GeneratedMessageV3
368         implements
369         // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
370         RowOrBuilder {
371       private static final long serialVersionUID = 0L;
372       // Use Row.newBuilder() to construct.
Row(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)373       private Row(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
374         super(builder);
375       }
376 
Row()377       private Row() {
378         durations_ = java.util.Collections.emptyList();
379         meters_ = emptyDoubleList();
380       }
381 
382       @java.lang.Override
383       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)384       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
385         return new Row();
386       }
387 
388       @java.lang.Override
getUnknownFields()389       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
390         return this.unknownFields;
391       }
392 
getDescriptor()393       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
394         return com.google.cloud.optimization.v1.FleetRoutingProto
395             .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_Row_descriptor;
396       }
397 
398       @java.lang.Override
399       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()400           internalGetFieldAccessorTable() {
401         return com.google.cloud.optimization.v1.FleetRoutingProto
402             .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_Row_fieldAccessorTable
403             .ensureFieldAccessorsInitialized(
404                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.class,
405                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
406                     .class);
407       }
408 
409       public static final int DURATIONS_FIELD_NUMBER = 1;
410 
411       @SuppressWarnings("serial")
412       private java.util.List<com.google.protobuf.Duration> durations_;
413       /**
414        *
415        *
416        * <pre>
417        * Duration values for a given row. It must have as many elements as
418        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
419        * </pre>
420        *
421        * <code>repeated .google.protobuf.Duration durations = 1;</code>
422        */
423       @java.lang.Override
getDurationsList()424       public java.util.List<com.google.protobuf.Duration> getDurationsList() {
425         return durations_;
426       }
427       /**
428        *
429        *
430        * <pre>
431        * Duration values for a given row. It must have as many elements as
432        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
433        * </pre>
434        *
435        * <code>repeated .google.protobuf.Duration durations = 1;</code>
436        */
437       @java.lang.Override
438       public java.util.List<? extends com.google.protobuf.DurationOrBuilder>
getDurationsOrBuilderList()439           getDurationsOrBuilderList() {
440         return durations_;
441       }
442       /**
443        *
444        *
445        * <pre>
446        * Duration values for a given row. It must have as many elements as
447        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
448        * </pre>
449        *
450        * <code>repeated .google.protobuf.Duration durations = 1;</code>
451        */
452       @java.lang.Override
getDurationsCount()453       public int getDurationsCount() {
454         return durations_.size();
455       }
456       /**
457        *
458        *
459        * <pre>
460        * Duration values for a given row. It must have as many elements as
461        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
462        * </pre>
463        *
464        * <code>repeated .google.protobuf.Duration durations = 1;</code>
465        */
466       @java.lang.Override
getDurations(int index)467       public com.google.protobuf.Duration getDurations(int index) {
468         return durations_.get(index);
469       }
470       /**
471        *
472        *
473        * <pre>
474        * Duration values for a given row. It must have as many elements as
475        * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
476        * </pre>
477        *
478        * <code>repeated .google.protobuf.Duration durations = 1;</code>
479        */
480       @java.lang.Override
getDurationsOrBuilder(int index)481       public com.google.protobuf.DurationOrBuilder getDurationsOrBuilder(int index) {
482         return durations_.get(index);
483       }
484 
485       public static final int METERS_FIELD_NUMBER = 2;
486 
487       @SuppressWarnings("serial")
488       private com.google.protobuf.Internal.DoubleList meters_;
489       /**
490        *
491        *
492        * <pre>
493        * Distance values for a given row. If no costs or constraints refer to
494        * distances in the model, this can be left empty; otherwise it must have
495        * as many elements as `durations`.
496        * </pre>
497        *
498        * <code>repeated double meters = 2;</code>
499        *
500        * @return A list containing the meters.
501        */
502       @java.lang.Override
getMetersList()503       public java.util.List<java.lang.Double> getMetersList() {
504         return meters_;
505       }
506       /**
507        *
508        *
509        * <pre>
510        * Distance values for a given row. If no costs or constraints refer to
511        * distances in the model, this can be left empty; otherwise it must have
512        * as many elements as `durations`.
513        * </pre>
514        *
515        * <code>repeated double meters = 2;</code>
516        *
517        * @return The count of meters.
518        */
getMetersCount()519       public int getMetersCount() {
520         return meters_.size();
521       }
522       /**
523        *
524        *
525        * <pre>
526        * Distance values for a given row. If no costs or constraints refer to
527        * distances in the model, this can be left empty; otherwise it must have
528        * as many elements as `durations`.
529        * </pre>
530        *
531        * <code>repeated double meters = 2;</code>
532        *
533        * @param index The index of the element to return.
534        * @return The meters at the given index.
535        */
getMeters(int index)536       public double getMeters(int index) {
537         return meters_.getDouble(index);
538       }
539 
540       private int metersMemoizedSerializedSize = -1;
541 
542       private byte memoizedIsInitialized = -1;
543 
544       @java.lang.Override
isInitialized()545       public final boolean isInitialized() {
546         byte isInitialized = memoizedIsInitialized;
547         if (isInitialized == 1) return true;
548         if (isInitialized == 0) return false;
549 
550         memoizedIsInitialized = 1;
551         return true;
552       }
553 
554       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)555       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
556         getSerializedSize();
557         for (int i = 0; i < durations_.size(); i++) {
558           output.writeMessage(1, durations_.get(i));
559         }
560         if (getMetersList().size() > 0) {
561           output.writeUInt32NoTag(18);
562           output.writeUInt32NoTag(metersMemoizedSerializedSize);
563         }
564         for (int i = 0; i < meters_.size(); i++) {
565           output.writeDoubleNoTag(meters_.getDouble(i));
566         }
567         getUnknownFields().writeTo(output);
568       }
569 
570       @java.lang.Override
getSerializedSize()571       public int getSerializedSize() {
572         int size = memoizedSize;
573         if (size != -1) return size;
574 
575         size = 0;
576         for (int i = 0; i < durations_.size(); i++) {
577           size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, durations_.get(i));
578         }
579         {
580           int dataSize = 0;
581           dataSize = 8 * getMetersList().size();
582           size += dataSize;
583           if (!getMetersList().isEmpty()) {
584             size += 1;
585             size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
586           }
587           metersMemoizedSerializedSize = dataSize;
588         }
589         size += getUnknownFields().getSerializedSize();
590         memoizedSize = size;
591         return size;
592       }
593 
594       @java.lang.Override
equals(final java.lang.Object obj)595       public boolean equals(final java.lang.Object obj) {
596         if (obj == this) {
597           return true;
598         }
599         if (!(obj
600             instanceof com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)) {
601           return super.equals(obj);
602         }
603         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row other =
604             (com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row) obj;
605 
606         if (!getDurationsList().equals(other.getDurationsList())) return false;
607         if (!getMetersList().equals(other.getMetersList())) return false;
608         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
609         return true;
610       }
611 
612       @java.lang.Override
hashCode()613       public int hashCode() {
614         if (memoizedHashCode != 0) {
615           return memoizedHashCode;
616         }
617         int hash = 41;
618         hash = (19 * hash) + getDescriptor().hashCode();
619         if (getDurationsCount() > 0) {
620           hash = (37 * hash) + DURATIONS_FIELD_NUMBER;
621           hash = (53 * hash) + getDurationsList().hashCode();
622         }
623         if (getMetersCount() > 0) {
624           hash = (37 * hash) + METERS_FIELD_NUMBER;
625           hash = (53 * hash) + getMetersList().hashCode();
626         }
627         hash = (29 * hash) + getUnknownFields().hashCode();
628         memoizedHashCode = hash;
629         return hash;
630       }
631 
632       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(java.nio.ByteBuffer data)633           parseFrom(java.nio.ByteBuffer data)
634               throws com.google.protobuf.InvalidProtocolBufferException {
635         return PARSER.parseFrom(data);
636       }
637 
638       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)639           parseFrom(
640               java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
641               throws com.google.protobuf.InvalidProtocolBufferException {
642         return PARSER.parseFrom(data, extensionRegistry);
643       }
644 
645       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(com.google.protobuf.ByteString data)646           parseFrom(com.google.protobuf.ByteString data)
647               throws com.google.protobuf.InvalidProtocolBufferException {
648         return PARSER.parseFrom(data);
649       }
650 
651       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)652           parseFrom(
653               com.google.protobuf.ByteString data,
654               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
655               throws com.google.protobuf.InvalidProtocolBufferException {
656         return PARSER.parseFrom(data, extensionRegistry);
657       }
658 
659       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(byte[] data)660           parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
661         return PARSER.parseFrom(data);
662       }
663 
664       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)665           parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
666               throws com.google.protobuf.InvalidProtocolBufferException {
667         return PARSER.parseFrom(data, extensionRegistry);
668       }
669 
670       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(java.io.InputStream input)671           parseFrom(java.io.InputStream input) throws java.io.IOException {
672         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
673       }
674 
675       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)676           parseFrom(
677               java.io.InputStream input,
678               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
679               throws java.io.IOException {
680         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
681             PARSER, input, extensionRegistry);
682       }
683 
684       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseDelimitedFrom(java.io.InputStream input)685           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
686         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
687       }
688 
689       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)690           parseDelimitedFrom(
691               java.io.InputStream input,
692               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
693               throws java.io.IOException {
694         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
695             PARSER, input, extensionRegistry);
696       }
697 
698       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom(com.google.protobuf.CodedInputStream input)699           parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
700         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
701       }
702 
703       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)704           parseFrom(
705               com.google.protobuf.CodedInputStream input,
706               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
707               throws java.io.IOException {
708         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
709             PARSER, input, extensionRegistry);
710       }
711 
712       @java.lang.Override
newBuilderForType()713       public Builder newBuilderForType() {
714         return newBuilder();
715       }
716 
newBuilder()717       public static Builder newBuilder() {
718         return DEFAULT_INSTANCE.toBuilder();
719       }
720 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row prototype)721       public static Builder newBuilder(
722           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row prototype) {
723         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
724       }
725 
726       @java.lang.Override
toBuilder()727       public Builder toBuilder() {
728         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
729       }
730 
731       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)732       protected Builder newBuilderForType(
733           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
734         Builder builder = new Builder(parent);
735         return builder;
736       }
737       /**
738        *
739        *
740        * <pre>
741        * Specifies a row of the duration and distance matrix.
742        * </pre>
743        *
744        * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row}
745        */
746       public static final class Builder
747           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
748           implements
749           // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
750           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder {
getDescriptor()751         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
752           return com.google.cloud.optimization.v1.FleetRoutingProto
753               .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_Row_descriptor;
754         }
755 
756         @java.lang.Override
757         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()758             internalGetFieldAccessorTable() {
759           return com.google.cloud.optimization.v1.FleetRoutingProto
760               .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_Row_fieldAccessorTable
761               .ensureFieldAccessorsInitialized(
762                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.class,
763                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
764                       .class);
765         }
766 
767         // Construct using
768         // com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.newBuilder()
Builder()769         private Builder() {}
770 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)771         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
772           super(parent);
773         }
774 
775         @java.lang.Override
clear()776         public Builder clear() {
777           super.clear();
778           bitField0_ = 0;
779           if (durationsBuilder_ == null) {
780             durations_ = java.util.Collections.emptyList();
781           } else {
782             durations_ = null;
783             durationsBuilder_.clear();
784           }
785           bitField0_ = (bitField0_ & ~0x00000001);
786           meters_ = emptyDoubleList();
787           return this;
788         }
789 
790         @java.lang.Override
getDescriptorForType()791         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
792           return com.google.cloud.optimization.v1.FleetRoutingProto
793               .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_Row_descriptor;
794         }
795 
796         @java.lang.Override
797         public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
getDefaultInstanceForType()798             getDefaultInstanceForType() {
799           return com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
800               .getDefaultInstance();
801         }
802 
803         @java.lang.Override
build()804         public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row build() {
805           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result =
806               buildPartial();
807           if (!result.isInitialized()) {
808             throw newUninitializedMessageException(result);
809           }
810           return result;
811         }
812 
813         @java.lang.Override
814         public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
buildPartial()815             buildPartial() {
816           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result =
817               new com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row(this);
818           buildPartialRepeatedFields(result);
819           if (bitField0_ != 0) {
820             buildPartial0(result);
821           }
822           onBuilt();
823           return result;
824         }
825 
buildPartialRepeatedFields( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result)826         private void buildPartialRepeatedFields(
827             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result) {
828           if (durationsBuilder_ == null) {
829             if (((bitField0_ & 0x00000001) != 0)) {
830               durations_ = java.util.Collections.unmodifiableList(durations_);
831               bitField0_ = (bitField0_ & ~0x00000001);
832             }
833             result.durations_ = durations_;
834           } else {
835             result.durations_ = durationsBuilder_.build();
836           }
837           if (((bitField0_ & 0x00000002) != 0)) {
838             meters_.makeImmutable();
839             bitField0_ = (bitField0_ & ~0x00000002);
840           }
841           result.meters_ = meters_;
842         }
843 
buildPartial0( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result)844         private void buildPartial0(
845             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row result) {
846           int from_bitField0_ = bitField0_;
847         }
848 
849         @java.lang.Override
clone()850         public Builder clone() {
851           return super.clone();
852         }
853 
854         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)855         public Builder setField(
856             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
857           return super.setField(field, value);
858         }
859 
860         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)861         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
862           return super.clearField(field);
863         }
864 
865         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)866         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
867           return super.clearOneof(oneof);
868         }
869 
870         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)871         public Builder setRepeatedField(
872             com.google.protobuf.Descriptors.FieldDescriptor field,
873             int index,
874             java.lang.Object value) {
875           return super.setRepeatedField(field, index, value);
876         }
877 
878         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)879         public Builder addRepeatedField(
880             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
881           return super.addRepeatedField(field, value);
882         }
883 
884         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)885         public Builder mergeFrom(com.google.protobuf.Message other) {
886           if (other
887               instanceof
888               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row) {
889             return mergeFrom(
890                 (com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row) other);
891           } else {
892             super.mergeFrom(other);
893             return this;
894           }
895         }
896 
mergeFrom( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row other)897         public Builder mergeFrom(
898             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row other) {
899           if (other
900               == com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
901                   .getDefaultInstance()) return this;
902           if (durationsBuilder_ == null) {
903             if (!other.durations_.isEmpty()) {
904               if (durations_.isEmpty()) {
905                 durations_ = other.durations_;
906                 bitField0_ = (bitField0_ & ~0x00000001);
907               } else {
908                 ensureDurationsIsMutable();
909                 durations_.addAll(other.durations_);
910               }
911               onChanged();
912             }
913           } else {
914             if (!other.durations_.isEmpty()) {
915               if (durationsBuilder_.isEmpty()) {
916                 durationsBuilder_.dispose();
917                 durationsBuilder_ = null;
918                 durations_ = other.durations_;
919                 bitField0_ = (bitField0_ & ~0x00000001);
920                 durationsBuilder_ =
921                     com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
922                         ? getDurationsFieldBuilder()
923                         : null;
924               } else {
925                 durationsBuilder_.addAllMessages(other.durations_);
926               }
927             }
928           }
929           if (!other.meters_.isEmpty()) {
930             if (meters_.isEmpty()) {
931               meters_ = other.meters_;
932               bitField0_ = (bitField0_ & ~0x00000002);
933             } else {
934               ensureMetersIsMutable();
935               meters_.addAll(other.meters_);
936             }
937             onChanged();
938           }
939           this.mergeUnknownFields(other.getUnknownFields());
940           onChanged();
941           return this;
942         }
943 
944         @java.lang.Override
isInitialized()945         public final boolean isInitialized() {
946           return true;
947         }
948 
949         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)950         public Builder mergeFrom(
951             com.google.protobuf.CodedInputStream input,
952             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
953             throws java.io.IOException {
954           if (extensionRegistry == null) {
955             throw new java.lang.NullPointerException();
956           }
957           try {
958             boolean done = false;
959             while (!done) {
960               int tag = input.readTag();
961               switch (tag) {
962                 case 0:
963                   done = true;
964                   break;
965                 case 10:
966                   {
967                     com.google.protobuf.Duration m =
968                         input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
969                     if (durationsBuilder_ == null) {
970                       ensureDurationsIsMutable();
971                       durations_.add(m);
972                     } else {
973                       durationsBuilder_.addMessage(m);
974                     }
975                     break;
976                   } // case 10
977                 case 17:
978                   {
979                     double v = input.readDouble();
980                     ensureMetersIsMutable();
981                     meters_.addDouble(v);
982                     break;
983                   } // case 17
984                 case 18:
985                   {
986                     int length = input.readRawVarint32();
987                     int limit = input.pushLimit(length);
988                     ensureMetersIsMutable();
989                     while (input.getBytesUntilLimit() > 0) {
990                       meters_.addDouble(input.readDouble());
991                     }
992                     input.popLimit(limit);
993                     break;
994                   } // case 18
995                 default:
996                   {
997                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
998                       done = true; // was an endgroup tag
999                     }
1000                     break;
1001                   } // default:
1002               } // switch (tag)
1003             } // while (!done)
1004           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1005             throw e.unwrapIOException();
1006           } finally {
1007             onChanged();
1008           } // finally
1009           return this;
1010         }
1011 
1012         private int bitField0_;
1013 
1014         private java.util.List<com.google.protobuf.Duration> durations_ =
1015             java.util.Collections.emptyList();
1016 
ensureDurationsIsMutable()1017         private void ensureDurationsIsMutable() {
1018           if (!((bitField0_ & 0x00000001) != 0)) {
1019             durations_ = new java.util.ArrayList<com.google.protobuf.Duration>(durations_);
1020             bitField0_ |= 0x00000001;
1021           }
1022         }
1023 
1024         private com.google.protobuf.RepeatedFieldBuilderV3<
1025                 com.google.protobuf.Duration,
1026                 com.google.protobuf.Duration.Builder,
1027                 com.google.protobuf.DurationOrBuilder>
1028             durationsBuilder_;
1029 
1030         /**
1031          *
1032          *
1033          * <pre>
1034          * Duration values for a given row. It must have as many elements as
1035          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1036          * </pre>
1037          *
1038          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1039          */
getDurationsList()1040         public java.util.List<com.google.protobuf.Duration> getDurationsList() {
1041           if (durationsBuilder_ == null) {
1042             return java.util.Collections.unmodifiableList(durations_);
1043           } else {
1044             return durationsBuilder_.getMessageList();
1045           }
1046         }
1047         /**
1048          *
1049          *
1050          * <pre>
1051          * Duration values for a given row. It must have as many elements as
1052          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1053          * </pre>
1054          *
1055          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1056          */
getDurationsCount()1057         public int getDurationsCount() {
1058           if (durationsBuilder_ == null) {
1059             return durations_.size();
1060           } else {
1061             return durationsBuilder_.getCount();
1062           }
1063         }
1064         /**
1065          *
1066          *
1067          * <pre>
1068          * Duration values for a given row. It must have as many elements as
1069          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1070          * </pre>
1071          *
1072          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1073          */
getDurations(int index)1074         public com.google.protobuf.Duration getDurations(int index) {
1075           if (durationsBuilder_ == null) {
1076             return durations_.get(index);
1077           } else {
1078             return durationsBuilder_.getMessage(index);
1079           }
1080         }
1081         /**
1082          *
1083          *
1084          * <pre>
1085          * Duration values for a given row. It must have as many elements as
1086          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1087          * </pre>
1088          *
1089          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1090          */
setDurations(int index, com.google.protobuf.Duration value)1091         public Builder setDurations(int index, com.google.protobuf.Duration value) {
1092           if (durationsBuilder_ == null) {
1093             if (value == null) {
1094               throw new NullPointerException();
1095             }
1096             ensureDurationsIsMutable();
1097             durations_.set(index, value);
1098             onChanged();
1099           } else {
1100             durationsBuilder_.setMessage(index, value);
1101           }
1102           return this;
1103         }
1104         /**
1105          *
1106          *
1107          * <pre>
1108          * Duration values for a given row. It must have as many elements as
1109          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1110          * </pre>
1111          *
1112          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1113          */
setDurations( int index, com.google.protobuf.Duration.Builder builderForValue)1114         public Builder setDurations(
1115             int index, com.google.protobuf.Duration.Builder builderForValue) {
1116           if (durationsBuilder_ == null) {
1117             ensureDurationsIsMutable();
1118             durations_.set(index, builderForValue.build());
1119             onChanged();
1120           } else {
1121             durationsBuilder_.setMessage(index, builderForValue.build());
1122           }
1123           return this;
1124         }
1125         /**
1126          *
1127          *
1128          * <pre>
1129          * Duration values for a given row. It must have as many elements as
1130          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1131          * </pre>
1132          *
1133          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1134          */
addDurations(com.google.protobuf.Duration value)1135         public Builder addDurations(com.google.protobuf.Duration value) {
1136           if (durationsBuilder_ == null) {
1137             if (value == null) {
1138               throw new NullPointerException();
1139             }
1140             ensureDurationsIsMutable();
1141             durations_.add(value);
1142             onChanged();
1143           } else {
1144             durationsBuilder_.addMessage(value);
1145           }
1146           return this;
1147         }
1148         /**
1149          *
1150          *
1151          * <pre>
1152          * Duration values for a given row. It must have as many elements as
1153          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1154          * </pre>
1155          *
1156          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1157          */
addDurations(int index, com.google.protobuf.Duration value)1158         public Builder addDurations(int index, com.google.protobuf.Duration value) {
1159           if (durationsBuilder_ == null) {
1160             if (value == null) {
1161               throw new NullPointerException();
1162             }
1163             ensureDurationsIsMutable();
1164             durations_.add(index, value);
1165             onChanged();
1166           } else {
1167             durationsBuilder_.addMessage(index, value);
1168           }
1169           return this;
1170         }
1171         /**
1172          *
1173          *
1174          * <pre>
1175          * Duration values for a given row. It must have as many elements as
1176          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1177          * </pre>
1178          *
1179          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1180          */
addDurations(com.google.protobuf.Duration.Builder builderForValue)1181         public Builder addDurations(com.google.protobuf.Duration.Builder builderForValue) {
1182           if (durationsBuilder_ == null) {
1183             ensureDurationsIsMutable();
1184             durations_.add(builderForValue.build());
1185             onChanged();
1186           } else {
1187             durationsBuilder_.addMessage(builderForValue.build());
1188           }
1189           return this;
1190         }
1191         /**
1192          *
1193          *
1194          * <pre>
1195          * Duration values for a given row. It must have as many elements as
1196          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1197          * </pre>
1198          *
1199          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1200          */
addDurations( int index, com.google.protobuf.Duration.Builder builderForValue)1201         public Builder addDurations(
1202             int index, com.google.protobuf.Duration.Builder builderForValue) {
1203           if (durationsBuilder_ == null) {
1204             ensureDurationsIsMutable();
1205             durations_.add(index, builderForValue.build());
1206             onChanged();
1207           } else {
1208             durationsBuilder_.addMessage(index, builderForValue.build());
1209           }
1210           return this;
1211         }
1212         /**
1213          *
1214          *
1215          * <pre>
1216          * Duration values for a given row. It must have as many elements as
1217          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1218          * </pre>
1219          *
1220          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1221          */
addAllDurations( java.lang.Iterable<? extends com.google.protobuf.Duration> values)1222         public Builder addAllDurations(
1223             java.lang.Iterable<? extends com.google.protobuf.Duration> values) {
1224           if (durationsBuilder_ == null) {
1225             ensureDurationsIsMutable();
1226             com.google.protobuf.AbstractMessageLite.Builder.addAll(values, durations_);
1227             onChanged();
1228           } else {
1229             durationsBuilder_.addAllMessages(values);
1230           }
1231           return this;
1232         }
1233         /**
1234          *
1235          *
1236          * <pre>
1237          * Duration values for a given row. It must have as many elements as
1238          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1239          * </pre>
1240          *
1241          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1242          */
clearDurations()1243         public Builder clearDurations() {
1244           if (durationsBuilder_ == null) {
1245             durations_ = java.util.Collections.emptyList();
1246             bitField0_ = (bitField0_ & ~0x00000001);
1247             onChanged();
1248           } else {
1249             durationsBuilder_.clear();
1250           }
1251           return this;
1252         }
1253         /**
1254          *
1255          *
1256          * <pre>
1257          * Duration values for a given row. It must have as many elements as
1258          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1259          * </pre>
1260          *
1261          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1262          */
removeDurations(int index)1263         public Builder removeDurations(int index) {
1264           if (durationsBuilder_ == null) {
1265             ensureDurationsIsMutable();
1266             durations_.remove(index);
1267             onChanged();
1268           } else {
1269             durationsBuilder_.remove(index);
1270           }
1271           return this;
1272         }
1273         /**
1274          *
1275          *
1276          * <pre>
1277          * Duration values for a given row. It must have as many elements as
1278          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1279          * </pre>
1280          *
1281          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1282          */
getDurationsBuilder(int index)1283         public com.google.protobuf.Duration.Builder getDurationsBuilder(int index) {
1284           return getDurationsFieldBuilder().getBuilder(index);
1285         }
1286         /**
1287          *
1288          *
1289          * <pre>
1290          * Duration values for a given row. It must have as many elements as
1291          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1292          * </pre>
1293          *
1294          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1295          */
getDurationsOrBuilder(int index)1296         public com.google.protobuf.DurationOrBuilder getDurationsOrBuilder(int index) {
1297           if (durationsBuilder_ == null) {
1298             return durations_.get(index);
1299           } else {
1300             return durationsBuilder_.getMessageOrBuilder(index);
1301           }
1302         }
1303         /**
1304          *
1305          *
1306          * <pre>
1307          * Duration values for a given row. It must have as many elements as
1308          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1309          * </pre>
1310          *
1311          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1312          */
1313         public java.util.List<? extends com.google.protobuf.DurationOrBuilder>
getDurationsOrBuilderList()1314             getDurationsOrBuilderList() {
1315           if (durationsBuilder_ != null) {
1316             return durationsBuilder_.getMessageOrBuilderList();
1317           } else {
1318             return java.util.Collections.unmodifiableList(durations_);
1319           }
1320         }
1321         /**
1322          *
1323          *
1324          * <pre>
1325          * Duration values for a given row. It must have as many elements as
1326          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1327          * </pre>
1328          *
1329          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1330          */
addDurationsBuilder()1331         public com.google.protobuf.Duration.Builder addDurationsBuilder() {
1332           return getDurationsFieldBuilder()
1333               .addBuilder(com.google.protobuf.Duration.getDefaultInstance());
1334         }
1335         /**
1336          *
1337          *
1338          * <pre>
1339          * Duration values for a given row. It must have as many elements as
1340          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1341          * </pre>
1342          *
1343          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1344          */
addDurationsBuilder(int index)1345         public com.google.protobuf.Duration.Builder addDurationsBuilder(int index) {
1346           return getDurationsFieldBuilder()
1347               .addBuilder(index, com.google.protobuf.Duration.getDefaultInstance());
1348         }
1349         /**
1350          *
1351          *
1352          * <pre>
1353          * Duration values for a given row. It must have as many elements as
1354          * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags].
1355          * </pre>
1356          *
1357          * <code>repeated .google.protobuf.Duration durations = 1;</code>
1358          */
getDurationsBuilderList()1359         public java.util.List<com.google.protobuf.Duration.Builder> getDurationsBuilderList() {
1360           return getDurationsFieldBuilder().getBuilderList();
1361         }
1362 
1363         private com.google.protobuf.RepeatedFieldBuilderV3<
1364                 com.google.protobuf.Duration,
1365                 com.google.protobuf.Duration.Builder,
1366                 com.google.protobuf.DurationOrBuilder>
getDurationsFieldBuilder()1367             getDurationsFieldBuilder() {
1368           if (durationsBuilder_ == null) {
1369             durationsBuilder_ =
1370                 new com.google.protobuf.RepeatedFieldBuilderV3<
1371                     com.google.protobuf.Duration,
1372                     com.google.protobuf.Duration.Builder,
1373                     com.google.protobuf.DurationOrBuilder>(
1374                     durations_,
1375                     ((bitField0_ & 0x00000001) != 0),
1376                     getParentForChildren(),
1377                     isClean());
1378             durations_ = null;
1379           }
1380           return durationsBuilder_;
1381         }
1382 
1383         private com.google.protobuf.Internal.DoubleList meters_ = emptyDoubleList();
1384 
ensureMetersIsMutable()1385         private void ensureMetersIsMutable() {
1386           if (!((bitField0_ & 0x00000002) != 0)) {
1387             meters_ = mutableCopy(meters_);
1388             bitField0_ |= 0x00000002;
1389           }
1390         }
1391         /**
1392          *
1393          *
1394          * <pre>
1395          * Distance values for a given row. If no costs or constraints refer to
1396          * distances in the model, this can be left empty; otherwise it must have
1397          * as many elements as `durations`.
1398          * </pre>
1399          *
1400          * <code>repeated double meters = 2;</code>
1401          *
1402          * @return A list containing the meters.
1403          */
getMetersList()1404         public java.util.List<java.lang.Double> getMetersList() {
1405           return ((bitField0_ & 0x00000002) != 0)
1406               ? java.util.Collections.unmodifiableList(meters_)
1407               : meters_;
1408         }
1409         /**
1410          *
1411          *
1412          * <pre>
1413          * Distance values for a given row. If no costs or constraints refer to
1414          * distances in the model, this can be left empty; otherwise it must have
1415          * as many elements as `durations`.
1416          * </pre>
1417          *
1418          * <code>repeated double meters = 2;</code>
1419          *
1420          * @return The count of meters.
1421          */
getMetersCount()1422         public int getMetersCount() {
1423           return meters_.size();
1424         }
1425         /**
1426          *
1427          *
1428          * <pre>
1429          * Distance values for a given row. If no costs or constraints refer to
1430          * distances in the model, this can be left empty; otherwise it must have
1431          * as many elements as `durations`.
1432          * </pre>
1433          *
1434          * <code>repeated double meters = 2;</code>
1435          *
1436          * @param index The index of the element to return.
1437          * @return The meters at the given index.
1438          */
getMeters(int index)1439         public double getMeters(int index) {
1440           return meters_.getDouble(index);
1441         }
1442         /**
1443          *
1444          *
1445          * <pre>
1446          * Distance values for a given row. If no costs or constraints refer to
1447          * distances in the model, this can be left empty; otherwise it must have
1448          * as many elements as `durations`.
1449          * </pre>
1450          *
1451          * <code>repeated double meters = 2;</code>
1452          *
1453          * @param index The index to set the value at.
1454          * @param value The meters to set.
1455          * @return This builder for chaining.
1456          */
setMeters(int index, double value)1457         public Builder setMeters(int index, double value) {
1458 
1459           ensureMetersIsMutable();
1460           meters_.setDouble(index, value);
1461           onChanged();
1462           return this;
1463         }
1464         /**
1465          *
1466          *
1467          * <pre>
1468          * Distance values for a given row. If no costs or constraints refer to
1469          * distances in the model, this can be left empty; otherwise it must have
1470          * as many elements as `durations`.
1471          * </pre>
1472          *
1473          * <code>repeated double meters = 2;</code>
1474          *
1475          * @param value The meters to add.
1476          * @return This builder for chaining.
1477          */
addMeters(double value)1478         public Builder addMeters(double value) {
1479 
1480           ensureMetersIsMutable();
1481           meters_.addDouble(value);
1482           onChanged();
1483           return this;
1484         }
1485         /**
1486          *
1487          *
1488          * <pre>
1489          * Distance values for a given row. If no costs or constraints refer to
1490          * distances in the model, this can be left empty; otherwise it must have
1491          * as many elements as `durations`.
1492          * </pre>
1493          *
1494          * <code>repeated double meters = 2;</code>
1495          *
1496          * @param values The meters to add.
1497          * @return This builder for chaining.
1498          */
addAllMeters(java.lang.Iterable<? extends java.lang.Double> values)1499         public Builder addAllMeters(java.lang.Iterable<? extends java.lang.Double> values) {
1500           ensureMetersIsMutable();
1501           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, meters_);
1502           onChanged();
1503           return this;
1504         }
1505         /**
1506          *
1507          *
1508          * <pre>
1509          * Distance values for a given row. If no costs or constraints refer to
1510          * distances in the model, this can be left empty; otherwise it must have
1511          * as many elements as `durations`.
1512          * </pre>
1513          *
1514          * <code>repeated double meters = 2;</code>
1515          *
1516          * @return This builder for chaining.
1517          */
clearMeters()1518         public Builder clearMeters() {
1519           meters_ = emptyDoubleList();
1520           bitField0_ = (bitField0_ & ~0x00000002);
1521           onChanged();
1522           return this;
1523         }
1524 
1525         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1526         public final Builder setUnknownFields(
1527             final com.google.protobuf.UnknownFieldSet unknownFields) {
1528           return super.setUnknownFields(unknownFields);
1529         }
1530 
1531         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1532         public final Builder mergeUnknownFields(
1533             final com.google.protobuf.UnknownFieldSet unknownFields) {
1534           return super.mergeUnknownFields(unknownFields);
1535         }
1536 
1537         // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
1538       }
1539 
1540       // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row)
1541       private static final com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
1542           DEFAULT_INSTANCE;
1543 
1544       static {
1545         DEFAULT_INSTANCE =
1546             new com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row();
1547       }
1548 
1549       public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
getDefaultInstance()1550           getDefaultInstance() {
1551         return DEFAULT_INSTANCE;
1552       }
1553 
1554       private static final com.google.protobuf.Parser<Row> PARSER =
1555           new com.google.protobuf.AbstractParser<Row>() {
1556             @java.lang.Override
1557             public Row parsePartialFrom(
1558                 com.google.protobuf.CodedInputStream input,
1559                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1560                 throws com.google.protobuf.InvalidProtocolBufferException {
1561               Builder builder = newBuilder();
1562               try {
1563                 builder.mergeFrom(input, extensionRegistry);
1564               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1565                 throw e.setUnfinishedMessage(builder.buildPartial());
1566               } catch (com.google.protobuf.UninitializedMessageException e) {
1567                 throw e.asInvalidProtocolBufferException()
1568                     .setUnfinishedMessage(builder.buildPartial());
1569               } catch (java.io.IOException e) {
1570                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1571                     .setUnfinishedMessage(builder.buildPartial());
1572               }
1573               return builder.buildPartial();
1574             }
1575           };
1576 
parser()1577       public static com.google.protobuf.Parser<Row> parser() {
1578         return PARSER;
1579       }
1580 
1581       @java.lang.Override
getParserForType()1582       public com.google.protobuf.Parser<Row> getParserForType() {
1583         return PARSER;
1584       }
1585 
1586       @java.lang.Override
1587       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
getDefaultInstanceForType()1588           getDefaultInstanceForType() {
1589         return DEFAULT_INSTANCE;
1590       }
1591     }
1592 
1593     public static final int ROWS_FIELD_NUMBER = 1;
1594 
1595     @SuppressWarnings("serial")
1596     private java.util.List<
1597             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
1598         rows_;
1599     /**
1600      *
1601      *
1602      * <pre>
1603      * Specifies the rows of the duration and distance matrix. It must have as
1604      * many elements as
1605      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
1606      * </pre>
1607      *
1608      * <code>
1609      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
1610      * </code>
1611      */
1612     @java.lang.Override
1613     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
getRowsList()1614         getRowsList() {
1615       return rows_;
1616     }
1617     /**
1618      *
1619      *
1620      * <pre>
1621      * Specifies the rows of the duration and distance matrix. It must have as
1622      * many elements as
1623      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
1624      * </pre>
1625      *
1626      * <code>
1627      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
1628      * </code>
1629      */
1630     @java.lang.Override
1631     public java.util.List<
1632             ? extends
1633                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder>
getRowsOrBuilderList()1634         getRowsOrBuilderList() {
1635       return rows_;
1636     }
1637     /**
1638      *
1639      *
1640      * <pre>
1641      * Specifies the rows of the duration and distance matrix. It must have as
1642      * many elements as
1643      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
1644      * </pre>
1645      *
1646      * <code>
1647      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
1648      * </code>
1649      */
1650     @java.lang.Override
getRowsCount()1651     public int getRowsCount() {
1652       return rows_.size();
1653     }
1654     /**
1655      *
1656      *
1657      * <pre>
1658      * Specifies the rows of the duration and distance matrix. It must have as
1659      * many elements as
1660      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
1661      * </pre>
1662      *
1663      * <code>
1664      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
1665      * </code>
1666      */
1667     @java.lang.Override
getRows( int index)1668     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row getRows(
1669         int index) {
1670       return rows_.get(index);
1671     }
1672     /**
1673      *
1674      *
1675      * <pre>
1676      * Specifies the rows of the duration and distance matrix. It must have as
1677      * many elements as
1678      * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
1679      * </pre>
1680      *
1681      * <code>
1682      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
1683      * </code>
1684      */
1685     @java.lang.Override
1686     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder
getRowsOrBuilder(int index)1687         getRowsOrBuilder(int index) {
1688       return rows_.get(index);
1689     }
1690 
1691     public static final int VEHICLE_START_TAG_FIELD_NUMBER = 2;
1692 
1693     @SuppressWarnings("serial")
1694     private volatile java.lang.Object vehicleStartTag_ = "";
1695     /**
1696      *
1697      *
1698      * <pre>
1699      * Tag defining to which vehicles this duration and distance matrix applies.
1700      * If empty, this applies to all vehicles, and there can only be a single
1701      * matrix.
1702      * Each vehicle start must match exactly one matrix, i.e. exactly one of
1703      * their `start_tags` field must match the `vehicle_start_tag` of a matrix
1704      * (and of that matrix only).
1705      * All matrices must have a different `vehicle_start_tag`.
1706      * </pre>
1707      *
1708      * <code>string vehicle_start_tag = 2;</code>
1709      *
1710      * @return The vehicleStartTag.
1711      */
1712     @java.lang.Override
getVehicleStartTag()1713     public java.lang.String getVehicleStartTag() {
1714       java.lang.Object ref = vehicleStartTag_;
1715       if (ref instanceof java.lang.String) {
1716         return (java.lang.String) ref;
1717       } else {
1718         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1719         java.lang.String s = bs.toStringUtf8();
1720         vehicleStartTag_ = s;
1721         return s;
1722       }
1723     }
1724     /**
1725      *
1726      *
1727      * <pre>
1728      * Tag defining to which vehicles this duration and distance matrix applies.
1729      * If empty, this applies to all vehicles, and there can only be a single
1730      * matrix.
1731      * Each vehicle start must match exactly one matrix, i.e. exactly one of
1732      * their `start_tags` field must match the `vehicle_start_tag` of a matrix
1733      * (and of that matrix only).
1734      * All matrices must have a different `vehicle_start_tag`.
1735      * </pre>
1736      *
1737      * <code>string vehicle_start_tag = 2;</code>
1738      *
1739      * @return The bytes for vehicleStartTag.
1740      */
1741     @java.lang.Override
getVehicleStartTagBytes()1742     public com.google.protobuf.ByteString getVehicleStartTagBytes() {
1743       java.lang.Object ref = vehicleStartTag_;
1744       if (ref instanceof java.lang.String) {
1745         com.google.protobuf.ByteString b =
1746             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1747         vehicleStartTag_ = b;
1748         return b;
1749       } else {
1750         return (com.google.protobuf.ByteString) ref;
1751       }
1752     }
1753 
1754     private byte memoizedIsInitialized = -1;
1755 
1756     @java.lang.Override
isInitialized()1757     public final boolean isInitialized() {
1758       byte isInitialized = memoizedIsInitialized;
1759       if (isInitialized == 1) return true;
1760       if (isInitialized == 0) return false;
1761 
1762       memoizedIsInitialized = 1;
1763       return true;
1764     }
1765 
1766     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1767     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1768       for (int i = 0; i < rows_.size(); i++) {
1769         output.writeMessage(1, rows_.get(i));
1770       }
1771       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleStartTag_)) {
1772         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vehicleStartTag_);
1773       }
1774       getUnknownFields().writeTo(output);
1775     }
1776 
1777     @java.lang.Override
getSerializedSize()1778     public int getSerializedSize() {
1779       int size = memoizedSize;
1780       if (size != -1) return size;
1781 
1782       size = 0;
1783       for (int i = 0; i < rows_.size(); i++) {
1784         size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rows_.get(i));
1785       }
1786       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vehicleStartTag_)) {
1787         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vehicleStartTag_);
1788       }
1789       size += getUnknownFields().getSerializedSize();
1790       memoizedSize = size;
1791       return size;
1792     }
1793 
1794     @java.lang.Override
equals(final java.lang.Object obj)1795     public boolean equals(final java.lang.Object obj) {
1796       if (obj == this) {
1797         return true;
1798       }
1799       if (!(obj instanceof com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)) {
1800         return super.equals(obj);
1801       }
1802       com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix other =
1803           (com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix) obj;
1804 
1805       if (!getRowsList().equals(other.getRowsList())) return false;
1806       if (!getVehicleStartTag().equals(other.getVehicleStartTag())) return false;
1807       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1808       return true;
1809     }
1810 
1811     @java.lang.Override
hashCode()1812     public int hashCode() {
1813       if (memoizedHashCode != 0) {
1814         return memoizedHashCode;
1815       }
1816       int hash = 41;
1817       hash = (19 * hash) + getDescriptor().hashCode();
1818       if (getRowsCount() > 0) {
1819         hash = (37 * hash) + ROWS_FIELD_NUMBER;
1820         hash = (53 * hash) + getRowsList().hashCode();
1821       }
1822       hash = (37 * hash) + VEHICLE_START_TAG_FIELD_NUMBER;
1823       hash = (53 * hash) + getVehicleStartTag().hashCode();
1824       hash = (29 * hash) + getUnknownFields().hashCode();
1825       memoizedHashCode = hash;
1826       return hash;
1827     }
1828 
parseFrom( java.nio.ByteBuffer data)1829     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1830         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
1831       return PARSER.parseFrom(data);
1832     }
1833 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1834     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1835         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1836         throws com.google.protobuf.InvalidProtocolBufferException {
1837       return PARSER.parseFrom(data, extensionRegistry);
1838     }
1839 
parseFrom( com.google.protobuf.ByteString data)1840     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1841         com.google.protobuf.ByteString data)
1842         throws com.google.protobuf.InvalidProtocolBufferException {
1843       return PARSER.parseFrom(data);
1844     }
1845 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1846     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1847         com.google.protobuf.ByteString data,
1848         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1849         throws com.google.protobuf.InvalidProtocolBufferException {
1850       return PARSER.parseFrom(data, extensionRegistry);
1851     }
1852 
parseFrom( byte[] data)1853     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1854         byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
1855       return PARSER.parseFrom(data);
1856     }
1857 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1858     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1859         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1860         throws com.google.protobuf.InvalidProtocolBufferException {
1861       return PARSER.parseFrom(data, extensionRegistry);
1862     }
1863 
parseFrom( java.io.InputStream input)1864     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1865         java.io.InputStream input) throws java.io.IOException {
1866       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1867     }
1868 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1869     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1870         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1871         throws java.io.IOException {
1872       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1873           PARSER, input, extensionRegistry);
1874     }
1875 
1876     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
parseDelimitedFrom(java.io.InputStream input)1877         parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
1878       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1879     }
1880 
1881     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1882         parseDelimitedFrom(
1883             java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1884             throws java.io.IOException {
1885       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1886           PARSER, input, extensionRegistry);
1887     }
1888 
parseFrom( com.google.protobuf.CodedInputStream input)1889     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1890         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1891       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1892     }
1893 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1894     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix parseFrom(
1895         com.google.protobuf.CodedInputStream input,
1896         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1897         throws java.io.IOException {
1898       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1899           PARSER, input, extensionRegistry);
1900     }
1901 
1902     @java.lang.Override
newBuilderForType()1903     public Builder newBuilderForType() {
1904       return newBuilder();
1905     }
1906 
newBuilder()1907     public static Builder newBuilder() {
1908       return DEFAULT_INSTANCE.toBuilder();
1909     }
1910 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix prototype)1911     public static Builder newBuilder(
1912         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix prototype) {
1913       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1914     }
1915 
1916     @java.lang.Override
toBuilder()1917     public Builder toBuilder() {
1918       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1919     }
1920 
1921     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1922     protected Builder newBuilderForType(
1923         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1924       Builder builder = new Builder(parent);
1925       return builder;
1926     }
1927     /**
1928      *
1929      *
1930      * <pre>
1931      * Specifies a duration and distance matrix from visit and vehicle start
1932      * locations to visit and vehicle end locations.
1933      * </pre>
1934      *
1935      * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix}
1936      */
1937     public static final class Builder
1938         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1939         implements
1940         // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
1941         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder {
getDescriptor()1942       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1943         return com.google.cloud.optimization.v1.FleetRoutingProto
1944             .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_descriptor;
1945       }
1946 
1947       @java.lang.Override
1948       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1949           internalGetFieldAccessorTable() {
1950         return com.google.cloud.optimization.v1.FleetRoutingProto
1951             .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_fieldAccessorTable
1952             .ensureFieldAccessorsInitialized(
1953                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.class,
1954                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
1955                     .class);
1956       }
1957 
1958       // Construct using
1959       // com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.newBuilder()
Builder()1960       private Builder() {}
1961 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1962       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1963         super(parent);
1964       }
1965 
1966       @java.lang.Override
clear()1967       public Builder clear() {
1968         super.clear();
1969         bitField0_ = 0;
1970         if (rowsBuilder_ == null) {
1971           rows_ = java.util.Collections.emptyList();
1972         } else {
1973           rows_ = null;
1974           rowsBuilder_.clear();
1975         }
1976         bitField0_ = (bitField0_ & ~0x00000001);
1977         vehicleStartTag_ = "";
1978         return this;
1979       }
1980 
1981       @java.lang.Override
getDescriptorForType()1982       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1983         return com.google.cloud.optimization.v1.FleetRoutingProto
1984             .internal_static_google_cloud_optimization_v1_ShipmentModel_DurationDistanceMatrix_descriptor;
1985       }
1986 
1987       @java.lang.Override
1988       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
getDefaultInstanceForType()1989           getDefaultInstanceForType() {
1990         return com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
1991             .getDefaultInstance();
1992       }
1993 
1994       @java.lang.Override
build()1995       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix build() {
1996         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result =
1997             buildPartial();
1998         if (!result.isInitialized()) {
1999           throw newUninitializedMessageException(result);
2000         }
2001         return result;
2002       }
2003 
2004       @java.lang.Override
buildPartial()2005       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix buildPartial() {
2006         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result =
2007             new com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix(this);
2008         buildPartialRepeatedFields(result);
2009         if (bitField0_ != 0) {
2010           buildPartial0(result);
2011         }
2012         onBuilt();
2013         return result;
2014       }
2015 
buildPartialRepeatedFields( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result)2016       private void buildPartialRepeatedFields(
2017           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result) {
2018         if (rowsBuilder_ == null) {
2019           if (((bitField0_ & 0x00000001) != 0)) {
2020             rows_ = java.util.Collections.unmodifiableList(rows_);
2021             bitField0_ = (bitField0_ & ~0x00000001);
2022           }
2023           result.rows_ = rows_;
2024         } else {
2025           result.rows_ = rowsBuilder_.build();
2026         }
2027       }
2028 
buildPartial0( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result)2029       private void buildPartial0(
2030           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix result) {
2031         int from_bitField0_ = bitField0_;
2032         if (((from_bitField0_ & 0x00000002) != 0)) {
2033           result.vehicleStartTag_ = vehicleStartTag_;
2034         }
2035       }
2036 
2037       @java.lang.Override
clone()2038       public Builder clone() {
2039         return super.clone();
2040       }
2041 
2042       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2043       public Builder setField(
2044           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2045         return super.setField(field, value);
2046       }
2047 
2048       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2049       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2050         return super.clearField(field);
2051       }
2052 
2053       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2054       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2055         return super.clearOneof(oneof);
2056       }
2057 
2058       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2059       public Builder setRepeatedField(
2060           com.google.protobuf.Descriptors.FieldDescriptor field,
2061           int index,
2062           java.lang.Object value) {
2063         return super.setRepeatedField(field, index, value);
2064       }
2065 
2066       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2067       public Builder addRepeatedField(
2068           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2069         return super.addRepeatedField(field, value);
2070       }
2071 
2072       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2073       public Builder mergeFrom(com.google.protobuf.Message other) {
2074         if (other
2075             instanceof com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix) {
2076           return mergeFrom(
2077               (com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix) other);
2078         } else {
2079           super.mergeFrom(other);
2080           return this;
2081         }
2082       }
2083 
mergeFrom( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix other)2084       public Builder mergeFrom(
2085           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix other) {
2086         if (other
2087             == com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
2088                 .getDefaultInstance()) return this;
2089         if (rowsBuilder_ == null) {
2090           if (!other.rows_.isEmpty()) {
2091             if (rows_.isEmpty()) {
2092               rows_ = other.rows_;
2093               bitField0_ = (bitField0_ & ~0x00000001);
2094             } else {
2095               ensureRowsIsMutable();
2096               rows_.addAll(other.rows_);
2097             }
2098             onChanged();
2099           }
2100         } else {
2101           if (!other.rows_.isEmpty()) {
2102             if (rowsBuilder_.isEmpty()) {
2103               rowsBuilder_.dispose();
2104               rowsBuilder_ = null;
2105               rows_ = other.rows_;
2106               bitField0_ = (bitField0_ & ~0x00000001);
2107               rowsBuilder_ =
2108                   com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2109                       ? getRowsFieldBuilder()
2110                       : null;
2111             } else {
2112               rowsBuilder_.addAllMessages(other.rows_);
2113             }
2114           }
2115         }
2116         if (!other.getVehicleStartTag().isEmpty()) {
2117           vehicleStartTag_ = other.vehicleStartTag_;
2118           bitField0_ |= 0x00000002;
2119           onChanged();
2120         }
2121         this.mergeUnknownFields(other.getUnknownFields());
2122         onChanged();
2123         return this;
2124       }
2125 
2126       @java.lang.Override
isInitialized()2127       public final boolean isInitialized() {
2128         return true;
2129       }
2130 
2131       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2132       public Builder mergeFrom(
2133           com.google.protobuf.CodedInputStream input,
2134           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2135           throws java.io.IOException {
2136         if (extensionRegistry == null) {
2137           throw new java.lang.NullPointerException();
2138         }
2139         try {
2140           boolean done = false;
2141           while (!done) {
2142             int tag = input.readTag();
2143             switch (tag) {
2144               case 0:
2145                 done = true;
2146                 break;
2147               case 10:
2148                 {
2149                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row m =
2150                       input.readMessage(
2151                           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
2152                               .parser(),
2153                           extensionRegistry);
2154                   if (rowsBuilder_ == null) {
2155                     ensureRowsIsMutable();
2156                     rows_.add(m);
2157                   } else {
2158                     rowsBuilder_.addMessage(m);
2159                   }
2160                   break;
2161                 } // case 10
2162               case 18:
2163                 {
2164                   vehicleStartTag_ = input.readStringRequireUtf8();
2165                   bitField0_ |= 0x00000002;
2166                   break;
2167                 } // case 18
2168               default:
2169                 {
2170                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2171                     done = true; // was an endgroup tag
2172                   }
2173                   break;
2174                 } // default:
2175             } // switch (tag)
2176           } // while (!done)
2177         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2178           throw e.unwrapIOException();
2179         } finally {
2180           onChanged();
2181         } // finally
2182         return this;
2183       }
2184 
2185       private int bitField0_;
2186 
2187       private java.util.List<
2188               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
2189           rows_ = java.util.Collections.emptyList();
2190 
ensureRowsIsMutable()2191       private void ensureRowsIsMutable() {
2192         if (!((bitField0_ & 0x00000001) != 0)) {
2193           rows_ =
2194               new java.util.ArrayList<
2195                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>(rows_);
2196           bitField0_ |= 0x00000001;
2197         }
2198       }
2199 
2200       private com.google.protobuf.RepeatedFieldBuilderV3<
2201               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row,
2202               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder,
2203               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder>
2204           rowsBuilder_;
2205 
2206       /**
2207        *
2208        *
2209        * <pre>
2210        * Specifies the rows of the duration and distance matrix. It must have as
2211        * many elements as
2212        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2213        * </pre>
2214        *
2215        * <code>
2216        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2217        * </code>
2218        */
2219       public java.util.List<
2220               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
getRowsList()2221           getRowsList() {
2222         if (rowsBuilder_ == null) {
2223           return java.util.Collections.unmodifiableList(rows_);
2224         } else {
2225           return rowsBuilder_.getMessageList();
2226         }
2227       }
2228       /**
2229        *
2230        *
2231        * <pre>
2232        * Specifies the rows of the duration and distance matrix. It must have as
2233        * many elements as
2234        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2235        * </pre>
2236        *
2237        * <code>
2238        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2239        * </code>
2240        */
getRowsCount()2241       public int getRowsCount() {
2242         if (rowsBuilder_ == null) {
2243           return rows_.size();
2244         } else {
2245           return rowsBuilder_.getCount();
2246         }
2247       }
2248       /**
2249        *
2250        *
2251        * <pre>
2252        * Specifies the rows of the duration and distance matrix. It must have as
2253        * many elements as
2254        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2255        * </pre>
2256        *
2257        * <code>
2258        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2259        * </code>
2260        */
getRows( int index)2261       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row getRows(
2262           int index) {
2263         if (rowsBuilder_ == null) {
2264           return rows_.get(index);
2265         } else {
2266           return rowsBuilder_.getMessage(index);
2267         }
2268       }
2269       /**
2270        *
2271        *
2272        * <pre>
2273        * Specifies the rows of the duration and distance matrix. It must have as
2274        * many elements as
2275        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2276        * </pre>
2277        *
2278        * <code>
2279        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2280        * </code>
2281        */
setRows( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value)2282       public Builder setRows(
2283           int index,
2284           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value) {
2285         if (rowsBuilder_ == null) {
2286           if (value == null) {
2287             throw new NullPointerException();
2288           }
2289           ensureRowsIsMutable();
2290           rows_.set(index, value);
2291           onChanged();
2292         } else {
2293           rowsBuilder_.setMessage(index, value);
2294         }
2295         return this;
2296       }
2297       /**
2298        *
2299        *
2300        * <pre>
2301        * Specifies the rows of the duration and distance matrix. It must have as
2302        * many elements as
2303        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2304        * </pre>
2305        *
2306        * <code>
2307        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2308        * </code>
2309        */
setRows( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)2310       public Builder setRows(
2311           int index,
2312           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
2313               builderForValue) {
2314         if (rowsBuilder_ == null) {
2315           ensureRowsIsMutable();
2316           rows_.set(index, builderForValue.build());
2317           onChanged();
2318         } else {
2319           rowsBuilder_.setMessage(index, builderForValue.build());
2320         }
2321         return this;
2322       }
2323       /**
2324        *
2325        *
2326        * <pre>
2327        * Specifies the rows of the duration and distance matrix. It must have as
2328        * many elements as
2329        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2330        * </pre>
2331        *
2332        * <code>
2333        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2334        * </code>
2335        */
addRows( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value)2336       public Builder addRows(
2337           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value) {
2338         if (rowsBuilder_ == null) {
2339           if (value == null) {
2340             throw new NullPointerException();
2341           }
2342           ensureRowsIsMutable();
2343           rows_.add(value);
2344           onChanged();
2345         } else {
2346           rowsBuilder_.addMessage(value);
2347         }
2348         return this;
2349       }
2350       /**
2351        *
2352        *
2353        * <pre>
2354        * Specifies the rows of the duration and distance matrix. It must have as
2355        * many elements as
2356        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2357        * </pre>
2358        *
2359        * <code>
2360        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2361        * </code>
2362        */
addRows( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value)2363       public Builder addRows(
2364           int index,
2365           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row value) {
2366         if (rowsBuilder_ == null) {
2367           if (value == null) {
2368             throw new NullPointerException();
2369           }
2370           ensureRowsIsMutable();
2371           rows_.add(index, value);
2372           onChanged();
2373         } else {
2374           rowsBuilder_.addMessage(index, value);
2375         }
2376         return this;
2377       }
2378       /**
2379        *
2380        *
2381        * <pre>
2382        * Specifies the rows of the duration and distance matrix. It must have as
2383        * many elements as
2384        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2385        * </pre>
2386        *
2387        * <code>
2388        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2389        * </code>
2390        */
addRows( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)2391       public Builder addRows(
2392           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
2393               builderForValue) {
2394         if (rowsBuilder_ == null) {
2395           ensureRowsIsMutable();
2396           rows_.add(builderForValue.build());
2397           onChanged();
2398         } else {
2399           rowsBuilder_.addMessage(builderForValue.build());
2400         }
2401         return this;
2402       }
2403       /**
2404        *
2405        *
2406        * <pre>
2407        * Specifies the rows of the duration and distance matrix. It must have as
2408        * many elements as
2409        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2410        * </pre>
2411        *
2412        * <code>
2413        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2414        * </code>
2415        */
addRows( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder builderForValue)2416       public Builder addRows(
2417           int index,
2418           com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
2419               builderForValue) {
2420         if (rowsBuilder_ == null) {
2421           ensureRowsIsMutable();
2422           rows_.add(index, builderForValue.build());
2423           onChanged();
2424         } else {
2425           rowsBuilder_.addMessage(index, builderForValue.build());
2426         }
2427         return this;
2428       }
2429       /**
2430        *
2431        *
2432        * <pre>
2433        * Specifies the rows of the duration and distance matrix. It must have as
2434        * many elements as
2435        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2436        * </pre>
2437        *
2438        * <code>
2439        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2440        * </code>
2441        */
addAllRows( java.lang.Iterable< ? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row> values)2442       public Builder addAllRows(
2443           java.lang.Iterable<
2444                   ? extends
2445                       com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row>
2446               values) {
2447         if (rowsBuilder_ == null) {
2448           ensureRowsIsMutable();
2449           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_);
2450           onChanged();
2451         } else {
2452           rowsBuilder_.addAllMessages(values);
2453         }
2454         return this;
2455       }
2456       /**
2457        *
2458        *
2459        * <pre>
2460        * Specifies the rows of the duration and distance matrix. It must have as
2461        * many elements as
2462        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2463        * </pre>
2464        *
2465        * <code>
2466        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2467        * </code>
2468        */
clearRows()2469       public Builder clearRows() {
2470         if (rowsBuilder_ == null) {
2471           rows_ = java.util.Collections.emptyList();
2472           bitField0_ = (bitField0_ & ~0x00000001);
2473           onChanged();
2474         } else {
2475           rowsBuilder_.clear();
2476         }
2477         return this;
2478       }
2479       /**
2480        *
2481        *
2482        * <pre>
2483        * Specifies the rows of the duration and distance matrix. It must have as
2484        * many elements as
2485        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2486        * </pre>
2487        *
2488        * <code>
2489        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2490        * </code>
2491        */
removeRows(int index)2492       public Builder removeRows(int index) {
2493         if (rowsBuilder_ == null) {
2494           ensureRowsIsMutable();
2495           rows_.remove(index);
2496           onChanged();
2497         } else {
2498           rowsBuilder_.remove(index);
2499         }
2500         return this;
2501       }
2502       /**
2503        *
2504        *
2505        * <pre>
2506        * Specifies the rows of the duration and distance matrix. It must have as
2507        * many elements as
2508        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2509        * </pre>
2510        *
2511        * <code>
2512        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2513        * </code>
2514        */
2515       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
getRowsBuilder(int index)2516           getRowsBuilder(int index) {
2517         return getRowsFieldBuilder().getBuilder(index);
2518       }
2519       /**
2520        *
2521        *
2522        * <pre>
2523        * Specifies the rows of the duration and distance matrix. It must have as
2524        * many elements as
2525        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2526        * </pre>
2527        *
2528        * <code>
2529        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2530        * </code>
2531        */
2532       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder
getRowsOrBuilder(int index)2533           getRowsOrBuilder(int index) {
2534         if (rowsBuilder_ == null) {
2535           return rows_.get(index);
2536         } else {
2537           return rowsBuilder_.getMessageOrBuilder(index);
2538         }
2539       }
2540       /**
2541        *
2542        *
2543        * <pre>
2544        * Specifies the rows of the duration and distance matrix. It must have as
2545        * many elements as
2546        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2547        * </pre>
2548        *
2549        * <code>
2550        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2551        * </code>
2552        */
2553       public java.util.List<
2554               ? extends
2555                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
2556                       .RowOrBuilder>
getRowsOrBuilderList()2557           getRowsOrBuilderList() {
2558         if (rowsBuilder_ != null) {
2559           return rowsBuilder_.getMessageOrBuilderList();
2560         } else {
2561           return java.util.Collections.unmodifiableList(rows_);
2562         }
2563       }
2564       /**
2565        *
2566        *
2567        * <pre>
2568        * Specifies the rows of the duration and distance matrix. It must have as
2569        * many elements as
2570        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2571        * </pre>
2572        *
2573        * <code>
2574        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2575        * </code>
2576        */
2577       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
addRowsBuilder()2578           addRowsBuilder() {
2579         return getRowsFieldBuilder()
2580             .addBuilder(
2581                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
2582                     .getDefaultInstance());
2583       }
2584       /**
2585        *
2586        *
2587        * <pre>
2588        * Specifies the rows of the duration and distance matrix. It must have as
2589        * many elements as
2590        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2591        * </pre>
2592        *
2593        * <code>
2594        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2595        * </code>
2596        */
2597       public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder
addRowsBuilder(int index)2598           addRowsBuilder(int index) {
2599         return getRowsFieldBuilder()
2600             .addBuilder(
2601                 index,
2602                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row
2603                     .getDefaultInstance());
2604       }
2605       /**
2606        *
2607        *
2608        * <pre>
2609        * Specifies the rows of the duration and distance matrix. It must have as
2610        * many elements as
2611        * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags].
2612        * </pre>
2613        *
2614        * <code>
2615        * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1;
2616        * </code>
2617        */
2618       public java.util.List<
2619               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder>
getRowsBuilderList()2620           getRowsBuilderList() {
2621         return getRowsFieldBuilder().getBuilderList();
2622       }
2623 
2624       private com.google.protobuf.RepeatedFieldBuilderV3<
2625               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row,
2626               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder,
2627               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.RowOrBuilder>
getRowsFieldBuilder()2628           getRowsFieldBuilder() {
2629         if (rowsBuilder_ == null) {
2630           rowsBuilder_ =
2631               new com.google.protobuf.RepeatedFieldBuilderV3<
2632                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row,
2633                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row.Builder,
2634                   com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
2635                       .RowOrBuilder>(
2636                   rows_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
2637           rows_ = null;
2638         }
2639         return rowsBuilder_;
2640       }
2641 
2642       private java.lang.Object vehicleStartTag_ = "";
2643       /**
2644        *
2645        *
2646        * <pre>
2647        * Tag defining to which vehicles this duration and distance matrix applies.
2648        * If empty, this applies to all vehicles, and there can only be a single
2649        * matrix.
2650        * Each vehicle start must match exactly one matrix, i.e. exactly one of
2651        * their `start_tags` field must match the `vehicle_start_tag` of a matrix
2652        * (and of that matrix only).
2653        * All matrices must have a different `vehicle_start_tag`.
2654        * </pre>
2655        *
2656        * <code>string vehicle_start_tag = 2;</code>
2657        *
2658        * @return The vehicleStartTag.
2659        */
getVehicleStartTag()2660       public java.lang.String getVehicleStartTag() {
2661         java.lang.Object ref = vehicleStartTag_;
2662         if (!(ref instanceof java.lang.String)) {
2663           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2664           java.lang.String s = bs.toStringUtf8();
2665           vehicleStartTag_ = s;
2666           return s;
2667         } else {
2668           return (java.lang.String) ref;
2669         }
2670       }
2671       /**
2672        *
2673        *
2674        * <pre>
2675        * Tag defining to which vehicles this duration and distance matrix applies.
2676        * If empty, this applies to all vehicles, and there can only be a single
2677        * matrix.
2678        * Each vehicle start must match exactly one matrix, i.e. exactly one of
2679        * their `start_tags` field must match the `vehicle_start_tag` of a matrix
2680        * (and of that matrix only).
2681        * All matrices must have a different `vehicle_start_tag`.
2682        * </pre>
2683        *
2684        * <code>string vehicle_start_tag = 2;</code>
2685        *
2686        * @return The bytes for vehicleStartTag.
2687        */
getVehicleStartTagBytes()2688       public com.google.protobuf.ByteString getVehicleStartTagBytes() {
2689         java.lang.Object ref = vehicleStartTag_;
2690         if (ref instanceof String) {
2691           com.google.protobuf.ByteString b =
2692               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2693           vehicleStartTag_ = b;
2694           return b;
2695         } else {
2696           return (com.google.protobuf.ByteString) ref;
2697         }
2698       }
2699       /**
2700        *
2701        *
2702        * <pre>
2703        * Tag defining to which vehicles this duration and distance matrix applies.
2704        * If empty, this applies to all vehicles, and there can only be a single
2705        * matrix.
2706        * Each vehicle start must match exactly one matrix, i.e. exactly one of
2707        * their `start_tags` field must match the `vehicle_start_tag` of a matrix
2708        * (and of that matrix only).
2709        * All matrices must have a different `vehicle_start_tag`.
2710        * </pre>
2711        *
2712        * <code>string vehicle_start_tag = 2;</code>
2713        *
2714        * @param value The vehicleStartTag to set.
2715        * @return This builder for chaining.
2716        */
setVehicleStartTag(java.lang.String value)2717       public Builder setVehicleStartTag(java.lang.String value) {
2718         if (value == null) {
2719           throw new NullPointerException();
2720         }
2721         vehicleStartTag_ = value;
2722         bitField0_ |= 0x00000002;
2723         onChanged();
2724         return this;
2725       }
2726       /**
2727        *
2728        *
2729        * <pre>
2730        * Tag defining to which vehicles this duration and distance matrix applies.
2731        * If empty, this applies to all vehicles, and there can only be a single
2732        * matrix.
2733        * Each vehicle start must match exactly one matrix, i.e. exactly one of
2734        * their `start_tags` field must match the `vehicle_start_tag` of a matrix
2735        * (and of that matrix only).
2736        * All matrices must have a different `vehicle_start_tag`.
2737        * </pre>
2738        *
2739        * <code>string vehicle_start_tag = 2;</code>
2740        *
2741        * @return This builder for chaining.
2742        */
clearVehicleStartTag()2743       public Builder clearVehicleStartTag() {
2744         vehicleStartTag_ = getDefaultInstance().getVehicleStartTag();
2745         bitField0_ = (bitField0_ & ~0x00000002);
2746         onChanged();
2747         return this;
2748       }
2749       /**
2750        *
2751        *
2752        * <pre>
2753        * Tag defining to which vehicles this duration and distance matrix applies.
2754        * If empty, this applies to all vehicles, and there can only be a single
2755        * matrix.
2756        * Each vehicle start must match exactly one matrix, i.e. exactly one of
2757        * their `start_tags` field must match the `vehicle_start_tag` of a matrix
2758        * (and of that matrix only).
2759        * All matrices must have a different `vehicle_start_tag`.
2760        * </pre>
2761        *
2762        * <code>string vehicle_start_tag = 2;</code>
2763        *
2764        * @param value The bytes for vehicleStartTag to set.
2765        * @return This builder for chaining.
2766        */
setVehicleStartTagBytes(com.google.protobuf.ByteString value)2767       public Builder setVehicleStartTagBytes(com.google.protobuf.ByteString value) {
2768         if (value == null) {
2769           throw new NullPointerException();
2770         }
2771         checkByteStringIsUtf8(value);
2772         vehicleStartTag_ = value;
2773         bitField0_ |= 0x00000002;
2774         onChanged();
2775         return this;
2776       }
2777 
2778       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2779       public final Builder setUnknownFields(
2780           final com.google.protobuf.UnknownFieldSet unknownFields) {
2781         return super.setUnknownFields(unknownFields);
2782       }
2783 
2784       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2785       public final Builder mergeUnknownFields(
2786           final com.google.protobuf.UnknownFieldSet unknownFields) {
2787         return super.mergeUnknownFields(unknownFields);
2788       }
2789 
2790       // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
2791     }
2792 
2793     // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix)
2794     private static final com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
2795         DEFAULT_INSTANCE;
2796 
2797     static {
2798       DEFAULT_INSTANCE =
2799           new com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix();
2800     }
2801 
2802     public static com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
getDefaultInstance()2803         getDefaultInstance() {
2804       return DEFAULT_INSTANCE;
2805     }
2806 
2807     private static final com.google.protobuf.Parser<DurationDistanceMatrix> PARSER =
2808         new com.google.protobuf.AbstractParser<DurationDistanceMatrix>() {
2809           @java.lang.Override
2810           public DurationDistanceMatrix parsePartialFrom(
2811               com.google.protobuf.CodedInputStream input,
2812               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2813               throws com.google.protobuf.InvalidProtocolBufferException {
2814             Builder builder = newBuilder();
2815             try {
2816               builder.mergeFrom(input, extensionRegistry);
2817             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2818               throw e.setUnfinishedMessage(builder.buildPartial());
2819             } catch (com.google.protobuf.UninitializedMessageException e) {
2820               throw e.asInvalidProtocolBufferException()
2821                   .setUnfinishedMessage(builder.buildPartial());
2822             } catch (java.io.IOException e) {
2823               throw new com.google.protobuf.InvalidProtocolBufferException(e)
2824                   .setUnfinishedMessage(builder.buildPartial());
2825             }
2826             return builder.buildPartial();
2827           }
2828         };
2829 
parser()2830     public static com.google.protobuf.Parser<DurationDistanceMatrix> parser() {
2831       return PARSER;
2832     }
2833 
2834     @java.lang.Override
getParserForType()2835     public com.google.protobuf.Parser<DurationDistanceMatrix> getParserForType() {
2836       return PARSER;
2837     }
2838 
2839     @java.lang.Override
2840     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
getDefaultInstanceForType()2841         getDefaultInstanceForType() {
2842       return DEFAULT_INSTANCE;
2843     }
2844   }
2845 
2846   public interface PrecedenceRuleOrBuilder
2847       extends
2848       // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
2849       com.google.protobuf.MessageOrBuilder {
2850 
2851     /**
2852      *
2853      *
2854      * <pre>
2855      * Shipment index of the "first" event. This field must be specified.
2856      * </pre>
2857      *
2858      * <code>optional int32 first_index = 1;</code>
2859      *
2860      * @return Whether the firstIndex field is set.
2861      */
hasFirstIndex()2862     boolean hasFirstIndex();
2863     /**
2864      *
2865      *
2866      * <pre>
2867      * Shipment index of the "first" event. This field must be specified.
2868      * </pre>
2869      *
2870      * <code>optional int32 first_index = 1;</code>
2871      *
2872      * @return The firstIndex.
2873      */
getFirstIndex()2874     int getFirstIndex();
2875 
2876     /**
2877      *
2878      *
2879      * <pre>
2880      * Indicates if the "first" event is a delivery.
2881      * </pre>
2882      *
2883      * <code>bool first_is_delivery = 3;</code>
2884      *
2885      * @return The firstIsDelivery.
2886      */
getFirstIsDelivery()2887     boolean getFirstIsDelivery();
2888 
2889     /**
2890      *
2891      *
2892      * <pre>
2893      * Shipment index of the "second" event. This field must be specified.
2894      * </pre>
2895      *
2896      * <code>optional int32 second_index = 2;</code>
2897      *
2898      * @return Whether the secondIndex field is set.
2899      */
hasSecondIndex()2900     boolean hasSecondIndex();
2901     /**
2902      *
2903      *
2904      * <pre>
2905      * Shipment index of the "second" event. This field must be specified.
2906      * </pre>
2907      *
2908      * <code>optional int32 second_index = 2;</code>
2909      *
2910      * @return The secondIndex.
2911      */
getSecondIndex()2912     int getSecondIndex();
2913 
2914     /**
2915      *
2916      *
2917      * <pre>
2918      * Indicates if the "second" event is a delivery.
2919      * </pre>
2920      *
2921      * <code>bool second_is_delivery = 4;</code>
2922      *
2923      * @return The secondIsDelivery.
2924      */
getSecondIsDelivery()2925     boolean getSecondIsDelivery();
2926 
2927     /**
2928      *
2929      *
2930      * <pre>
2931      * The offset between the "first" and "second" event. It can be negative.
2932      * </pre>
2933      *
2934      * <code>.google.protobuf.Duration offset_duration = 5;</code>
2935      *
2936      * @return Whether the offsetDuration field is set.
2937      */
hasOffsetDuration()2938     boolean hasOffsetDuration();
2939     /**
2940      *
2941      *
2942      * <pre>
2943      * The offset between the "first" and "second" event. It can be negative.
2944      * </pre>
2945      *
2946      * <code>.google.protobuf.Duration offset_duration = 5;</code>
2947      *
2948      * @return The offsetDuration.
2949      */
getOffsetDuration()2950     com.google.protobuf.Duration getOffsetDuration();
2951     /**
2952      *
2953      *
2954      * <pre>
2955      * The offset between the "first" and "second" event. It can be negative.
2956      * </pre>
2957      *
2958      * <code>.google.protobuf.Duration offset_duration = 5;</code>
2959      */
getOffsetDurationOrBuilder()2960     com.google.protobuf.DurationOrBuilder getOffsetDurationOrBuilder();
2961   }
2962   /**
2963    *
2964    *
2965    * <pre>
2966    * A precedence rule between two events (each event is the pickup or the
2967    * delivery of a shipment): the "second" event has to start at least
2968    * `offset_duration` after "first" has started.
2969    * Several precedences can refer to the same (or related) events, e.g.,
2970    * "pickup of B happens after delivery of A" and "pickup of C happens after
2971    * pickup of B".
2972    * Furthermore, precedences only apply when both shipments are performed and
2973    * are otherwise ignored.
2974    * </pre>
2975    *
2976    * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.PrecedenceRule}
2977    */
2978   public static final class PrecedenceRule extends com.google.protobuf.GeneratedMessageV3
2979       implements
2980       // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
2981       PrecedenceRuleOrBuilder {
2982     private static final long serialVersionUID = 0L;
2983     // Use PrecedenceRule.newBuilder() to construct.
PrecedenceRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)2984     private PrecedenceRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
2985       super(builder);
2986     }
2987 
PrecedenceRule()2988     private PrecedenceRule() {}
2989 
2990     @java.lang.Override
2991     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)2992     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
2993       return new PrecedenceRule();
2994     }
2995 
2996     @java.lang.Override
getUnknownFields()2997     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
2998       return this.unknownFields;
2999     }
3000 
getDescriptor()3001     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3002       return com.google.cloud.optimization.v1.FleetRoutingProto
3003           .internal_static_google_cloud_optimization_v1_ShipmentModel_PrecedenceRule_descriptor;
3004     }
3005 
3006     @java.lang.Override
3007     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3008         internalGetFieldAccessorTable() {
3009       return com.google.cloud.optimization.v1.FleetRoutingProto
3010           .internal_static_google_cloud_optimization_v1_ShipmentModel_PrecedenceRule_fieldAccessorTable
3011           .ensureFieldAccessorsInitialized(
3012               com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.class,
3013               com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder.class);
3014     }
3015 
3016     private int bitField0_;
3017     public static final int FIRST_INDEX_FIELD_NUMBER = 1;
3018     private int firstIndex_ = 0;
3019     /**
3020      *
3021      *
3022      * <pre>
3023      * Shipment index of the "first" event. This field must be specified.
3024      * </pre>
3025      *
3026      * <code>optional int32 first_index = 1;</code>
3027      *
3028      * @return Whether the firstIndex field is set.
3029      */
3030     @java.lang.Override
hasFirstIndex()3031     public boolean hasFirstIndex() {
3032       return ((bitField0_ & 0x00000001) != 0);
3033     }
3034     /**
3035      *
3036      *
3037      * <pre>
3038      * Shipment index of the "first" event. This field must be specified.
3039      * </pre>
3040      *
3041      * <code>optional int32 first_index = 1;</code>
3042      *
3043      * @return The firstIndex.
3044      */
3045     @java.lang.Override
getFirstIndex()3046     public int getFirstIndex() {
3047       return firstIndex_;
3048     }
3049 
3050     public static final int FIRST_IS_DELIVERY_FIELD_NUMBER = 3;
3051     private boolean firstIsDelivery_ = false;
3052     /**
3053      *
3054      *
3055      * <pre>
3056      * Indicates if the "first" event is a delivery.
3057      * </pre>
3058      *
3059      * <code>bool first_is_delivery = 3;</code>
3060      *
3061      * @return The firstIsDelivery.
3062      */
3063     @java.lang.Override
getFirstIsDelivery()3064     public boolean getFirstIsDelivery() {
3065       return firstIsDelivery_;
3066     }
3067 
3068     public static final int SECOND_INDEX_FIELD_NUMBER = 2;
3069     private int secondIndex_ = 0;
3070     /**
3071      *
3072      *
3073      * <pre>
3074      * Shipment index of the "second" event. This field must be specified.
3075      * </pre>
3076      *
3077      * <code>optional int32 second_index = 2;</code>
3078      *
3079      * @return Whether the secondIndex field is set.
3080      */
3081     @java.lang.Override
hasSecondIndex()3082     public boolean hasSecondIndex() {
3083       return ((bitField0_ & 0x00000002) != 0);
3084     }
3085     /**
3086      *
3087      *
3088      * <pre>
3089      * Shipment index of the "second" event. This field must be specified.
3090      * </pre>
3091      *
3092      * <code>optional int32 second_index = 2;</code>
3093      *
3094      * @return The secondIndex.
3095      */
3096     @java.lang.Override
getSecondIndex()3097     public int getSecondIndex() {
3098       return secondIndex_;
3099     }
3100 
3101     public static final int SECOND_IS_DELIVERY_FIELD_NUMBER = 4;
3102     private boolean secondIsDelivery_ = false;
3103     /**
3104      *
3105      *
3106      * <pre>
3107      * Indicates if the "second" event is a delivery.
3108      * </pre>
3109      *
3110      * <code>bool second_is_delivery = 4;</code>
3111      *
3112      * @return The secondIsDelivery.
3113      */
3114     @java.lang.Override
getSecondIsDelivery()3115     public boolean getSecondIsDelivery() {
3116       return secondIsDelivery_;
3117     }
3118 
3119     public static final int OFFSET_DURATION_FIELD_NUMBER = 5;
3120     private com.google.protobuf.Duration offsetDuration_;
3121     /**
3122      *
3123      *
3124      * <pre>
3125      * The offset between the "first" and "second" event. It can be negative.
3126      * </pre>
3127      *
3128      * <code>.google.protobuf.Duration offset_duration = 5;</code>
3129      *
3130      * @return Whether the offsetDuration field is set.
3131      */
3132     @java.lang.Override
hasOffsetDuration()3133     public boolean hasOffsetDuration() {
3134       return offsetDuration_ != null;
3135     }
3136     /**
3137      *
3138      *
3139      * <pre>
3140      * The offset between the "first" and "second" event. It can be negative.
3141      * </pre>
3142      *
3143      * <code>.google.protobuf.Duration offset_duration = 5;</code>
3144      *
3145      * @return The offsetDuration.
3146      */
3147     @java.lang.Override
getOffsetDuration()3148     public com.google.protobuf.Duration getOffsetDuration() {
3149       return offsetDuration_ == null
3150           ? com.google.protobuf.Duration.getDefaultInstance()
3151           : offsetDuration_;
3152     }
3153     /**
3154      *
3155      *
3156      * <pre>
3157      * The offset between the "first" and "second" event. It can be negative.
3158      * </pre>
3159      *
3160      * <code>.google.protobuf.Duration offset_duration = 5;</code>
3161      */
3162     @java.lang.Override
getOffsetDurationOrBuilder()3163     public com.google.protobuf.DurationOrBuilder getOffsetDurationOrBuilder() {
3164       return offsetDuration_ == null
3165           ? com.google.protobuf.Duration.getDefaultInstance()
3166           : offsetDuration_;
3167     }
3168 
3169     private byte memoizedIsInitialized = -1;
3170 
3171     @java.lang.Override
isInitialized()3172     public final boolean isInitialized() {
3173       byte isInitialized = memoizedIsInitialized;
3174       if (isInitialized == 1) return true;
3175       if (isInitialized == 0) return false;
3176 
3177       memoizedIsInitialized = 1;
3178       return true;
3179     }
3180 
3181     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)3182     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
3183       if (((bitField0_ & 0x00000001) != 0)) {
3184         output.writeInt32(1, firstIndex_);
3185       }
3186       if (((bitField0_ & 0x00000002) != 0)) {
3187         output.writeInt32(2, secondIndex_);
3188       }
3189       if (firstIsDelivery_ != false) {
3190         output.writeBool(3, firstIsDelivery_);
3191       }
3192       if (secondIsDelivery_ != false) {
3193         output.writeBool(4, secondIsDelivery_);
3194       }
3195       if (offsetDuration_ != null) {
3196         output.writeMessage(5, getOffsetDuration());
3197       }
3198       getUnknownFields().writeTo(output);
3199     }
3200 
3201     @java.lang.Override
getSerializedSize()3202     public int getSerializedSize() {
3203       int size = memoizedSize;
3204       if (size != -1) return size;
3205 
3206       size = 0;
3207       if (((bitField0_ & 0x00000001) != 0)) {
3208         size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, firstIndex_);
3209       }
3210       if (((bitField0_ & 0x00000002) != 0)) {
3211         size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, secondIndex_);
3212       }
3213       if (firstIsDelivery_ != false) {
3214         size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, firstIsDelivery_);
3215       }
3216       if (secondIsDelivery_ != false) {
3217         size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, secondIsDelivery_);
3218       }
3219       if (offsetDuration_ != null) {
3220         size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOffsetDuration());
3221       }
3222       size += getUnknownFields().getSerializedSize();
3223       memoizedSize = size;
3224       return size;
3225     }
3226 
3227     @java.lang.Override
equals(final java.lang.Object obj)3228     public boolean equals(final java.lang.Object obj) {
3229       if (obj == this) {
3230         return true;
3231       }
3232       if (!(obj instanceof com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)) {
3233         return super.equals(obj);
3234       }
3235       com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule other =
3236           (com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule) obj;
3237 
3238       if (hasFirstIndex() != other.hasFirstIndex()) return false;
3239       if (hasFirstIndex()) {
3240         if (getFirstIndex() != other.getFirstIndex()) return false;
3241       }
3242       if (getFirstIsDelivery() != other.getFirstIsDelivery()) return false;
3243       if (hasSecondIndex() != other.hasSecondIndex()) return false;
3244       if (hasSecondIndex()) {
3245         if (getSecondIndex() != other.getSecondIndex()) return false;
3246       }
3247       if (getSecondIsDelivery() != other.getSecondIsDelivery()) return false;
3248       if (hasOffsetDuration() != other.hasOffsetDuration()) return false;
3249       if (hasOffsetDuration()) {
3250         if (!getOffsetDuration().equals(other.getOffsetDuration())) return false;
3251       }
3252       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
3253       return true;
3254     }
3255 
3256     @java.lang.Override
hashCode()3257     public int hashCode() {
3258       if (memoizedHashCode != 0) {
3259         return memoizedHashCode;
3260       }
3261       int hash = 41;
3262       hash = (19 * hash) + getDescriptor().hashCode();
3263       if (hasFirstIndex()) {
3264         hash = (37 * hash) + FIRST_INDEX_FIELD_NUMBER;
3265         hash = (53 * hash) + getFirstIndex();
3266       }
3267       hash = (37 * hash) + FIRST_IS_DELIVERY_FIELD_NUMBER;
3268       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFirstIsDelivery());
3269       if (hasSecondIndex()) {
3270         hash = (37 * hash) + SECOND_INDEX_FIELD_NUMBER;
3271         hash = (53 * hash) + getSecondIndex();
3272       }
3273       hash = (37 * hash) + SECOND_IS_DELIVERY_FIELD_NUMBER;
3274       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSecondIsDelivery());
3275       if (hasOffsetDuration()) {
3276         hash = (37 * hash) + OFFSET_DURATION_FIELD_NUMBER;
3277         hash = (53 * hash) + getOffsetDuration().hashCode();
3278       }
3279       hash = (29 * hash) + getUnknownFields().hashCode();
3280       memoizedHashCode = hash;
3281       return hash;
3282     }
3283 
parseFrom( java.nio.ByteBuffer data)3284     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3285         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
3286       return PARSER.parseFrom(data);
3287     }
3288 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3289     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3290         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3291         throws com.google.protobuf.InvalidProtocolBufferException {
3292       return PARSER.parseFrom(data, extensionRegistry);
3293     }
3294 
parseFrom( com.google.protobuf.ByteString data)3295     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3296         com.google.protobuf.ByteString data)
3297         throws com.google.protobuf.InvalidProtocolBufferException {
3298       return PARSER.parseFrom(data);
3299     }
3300 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3301     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3302         com.google.protobuf.ByteString data,
3303         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3304         throws com.google.protobuf.InvalidProtocolBufferException {
3305       return PARSER.parseFrom(data, extensionRegistry);
3306     }
3307 
parseFrom( byte[] data)3308     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3309         byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
3310       return PARSER.parseFrom(data);
3311     }
3312 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3313     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3314         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3315         throws com.google.protobuf.InvalidProtocolBufferException {
3316       return PARSER.parseFrom(data, extensionRegistry);
3317     }
3318 
parseFrom( java.io.InputStream input)3319     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3320         java.io.InputStream input) throws java.io.IOException {
3321       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3322     }
3323 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3324     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3325         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3326         throws java.io.IOException {
3327       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3328           PARSER, input, extensionRegistry);
3329     }
3330 
parseDelimitedFrom( java.io.InputStream input)3331     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseDelimitedFrom(
3332         java.io.InputStream input) throws java.io.IOException {
3333       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
3334     }
3335 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3336     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseDelimitedFrom(
3337         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3338         throws java.io.IOException {
3339       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
3340           PARSER, input, extensionRegistry);
3341     }
3342 
parseFrom( com.google.protobuf.CodedInputStream input)3343     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3344         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
3345       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3346     }
3347 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3348     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule parseFrom(
3349         com.google.protobuf.CodedInputStream input,
3350         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3351         throws java.io.IOException {
3352       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3353           PARSER, input, extensionRegistry);
3354     }
3355 
3356     @java.lang.Override
newBuilderForType()3357     public Builder newBuilderForType() {
3358       return newBuilder();
3359     }
3360 
newBuilder()3361     public static Builder newBuilder() {
3362       return DEFAULT_INSTANCE.toBuilder();
3363     }
3364 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule prototype)3365     public static Builder newBuilder(
3366         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule prototype) {
3367       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
3368     }
3369 
3370     @java.lang.Override
toBuilder()3371     public Builder toBuilder() {
3372       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
3373     }
3374 
3375     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3376     protected Builder newBuilderForType(
3377         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3378       Builder builder = new Builder(parent);
3379       return builder;
3380     }
3381     /**
3382      *
3383      *
3384      * <pre>
3385      * A precedence rule between two events (each event is the pickup or the
3386      * delivery of a shipment): the "second" event has to start at least
3387      * `offset_duration` after "first" has started.
3388      * Several precedences can refer to the same (or related) events, e.g.,
3389      * "pickup of B happens after delivery of A" and "pickup of C happens after
3390      * pickup of B".
3391      * Furthermore, precedences only apply when both shipments are performed and
3392      * are otherwise ignored.
3393      * </pre>
3394      *
3395      * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.PrecedenceRule}
3396      */
3397     public static final class Builder
3398         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
3399         implements
3400         // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
3401         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder {
getDescriptor()3402       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3403         return com.google.cloud.optimization.v1.FleetRoutingProto
3404             .internal_static_google_cloud_optimization_v1_ShipmentModel_PrecedenceRule_descriptor;
3405       }
3406 
3407       @java.lang.Override
3408       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3409           internalGetFieldAccessorTable() {
3410         return com.google.cloud.optimization.v1.FleetRoutingProto
3411             .internal_static_google_cloud_optimization_v1_ShipmentModel_PrecedenceRule_fieldAccessorTable
3412             .ensureFieldAccessorsInitialized(
3413                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.class,
3414                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder.class);
3415       }
3416 
3417       // Construct using com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.newBuilder()
Builder()3418       private Builder() {}
3419 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3420       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3421         super(parent);
3422       }
3423 
3424       @java.lang.Override
clear()3425       public Builder clear() {
3426         super.clear();
3427         bitField0_ = 0;
3428         firstIndex_ = 0;
3429         firstIsDelivery_ = false;
3430         secondIndex_ = 0;
3431         secondIsDelivery_ = false;
3432         offsetDuration_ = null;
3433         if (offsetDurationBuilder_ != null) {
3434           offsetDurationBuilder_.dispose();
3435           offsetDurationBuilder_ = null;
3436         }
3437         return this;
3438       }
3439 
3440       @java.lang.Override
getDescriptorForType()3441       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
3442         return com.google.cloud.optimization.v1.FleetRoutingProto
3443             .internal_static_google_cloud_optimization_v1_ShipmentModel_PrecedenceRule_descriptor;
3444       }
3445 
3446       @java.lang.Override
3447       public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
getDefaultInstanceForType()3448           getDefaultInstanceForType() {
3449         return com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.getDefaultInstance();
3450       }
3451 
3452       @java.lang.Override
build()3453       public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule build() {
3454         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule result = buildPartial();
3455         if (!result.isInitialized()) {
3456           throw newUninitializedMessageException(result);
3457         }
3458         return result;
3459       }
3460 
3461       @java.lang.Override
buildPartial()3462       public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule buildPartial() {
3463         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule result =
3464             new com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule(this);
3465         if (bitField0_ != 0) {
3466           buildPartial0(result);
3467         }
3468         onBuilt();
3469         return result;
3470       }
3471 
buildPartial0( com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule result)3472       private void buildPartial0(
3473           com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule result) {
3474         int from_bitField0_ = bitField0_;
3475         int to_bitField0_ = 0;
3476         if (((from_bitField0_ & 0x00000001) != 0)) {
3477           result.firstIndex_ = firstIndex_;
3478           to_bitField0_ |= 0x00000001;
3479         }
3480         if (((from_bitField0_ & 0x00000002) != 0)) {
3481           result.firstIsDelivery_ = firstIsDelivery_;
3482         }
3483         if (((from_bitField0_ & 0x00000004) != 0)) {
3484           result.secondIndex_ = secondIndex_;
3485           to_bitField0_ |= 0x00000002;
3486         }
3487         if (((from_bitField0_ & 0x00000008) != 0)) {
3488           result.secondIsDelivery_ = secondIsDelivery_;
3489         }
3490         if (((from_bitField0_ & 0x00000010) != 0)) {
3491           result.offsetDuration_ =
3492               offsetDurationBuilder_ == null ? offsetDuration_ : offsetDurationBuilder_.build();
3493         }
3494         result.bitField0_ |= to_bitField0_;
3495       }
3496 
3497       @java.lang.Override
clone()3498       public Builder clone() {
3499         return super.clone();
3500       }
3501 
3502       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3503       public Builder setField(
3504           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
3505         return super.setField(field, value);
3506       }
3507 
3508       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)3509       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
3510         return super.clearField(field);
3511       }
3512 
3513       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)3514       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
3515         return super.clearOneof(oneof);
3516       }
3517 
3518       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)3519       public Builder setRepeatedField(
3520           com.google.protobuf.Descriptors.FieldDescriptor field,
3521           int index,
3522           java.lang.Object value) {
3523         return super.setRepeatedField(field, index, value);
3524       }
3525 
3526       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3527       public Builder addRepeatedField(
3528           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
3529         return super.addRepeatedField(field, value);
3530       }
3531 
3532       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)3533       public Builder mergeFrom(com.google.protobuf.Message other) {
3534         if (other instanceof com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule) {
3535           return mergeFrom((com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule) other);
3536         } else {
3537           super.mergeFrom(other);
3538           return this;
3539         }
3540       }
3541 
mergeFrom( com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule other)3542       public Builder mergeFrom(
3543           com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule other) {
3544         if (other
3545             == com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.getDefaultInstance())
3546           return this;
3547         if (other.hasFirstIndex()) {
3548           setFirstIndex(other.getFirstIndex());
3549         }
3550         if (other.getFirstIsDelivery() != false) {
3551           setFirstIsDelivery(other.getFirstIsDelivery());
3552         }
3553         if (other.hasSecondIndex()) {
3554           setSecondIndex(other.getSecondIndex());
3555         }
3556         if (other.getSecondIsDelivery() != false) {
3557           setSecondIsDelivery(other.getSecondIsDelivery());
3558         }
3559         if (other.hasOffsetDuration()) {
3560           mergeOffsetDuration(other.getOffsetDuration());
3561         }
3562         this.mergeUnknownFields(other.getUnknownFields());
3563         onChanged();
3564         return this;
3565       }
3566 
3567       @java.lang.Override
isInitialized()3568       public final boolean isInitialized() {
3569         return true;
3570       }
3571 
3572       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3573       public Builder mergeFrom(
3574           com.google.protobuf.CodedInputStream input,
3575           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3576           throws java.io.IOException {
3577         if (extensionRegistry == null) {
3578           throw new java.lang.NullPointerException();
3579         }
3580         try {
3581           boolean done = false;
3582           while (!done) {
3583             int tag = input.readTag();
3584             switch (tag) {
3585               case 0:
3586                 done = true;
3587                 break;
3588               case 8:
3589                 {
3590                   firstIndex_ = input.readInt32();
3591                   bitField0_ |= 0x00000001;
3592                   break;
3593                 } // case 8
3594               case 16:
3595                 {
3596                   secondIndex_ = input.readInt32();
3597                   bitField0_ |= 0x00000004;
3598                   break;
3599                 } // case 16
3600               case 24:
3601                 {
3602                   firstIsDelivery_ = input.readBool();
3603                   bitField0_ |= 0x00000002;
3604                   break;
3605                 } // case 24
3606               case 32:
3607                 {
3608                   secondIsDelivery_ = input.readBool();
3609                   bitField0_ |= 0x00000008;
3610                   break;
3611                 } // case 32
3612               case 42:
3613                 {
3614                   input.readMessage(
3615                       getOffsetDurationFieldBuilder().getBuilder(), extensionRegistry);
3616                   bitField0_ |= 0x00000010;
3617                   break;
3618                 } // case 42
3619               default:
3620                 {
3621                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
3622                     done = true; // was an endgroup tag
3623                   }
3624                   break;
3625                 } // default:
3626             } // switch (tag)
3627           } // while (!done)
3628         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3629           throw e.unwrapIOException();
3630         } finally {
3631           onChanged();
3632         } // finally
3633         return this;
3634       }
3635 
3636       private int bitField0_;
3637 
3638       private int firstIndex_;
3639       /**
3640        *
3641        *
3642        * <pre>
3643        * Shipment index of the "first" event. This field must be specified.
3644        * </pre>
3645        *
3646        * <code>optional int32 first_index = 1;</code>
3647        *
3648        * @return Whether the firstIndex field is set.
3649        */
3650       @java.lang.Override
hasFirstIndex()3651       public boolean hasFirstIndex() {
3652         return ((bitField0_ & 0x00000001) != 0);
3653       }
3654       /**
3655        *
3656        *
3657        * <pre>
3658        * Shipment index of the "first" event. This field must be specified.
3659        * </pre>
3660        *
3661        * <code>optional int32 first_index = 1;</code>
3662        *
3663        * @return The firstIndex.
3664        */
3665       @java.lang.Override
getFirstIndex()3666       public int getFirstIndex() {
3667         return firstIndex_;
3668       }
3669       /**
3670        *
3671        *
3672        * <pre>
3673        * Shipment index of the "first" event. This field must be specified.
3674        * </pre>
3675        *
3676        * <code>optional int32 first_index = 1;</code>
3677        *
3678        * @param value The firstIndex to set.
3679        * @return This builder for chaining.
3680        */
setFirstIndex(int value)3681       public Builder setFirstIndex(int value) {
3682 
3683         firstIndex_ = value;
3684         bitField0_ |= 0x00000001;
3685         onChanged();
3686         return this;
3687       }
3688       /**
3689        *
3690        *
3691        * <pre>
3692        * Shipment index of the "first" event. This field must be specified.
3693        * </pre>
3694        *
3695        * <code>optional int32 first_index = 1;</code>
3696        *
3697        * @return This builder for chaining.
3698        */
clearFirstIndex()3699       public Builder clearFirstIndex() {
3700         bitField0_ = (bitField0_ & ~0x00000001);
3701         firstIndex_ = 0;
3702         onChanged();
3703         return this;
3704       }
3705 
3706       private boolean firstIsDelivery_;
3707       /**
3708        *
3709        *
3710        * <pre>
3711        * Indicates if the "first" event is a delivery.
3712        * </pre>
3713        *
3714        * <code>bool first_is_delivery = 3;</code>
3715        *
3716        * @return The firstIsDelivery.
3717        */
3718       @java.lang.Override
getFirstIsDelivery()3719       public boolean getFirstIsDelivery() {
3720         return firstIsDelivery_;
3721       }
3722       /**
3723        *
3724        *
3725        * <pre>
3726        * Indicates if the "first" event is a delivery.
3727        * </pre>
3728        *
3729        * <code>bool first_is_delivery = 3;</code>
3730        *
3731        * @param value The firstIsDelivery to set.
3732        * @return This builder for chaining.
3733        */
setFirstIsDelivery(boolean value)3734       public Builder setFirstIsDelivery(boolean value) {
3735 
3736         firstIsDelivery_ = value;
3737         bitField0_ |= 0x00000002;
3738         onChanged();
3739         return this;
3740       }
3741       /**
3742        *
3743        *
3744        * <pre>
3745        * Indicates if the "first" event is a delivery.
3746        * </pre>
3747        *
3748        * <code>bool first_is_delivery = 3;</code>
3749        *
3750        * @return This builder for chaining.
3751        */
clearFirstIsDelivery()3752       public Builder clearFirstIsDelivery() {
3753         bitField0_ = (bitField0_ & ~0x00000002);
3754         firstIsDelivery_ = false;
3755         onChanged();
3756         return this;
3757       }
3758 
3759       private int secondIndex_;
3760       /**
3761        *
3762        *
3763        * <pre>
3764        * Shipment index of the "second" event. This field must be specified.
3765        * </pre>
3766        *
3767        * <code>optional int32 second_index = 2;</code>
3768        *
3769        * @return Whether the secondIndex field is set.
3770        */
3771       @java.lang.Override
hasSecondIndex()3772       public boolean hasSecondIndex() {
3773         return ((bitField0_ & 0x00000004) != 0);
3774       }
3775       /**
3776        *
3777        *
3778        * <pre>
3779        * Shipment index of the "second" event. This field must be specified.
3780        * </pre>
3781        *
3782        * <code>optional int32 second_index = 2;</code>
3783        *
3784        * @return The secondIndex.
3785        */
3786       @java.lang.Override
getSecondIndex()3787       public int getSecondIndex() {
3788         return secondIndex_;
3789       }
3790       /**
3791        *
3792        *
3793        * <pre>
3794        * Shipment index of the "second" event. This field must be specified.
3795        * </pre>
3796        *
3797        * <code>optional int32 second_index = 2;</code>
3798        *
3799        * @param value The secondIndex to set.
3800        * @return This builder for chaining.
3801        */
setSecondIndex(int value)3802       public Builder setSecondIndex(int value) {
3803 
3804         secondIndex_ = value;
3805         bitField0_ |= 0x00000004;
3806         onChanged();
3807         return this;
3808       }
3809       /**
3810        *
3811        *
3812        * <pre>
3813        * Shipment index of the "second" event. This field must be specified.
3814        * </pre>
3815        *
3816        * <code>optional int32 second_index = 2;</code>
3817        *
3818        * @return This builder for chaining.
3819        */
clearSecondIndex()3820       public Builder clearSecondIndex() {
3821         bitField0_ = (bitField0_ & ~0x00000004);
3822         secondIndex_ = 0;
3823         onChanged();
3824         return this;
3825       }
3826 
3827       private boolean secondIsDelivery_;
3828       /**
3829        *
3830        *
3831        * <pre>
3832        * Indicates if the "second" event is a delivery.
3833        * </pre>
3834        *
3835        * <code>bool second_is_delivery = 4;</code>
3836        *
3837        * @return The secondIsDelivery.
3838        */
3839       @java.lang.Override
getSecondIsDelivery()3840       public boolean getSecondIsDelivery() {
3841         return secondIsDelivery_;
3842       }
3843       /**
3844        *
3845        *
3846        * <pre>
3847        * Indicates if the "second" event is a delivery.
3848        * </pre>
3849        *
3850        * <code>bool second_is_delivery = 4;</code>
3851        *
3852        * @param value The secondIsDelivery to set.
3853        * @return This builder for chaining.
3854        */
setSecondIsDelivery(boolean value)3855       public Builder setSecondIsDelivery(boolean value) {
3856 
3857         secondIsDelivery_ = value;
3858         bitField0_ |= 0x00000008;
3859         onChanged();
3860         return this;
3861       }
3862       /**
3863        *
3864        *
3865        * <pre>
3866        * Indicates if the "second" event is a delivery.
3867        * </pre>
3868        *
3869        * <code>bool second_is_delivery = 4;</code>
3870        *
3871        * @return This builder for chaining.
3872        */
clearSecondIsDelivery()3873       public Builder clearSecondIsDelivery() {
3874         bitField0_ = (bitField0_ & ~0x00000008);
3875         secondIsDelivery_ = false;
3876         onChanged();
3877         return this;
3878       }
3879 
3880       private com.google.protobuf.Duration offsetDuration_;
3881       private com.google.protobuf.SingleFieldBuilderV3<
3882               com.google.protobuf.Duration,
3883               com.google.protobuf.Duration.Builder,
3884               com.google.protobuf.DurationOrBuilder>
3885           offsetDurationBuilder_;
3886       /**
3887        *
3888        *
3889        * <pre>
3890        * The offset between the "first" and "second" event. It can be negative.
3891        * </pre>
3892        *
3893        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3894        *
3895        * @return Whether the offsetDuration field is set.
3896        */
hasOffsetDuration()3897       public boolean hasOffsetDuration() {
3898         return ((bitField0_ & 0x00000010) != 0);
3899       }
3900       /**
3901        *
3902        *
3903        * <pre>
3904        * The offset between the "first" and "second" event. It can be negative.
3905        * </pre>
3906        *
3907        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3908        *
3909        * @return The offsetDuration.
3910        */
getOffsetDuration()3911       public com.google.protobuf.Duration getOffsetDuration() {
3912         if (offsetDurationBuilder_ == null) {
3913           return offsetDuration_ == null
3914               ? com.google.protobuf.Duration.getDefaultInstance()
3915               : offsetDuration_;
3916         } else {
3917           return offsetDurationBuilder_.getMessage();
3918         }
3919       }
3920       /**
3921        *
3922        *
3923        * <pre>
3924        * The offset between the "first" and "second" event. It can be negative.
3925        * </pre>
3926        *
3927        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3928        */
setOffsetDuration(com.google.protobuf.Duration value)3929       public Builder setOffsetDuration(com.google.protobuf.Duration value) {
3930         if (offsetDurationBuilder_ == null) {
3931           if (value == null) {
3932             throw new NullPointerException();
3933           }
3934           offsetDuration_ = value;
3935         } else {
3936           offsetDurationBuilder_.setMessage(value);
3937         }
3938         bitField0_ |= 0x00000010;
3939         onChanged();
3940         return this;
3941       }
3942       /**
3943        *
3944        *
3945        * <pre>
3946        * The offset between the "first" and "second" event. It can be negative.
3947        * </pre>
3948        *
3949        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3950        */
setOffsetDuration(com.google.protobuf.Duration.Builder builderForValue)3951       public Builder setOffsetDuration(com.google.protobuf.Duration.Builder builderForValue) {
3952         if (offsetDurationBuilder_ == null) {
3953           offsetDuration_ = builderForValue.build();
3954         } else {
3955           offsetDurationBuilder_.setMessage(builderForValue.build());
3956         }
3957         bitField0_ |= 0x00000010;
3958         onChanged();
3959         return this;
3960       }
3961       /**
3962        *
3963        *
3964        * <pre>
3965        * The offset between the "first" and "second" event. It can be negative.
3966        * </pre>
3967        *
3968        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3969        */
mergeOffsetDuration(com.google.protobuf.Duration value)3970       public Builder mergeOffsetDuration(com.google.protobuf.Duration value) {
3971         if (offsetDurationBuilder_ == null) {
3972           if (((bitField0_ & 0x00000010) != 0)
3973               && offsetDuration_ != null
3974               && offsetDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
3975             getOffsetDurationBuilder().mergeFrom(value);
3976           } else {
3977             offsetDuration_ = value;
3978           }
3979         } else {
3980           offsetDurationBuilder_.mergeFrom(value);
3981         }
3982         bitField0_ |= 0x00000010;
3983         onChanged();
3984         return this;
3985       }
3986       /**
3987        *
3988        *
3989        * <pre>
3990        * The offset between the "first" and "second" event. It can be negative.
3991        * </pre>
3992        *
3993        * <code>.google.protobuf.Duration offset_duration = 5;</code>
3994        */
clearOffsetDuration()3995       public Builder clearOffsetDuration() {
3996         bitField0_ = (bitField0_ & ~0x00000010);
3997         offsetDuration_ = null;
3998         if (offsetDurationBuilder_ != null) {
3999           offsetDurationBuilder_.dispose();
4000           offsetDurationBuilder_ = null;
4001         }
4002         onChanged();
4003         return this;
4004       }
4005       /**
4006        *
4007        *
4008        * <pre>
4009        * The offset between the "first" and "second" event. It can be negative.
4010        * </pre>
4011        *
4012        * <code>.google.protobuf.Duration offset_duration = 5;</code>
4013        */
getOffsetDurationBuilder()4014       public com.google.protobuf.Duration.Builder getOffsetDurationBuilder() {
4015         bitField0_ |= 0x00000010;
4016         onChanged();
4017         return getOffsetDurationFieldBuilder().getBuilder();
4018       }
4019       /**
4020        *
4021        *
4022        * <pre>
4023        * The offset between the "first" and "second" event. It can be negative.
4024        * </pre>
4025        *
4026        * <code>.google.protobuf.Duration offset_duration = 5;</code>
4027        */
getOffsetDurationOrBuilder()4028       public com.google.protobuf.DurationOrBuilder getOffsetDurationOrBuilder() {
4029         if (offsetDurationBuilder_ != null) {
4030           return offsetDurationBuilder_.getMessageOrBuilder();
4031         } else {
4032           return offsetDuration_ == null
4033               ? com.google.protobuf.Duration.getDefaultInstance()
4034               : offsetDuration_;
4035         }
4036       }
4037       /**
4038        *
4039        *
4040        * <pre>
4041        * The offset between the "first" and "second" event. It can be negative.
4042        * </pre>
4043        *
4044        * <code>.google.protobuf.Duration offset_duration = 5;</code>
4045        */
4046       private com.google.protobuf.SingleFieldBuilderV3<
4047               com.google.protobuf.Duration,
4048               com.google.protobuf.Duration.Builder,
4049               com.google.protobuf.DurationOrBuilder>
getOffsetDurationFieldBuilder()4050           getOffsetDurationFieldBuilder() {
4051         if (offsetDurationBuilder_ == null) {
4052           offsetDurationBuilder_ =
4053               new com.google.protobuf.SingleFieldBuilderV3<
4054                   com.google.protobuf.Duration,
4055                   com.google.protobuf.Duration.Builder,
4056                   com.google.protobuf.DurationOrBuilder>(
4057                   getOffsetDuration(), getParentForChildren(), isClean());
4058           offsetDuration_ = null;
4059         }
4060         return offsetDurationBuilder_;
4061       }
4062 
4063       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4064       public final Builder setUnknownFields(
4065           final com.google.protobuf.UnknownFieldSet unknownFields) {
4066         return super.setUnknownFields(unknownFields);
4067       }
4068 
4069       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4070       public final Builder mergeUnknownFields(
4071           final com.google.protobuf.UnknownFieldSet unknownFields) {
4072         return super.mergeUnknownFields(unknownFields);
4073       }
4074 
4075       // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
4076     }
4077 
4078     // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.PrecedenceRule)
4079     private static final com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
4080         DEFAULT_INSTANCE;
4081 
4082     static {
4083       DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule();
4084     }
4085 
4086     public static com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
getDefaultInstance()4087         getDefaultInstance() {
4088       return DEFAULT_INSTANCE;
4089     }
4090 
4091     private static final com.google.protobuf.Parser<PrecedenceRule> PARSER =
4092         new com.google.protobuf.AbstractParser<PrecedenceRule>() {
4093           @java.lang.Override
4094           public PrecedenceRule parsePartialFrom(
4095               com.google.protobuf.CodedInputStream input,
4096               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4097               throws com.google.protobuf.InvalidProtocolBufferException {
4098             Builder builder = newBuilder();
4099             try {
4100               builder.mergeFrom(input, extensionRegistry);
4101             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4102               throw e.setUnfinishedMessage(builder.buildPartial());
4103             } catch (com.google.protobuf.UninitializedMessageException e) {
4104               throw e.asInvalidProtocolBufferException()
4105                   .setUnfinishedMessage(builder.buildPartial());
4106             } catch (java.io.IOException e) {
4107               throw new com.google.protobuf.InvalidProtocolBufferException(e)
4108                   .setUnfinishedMessage(builder.buildPartial());
4109             }
4110             return builder.buildPartial();
4111           }
4112         };
4113 
parser()4114     public static com.google.protobuf.Parser<PrecedenceRule> parser() {
4115       return PARSER;
4116     }
4117 
4118     @java.lang.Override
getParserForType()4119     public com.google.protobuf.Parser<PrecedenceRule> getParserForType() {
4120       return PARSER;
4121     }
4122 
4123     @java.lang.Override
4124     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
getDefaultInstanceForType()4125         getDefaultInstanceForType() {
4126       return DEFAULT_INSTANCE;
4127     }
4128   }
4129 
4130   @java.lang.Deprecated
4131   public interface BreakRuleOrBuilder
4132       extends
4133       // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.BreakRule)
4134       com.google.protobuf.MessageOrBuilder {
4135 
4136     /**
4137      *
4138      *
4139      * <pre>
4140      * Sequence of breaks. See the `BreakRequest` message.
4141      * </pre>
4142      *
4143      * <code>
4144      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
4145      * </code>
4146      */
4147     java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
getBreakRequestsList()4148         getBreakRequestsList();
4149     /**
4150      *
4151      *
4152      * <pre>
4153      * Sequence of breaks. See the `BreakRequest` message.
4154      * </pre>
4155      *
4156      * <code>
4157      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
4158      * </code>
4159      */
getBreakRequests( int index)4160     com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest getBreakRequests(
4161         int index);
4162     /**
4163      *
4164      *
4165      * <pre>
4166      * Sequence of breaks. See the `BreakRequest` message.
4167      * </pre>
4168      *
4169      * <code>
4170      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
4171      * </code>
4172      */
getBreakRequestsCount()4173     int getBreakRequestsCount();
4174     /**
4175      *
4176      *
4177      * <pre>
4178      * Sequence of breaks. See the `BreakRequest` message.
4179      * </pre>
4180      *
4181      * <code>
4182      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
4183      * </code>
4184      */
4185     java.util.List<
4186             ? extends
4187                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>
getBreakRequestsOrBuilderList()4188         getBreakRequestsOrBuilderList();
4189     /**
4190      *
4191      *
4192      * <pre>
4193      * Sequence of breaks. See the `BreakRequest` message.
4194      * </pre>
4195      *
4196      * <code>
4197      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
4198      * </code>
4199      */
4200     com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder
getBreakRequestsOrBuilder(int index)4201         getBreakRequestsOrBuilder(int index);
4202 
4203     /**
4204      *
4205      *
4206      * <pre>
4207      * Several `FrequencyConstraint` may apply. They must all be satisfied by
4208      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
4209      * </pre>
4210      *
4211      * <code>
4212      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
4213      * </code>
4214      */
4215     java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
getFrequencyConstraintsList()4216         getFrequencyConstraintsList();
4217     /**
4218      *
4219      *
4220      * <pre>
4221      * Several `FrequencyConstraint` may apply. They must all be satisfied by
4222      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
4223      * </pre>
4224      *
4225      * <code>
4226      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
4227      * </code>
4228      */
4229     com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getFrequencyConstraints(int index)4230         getFrequencyConstraints(int index);
4231     /**
4232      *
4233      *
4234      * <pre>
4235      * Several `FrequencyConstraint` may apply. They must all be satisfied by
4236      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
4237      * </pre>
4238      *
4239      * <code>
4240      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
4241      * </code>
4242      */
getFrequencyConstraintsCount()4243     int getFrequencyConstraintsCount();
4244     /**
4245      *
4246      *
4247      * <pre>
4248      * Several `FrequencyConstraint` may apply. They must all be satisfied by
4249      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
4250      * </pre>
4251      *
4252      * <code>
4253      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
4254      * </code>
4255      */
4256     java.util.List<
4257             ? extends
4258                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule
4259                     .FrequencyConstraintOrBuilder>
getFrequencyConstraintsOrBuilderList()4260         getFrequencyConstraintsOrBuilderList();
4261     /**
4262      *
4263      *
4264      * <pre>
4265      * Several `FrequencyConstraint` may apply. They must all be satisfied by
4266      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
4267      * </pre>
4268      *
4269      * <code>
4270      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
4271      * </code>
4272      */
4273     com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder
getFrequencyConstraintsOrBuilder(int index)4274         getFrequencyConstraintsOrBuilder(int index);
4275   }
4276   /**
4277    *
4278    *
4279    * <pre>
4280    * Deprecated: Use top level
4281    * [BreakRule][google.cloud.optimization.v1.ShipmentModel.BreakRule] instead.
4282    * Rules to generate time breaks for a vehicle (e.g. lunch
4283    * breaks). A break is a contiguous period of time during which the vehicle
4284    * remains idle at its current position and cannot perform any visit. A break
4285    * may occur:
4286    * * during the travel between two visits (which includes the time right
4287    *   before or right after a visit, but not in the middle of a visit), in
4288    *   which case it extends the corresponding transit time between the visits
4289    * * before the vehicle start (the vehicle may not start in the middle of
4290    *   a break), in which case it does not affect the vehicle start time.
4291    * * after the vehicle end (ditto, with the vehicle end time).
4292    * </pre>
4293    *
4294    * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.BreakRule}
4295    */
4296   @java.lang.Deprecated
4297   public static final class BreakRule extends com.google.protobuf.GeneratedMessageV3
4298       implements
4299       // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule)
4300       BreakRuleOrBuilder {
4301     private static final long serialVersionUID = 0L;
4302     // Use BreakRule.newBuilder() to construct.
BreakRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)4303     private BreakRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
4304       super(builder);
4305     }
4306 
BreakRule()4307     private BreakRule() {
4308       breakRequests_ = java.util.Collections.emptyList();
4309       frequencyConstraints_ = java.util.Collections.emptyList();
4310     }
4311 
4312     @java.lang.Override
4313     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)4314     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
4315       return new BreakRule();
4316     }
4317 
4318     @java.lang.Override
getUnknownFields()4319     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
4320       return this.unknownFields;
4321     }
4322 
getDescriptor()4323     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4324       return com.google.cloud.optimization.v1.FleetRoutingProto
4325           .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_descriptor;
4326     }
4327 
4328     @java.lang.Override
4329     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4330         internalGetFieldAccessorTable() {
4331       return com.google.cloud.optimization.v1.FleetRoutingProto
4332           .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_fieldAccessorTable
4333           .ensureFieldAccessorsInitialized(
4334               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.class,
4335               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder.class);
4336     }
4337 
4338     public interface BreakRequestOrBuilder
4339         extends
4340         // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
4341         com.google.protobuf.MessageOrBuilder {
4342 
4343       /**
4344        *
4345        *
4346        * <pre>
4347        * Required. Lower bound (inclusive) on the start of the break.
4348        * </pre>
4349        *
4350        * <code>
4351        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4352        * </code>
4353        *
4354        * @return Whether the earliestStartTime field is set.
4355        */
hasEarliestStartTime()4356       boolean hasEarliestStartTime();
4357       /**
4358        *
4359        *
4360        * <pre>
4361        * Required. Lower bound (inclusive) on the start of the break.
4362        * </pre>
4363        *
4364        * <code>
4365        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4366        * </code>
4367        *
4368        * @return The earliestStartTime.
4369        */
getEarliestStartTime()4370       com.google.protobuf.Timestamp getEarliestStartTime();
4371       /**
4372        *
4373        *
4374        * <pre>
4375        * Required. Lower bound (inclusive) on the start of the break.
4376        * </pre>
4377        *
4378        * <code>
4379        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4380        * </code>
4381        */
getEarliestStartTimeOrBuilder()4382       com.google.protobuf.TimestampOrBuilder getEarliestStartTimeOrBuilder();
4383 
4384       /**
4385        *
4386        *
4387        * <pre>
4388        * Required. Upper bound (inclusive) on the start of the break.
4389        * </pre>
4390        *
4391        * <code>
4392        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4393        * </code>
4394        *
4395        * @return Whether the latestStartTime field is set.
4396        */
hasLatestStartTime()4397       boolean hasLatestStartTime();
4398       /**
4399        *
4400        *
4401        * <pre>
4402        * Required. Upper bound (inclusive) on the start of the break.
4403        * </pre>
4404        *
4405        * <code>
4406        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4407        * </code>
4408        *
4409        * @return The latestStartTime.
4410        */
getLatestStartTime()4411       com.google.protobuf.Timestamp getLatestStartTime();
4412       /**
4413        *
4414        *
4415        * <pre>
4416        * Required. Upper bound (inclusive) on the start of the break.
4417        * </pre>
4418        *
4419        * <code>
4420        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4421        * </code>
4422        */
getLatestStartTimeOrBuilder()4423       com.google.protobuf.TimestampOrBuilder getLatestStartTimeOrBuilder();
4424 
4425       /**
4426        *
4427        *
4428        * <pre>
4429        * Required. Minimum duration of the break. Must be positive.
4430        * </pre>
4431        *
4432        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4433        * </code>
4434        *
4435        * @return Whether the minDuration field is set.
4436        */
hasMinDuration()4437       boolean hasMinDuration();
4438       /**
4439        *
4440        *
4441        * <pre>
4442        * Required. Minimum duration of the break. Must be positive.
4443        * </pre>
4444        *
4445        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4446        * </code>
4447        *
4448        * @return The minDuration.
4449        */
getMinDuration()4450       com.google.protobuf.Duration getMinDuration();
4451       /**
4452        *
4453        *
4454        * <pre>
4455        * Required. Minimum duration of the break. Must be positive.
4456        * </pre>
4457        *
4458        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4459        * </code>
4460        */
getMinDurationOrBuilder()4461       com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder();
4462     }
4463     /**
4464      *
4465      *
4466      * <pre>
4467      * The sequence of breaks (i.e. their number and order) that apply to each
4468      * vehicle must be known beforehand. The repeated `BreakRequest`s define
4469      * that sequence, in the order in which they must occur. Their time windows
4470      * (`earliest_start_time` / `latest_start_time`) may overlap, but they must
4471      * be compatible with the order (this is checked).
4472      * </pre>
4473      *
4474      * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest}
4475      */
4476     public static final class BreakRequest extends com.google.protobuf.GeneratedMessageV3
4477         implements
4478         // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
4479         BreakRequestOrBuilder {
4480       private static final long serialVersionUID = 0L;
4481       // Use BreakRequest.newBuilder() to construct.
BreakRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)4482       private BreakRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
4483         super(builder);
4484       }
4485 
BreakRequest()4486       private BreakRequest() {}
4487 
4488       @java.lang.Override
4489       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)4490       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
4491         return new BreakRequest();
4492       }
4493 
4494       @java.lang.Override
getUnknownFields()4495       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
4496         return this.unknownFields;
4497       }
4498 
getDescriptor()4499       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4500         return com.google.cloud.optimization.v1.FleetRoutingProto
4501             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_BreakRequest_descriptor;
4502       }
4503 
4504       @java.lang.Override
4505       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4506           internalGetFieldAccessorTable() {
4507         return com.google.cloud.optimization.v1.FleetRoutingProto
4508             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_BreakRequest_fieldAccessorTable
4509             .ensureFieldAccessorsInitialized(
4510                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.class,
4511                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
4512                     .class);
4513       }
4514 
4515       public static final int EARLIEST_START_TIME_FIELD_NUMBER = 1;
4516       private com.google.protobuf.Timestamp earliestStartTime_;
4517       /**
4518        *
4519        *
4520        * <pre>
4521        * Required. Lower bound (inclusive) on the start of the break.
4522        * </pre>
4523        *
4524        * <code>
4525        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4526        * </code>
4527        *
4528        * @return Whether the earliestStartTime field is set.
4529        */
4530       @java.lang.Override
hasEarliestStartTime()4531       public boolean hasEarliestStartTime() {
4532         return earliestStartTime_ != null;
4533       }
4534       /**
4535        *
4536        *
4537        * <pre>
4538        * Required. Lower bound (inclusive) on the start of the break.
4539        * </pre>
4540        *
4541        * <code>
4542        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4543        * </code>
4544        *
4545        * @return The earliestStartTime.
4546        */
4547       @java.lang.Override
getEarliestStartTime()4548       public com.google.protobuf.Timestamp getEarliestStartTime() {
4549         return earliestStartTime_ == null
4550             ? com.google.protobuf.Timestamp.getDefaultInstance()
4551             : earliestStartTime_;
4552       }
4553       /**
4554        *
4555        *
4556        * <pre>
4557        * Required. Lower bound (inclusive) on the start of the break.
4558        * </pre>
4559        *
4560        * <code>
4561        * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
4562        * </code>
4563        */
4564       @java.lang.Override
getEarliestStartTimeOrBuilder()4565       public com.google.protobuf.TimestampOrBuilder getEarliestStartTimeOrBuilder() {
4566         return earliestStartTime_ == null
4567             ? com.google.protobuf.Timestamp.getDefaultInstance()
4568             : earliestStartTime_;
4569       }
4570 
4571       public static final int LATEST_START_TIME_FIELD_NUMBER = 2;
4572       private com.google.protobuf.Timestamp latestStartTime_;
4573       /**
4574        *
4575        *
4576        * <pre>
4577        * Required. Upper bound (inclusive) on the start of the break.
4578        * </pre>
4579        *
4580        * <code>
4581        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4582        * </code>
4583        *
4584        * @return Whether the latestStartTime field is set.
4585        */
4586       @java.lang.Override
hasLatestStartTime()4587       public boolean hasLatestStartTime() {
4588         return latestStartTime_ != null;
4589       }
4590       /**
4591        *
4592        *
4593        * <pre>
4594        * Required. Upper bound (inclusive) on the start of the break.
4595        * </pre>
4596        *
4597        * <code>
4598        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4599        * </code>
4600        *
4601        * @return The latestStartTime.
4602        */
4603       @java.lang.Override
getLatestStartTime()4604       public com.google.protobuf.Timestamp getLatestStartTime() {
4605         return latestStartTime_ == null
4606             ? com.google.protobuf.Timestamp.getDefaultInstance()
4607             : latestStartTime_;
4608       }
4609       /**
4610        *
4611        *
4612        * <pre>
4613        * Required. Upper bound (inclusive) on the start of the break.
4614        * </pre>
4615        *
4616        * <code>
4617        * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
4618        * </code>
4619        */
4620       @java.lang.Override
getLatestStartTimeOrBuilder()4621       public com.google.protobuf.TimestampOrBuilder getLatestStartTimeOrBuilder() {
4622         return latestStartTime_ == null
4623             ? com.google.protobuf.Timestamp.getDefaultInstance()
4624             : latestStartTime_;
4625       }
4626 
4627       public static final int MIN_DURATION_FIELD_NUMBER = 3;
4628       private com.google.protobuf.Duration minDuration_;
4629       /**
4630        *
4631        *
4632        * <pre>
4633        * Required. Minimum duration of the break. Must be positive.
4634        * </pre>
4635        *
4636        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4637        * </code>
4638        *
4639        * @return Whether the minDuration field is set.
4640        */
4641       @java.lang.Override
hasMinDuration()4642       public boolean hasMinDuration() {
4643         return minDuration_ != null;
4644       }
4645       /**
4646        *
4647        *
4648        * <pre>
4649        * Required. Minimum duration of the break. Must be positive.
4650        * </pre>
4651        *
4652        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4653        * </code>
4654        *
4655        * @return The minDuration.
4656        */
4657       @java.lang.Override
getMinDuration()4658       public com.google.protobuf.Duration getMinDuration() {
4659         return minDuration_ == null
4660             ? com.google.protobuf.Duration.getDefaultInstance()
4661             : minDuration_;
4662       }
4663       /**
4664        *
4665        *
4666        * <pre>
4667        * Required. Minimum duration of the break. Must be positive.
4668        * </pre>
4669        *
4670        * <code>.google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
4671        * </code>
4672        */
4673       @java.lang.Override
getMinDurationOrBuilder()4674       public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() {
4675         return minDuration_ == null
4676             ? com.google.protobuf.Duration.getDefaultInstance()
4677             : minDuration_;
4678       }
4679 
4680       private byte memoizedIsInitialized = -1;
4681 
4682       @java.lang.Override
isInitialized()4683       public final boolean isInitialized() {
4684         byte isInitialized = memoizedIsInitialized;
4685         if (isInitialized == 1) return true;
4686         if (isInitialized == 0) return false;
4687 
4688         memoizedIsInitialized = 1;
4689         return true;
4690       }
4691 
4692       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)4693       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
4694         if (earliestStartTime_ != null) {
4695           output.writeMessage(1, getEarliestStartTime());
4696         }
4697         if (latestStartTime_ != null) {
4698           output.writeMessage(2, getLatestStartTime());
4699         }
4700         if (minDuration_ != null) {
4701           output.writeMessage(3, getMinDuration());
4702         }
4703         getUnknownFields().writeTo(output);
4704       }
4705 
4706       @java.lang.Override
getSerializedSize()4707       public int getSerializedSize() {
4708         int size = memoizedSize;
4709         if (size != -1) return size;
4710 
4711         size = 0;
4712         if (earliestStartTime_ != null) {
4713           size +=
4714               com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEarliestStartTime());
4715         }
4716         if (latestStartTime_ != null) {
4717           size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLatestStartTime());
4718         }
4719         if (minDuration_ != null) {
4720           size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMinDuration());
4721         }
4722         size += getUnknownFields().getSerializedSize();
4723         memoizedSize = size;
4724         return size;
4725       }
4726 
4727       @java.lang.Override
equals(final java.lang.Object obj)4728       public boolean equals(final java.lang.Object obj) {
4729         if (obj == this) {
4730           return true;
4731         }
4732         if (!(obj
4733             instanceof com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)) {
4734           return super.equals(obj);
4735         }
4736         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest other =
4737             (com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest) obj;
4738 
4739         if (hasEarliestStartTime() != other.hasEarliestStartTime()) return false;
4740         if (hasEarliestStartTime()) {
4741           if (!getEarliestStartTime().equals(other.getEarliestStartTime())) return false;
4742         }
4743         if (hasLatestStartTime() != other.hasLatestStartTime()) return false;
4744         if (hasLatestStartTime()) {
4745           if (!getLatestStartTime().equals(other.getLatestStartTime())) return false;
4746         }
4747         if (hasMinDuration() != other.hasMinDuration()) return false;
4748         if (hasMinDuration()) {
4749           if (!getMinDuration().equals(other.getMinDuration())) return false;
4750         }
4751         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
4752         return true;
4753       }
4754 
4755       @java.lang.Override
hashCode()4756       public int hashCode() {
4757         if (memoizedHashCode != 0) {
4758           return memoizedHashCode;
4759         }
4760         int hash = 41;
4761         hash = (19 * hash) + getDescriptor().hashCode();
4762         if (hasEarliestStartTime()) {
4763           hash = (37 * hash) + EARLIEST_START_TIME_FIELD_NUMBER;
4764           hash = (53 * hash) + getEarliestStartTime().hashCode();
4765         }
4766         if (hasLatestStartTime()) {
4767           hash = (37 * hash) + LATEST_START_TIME_FIELD_NUMBER;
4768           hash = (53 * hash) + getLatestStartTime().hashCode();
4769         }
4770         if (hasMinDuration()) {
4771           hash = (37 * hash) + MIN_DURATION_FIELD_NUMBER;
4772           hash = (53 * hash) + getMinDuration().hashCode();
4773         }
4774         hash = (29 * hash) + getUnknownFields().hashCode();
4775         memoizedHashCode = hash;
4776         return hash;
4777       }
4778 
parseFrom( java.nio.ByteBuffer data)4779       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4780           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
4781         return PARSER.parseFrom(data);
4782       }
4783 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4784       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4785           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4786           throws com.google.protobuf.InvalidProtocolBufferException {
4787         return PARSER.parseFrom(data, extensionRegistry);
4788       }
4789 
parseFrom( com.google.protobuf.ByteString data)4790       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4791           com.google.protobuf.ByteString data)
4792           throws com.google.protobuf.InvalidProtocolBufferException {
4793         return PARSER.parseFrom(data);
4794       }
4795 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4796       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4797           com.google.protobuf.ByteString data,
4798           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4799           throws com.google.protobuf.InvalidProtocolBufferException {
4800         return PARSER.parseFrom(data, extensionRegistry);
4801       }
4802 
parseFrom( byte[] data)4803       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4804           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
4805         return PARSER.parseFrom(data);
4806       }
4807 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4808       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4809           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4810           throws com.google.protobuf.InvalidProtocolBufferException {
4811         return PARSER.parseFrom(data, extensionRegistry);
4812       }
4813 
parseFrom( java.io.InputStream input)4814       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4815           java.io.InputStream input) throws java.io.IOException {
4816         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4817       }
4818 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4819       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4820           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4821           throws java.io.IOException {
4822         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4823             PARSER, input, extensionRegistry);
4824       }
4825 
4826       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
parseDelimitedFrom(java.io.InputStream input)4827           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
4828         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
4829       }
4830 
4831       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4832           parseDelimitedFrom(
4833               java.io.InputStream input,
4834               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4835               throws java.io.IOException {
4836         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
4837             PARSER, input, extensionRegistry);
4838       }
4839 
parseFrom( com.google.protobuf.CodedInputStream input)4840       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4841           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
4842         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4843       }
4844 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4845       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest parseFrom(
4846           com.google.protobuf.CodedInputStream input,
4847           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4848           throws java.io.IOException {
4849         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4850             PARSER, input, extensionRegistry);
4851       }
4852 
4853       @java.lang.Override
newBuilderForType()4854       public Builder newBuilderForType() {
4855         return newBuilder();
4856       }
4857 
newBuilder()4858       public static Builder newBuilder() {
4859         return DEFAULT_INSTANCE.toBuilder();
4860       }
4861 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest prototype)4862       public static Builder newBuilder(
4863           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest prototype) {
4864         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
4865       }
4866 
4867       @java.lang.Override
toBuilder()4868       public Builder toBuilder() {
4869         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
4870       }
4871 
4872       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4873       protected Builder newBuilderForType(
4874           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4875         Builder builder = new Builder(parent);
4876         return builder;
4877       }
4878       /**
4879        *
4880        *
4881        * <pre>
4882        * The sequence of breaks (i.e. their number and order) that apply to each
4883        * vehicle must be known beforehand. The repeated `BreakRequest`s define
4884        * that sequence, in the order in which they must occur. Their time windows
4885        * (`earliest_start_time` / `latest_start_time`) may overlap, but they must
4886        * be compatible with the order (this is checked).
4887        * </pre>
4888        *
4889        * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest}
4890        */
4891       public static final class Builder
4892           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
4893           implements
4894           // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
4895           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder {
getDescriptor()4896         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4897           return com.google.cloud.optimization.v1.FleetRoutingProto
4898               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_BreakRequest_descriptor;
4899         }
4900 
4901         @java.lang.Override
4902         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4903             internalGetFieldAccessorTable() {
4904           return com.google.cloud.optimization.v1.FleetRoutingProto
4905               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_BreakRequest_fieldAccessorTable
4906               .ensureFieldAccessorsInitialized(
4907                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.class,
4908                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
4909                       .class);
4910         }
4911 
4912         // Construct using
4913         // com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.newBuilder()
Builder()4914         private Builder() {}
4915 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4916         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4917           super(parent);
4918         }
4919 
4920         @java.lang.Override
clear()4921         public Builder clear() {
4922           super.clear();
4923           bitField0_ = 0;
4924           earliestStartTime_ = null;
4925           if (earliestStartTimeBuilder_ != null) {
4926             earliestStartTimeBuilder_.dispose();
4927             earliestStartTimeBuilder_ = null;
4928           }
4929           latestStartTime_ = null;
4930           if (latestStartTimeBuilder_ != null) {
4931             latestStartTimeBuilder_.dispose();
4932             latestStartTimeBuilder_ = null;
4933           }
4934           minDuration_ = null;
4935           if (minDurationBuilder_ != null) {
4936             minDurationBuilder_.dispose();
4937             minDurationBuilder_ = null;
4938           }
4939           return this;
4940         }
4941 
4942         @java.lang.Override
getDescriptorForType()4943         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4944           return com.google.cloud.optimization.v1.FleetRoutingProto
4945               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_BreakRequest_descriptor;
4946         }
4947 
4948         @java.lang.Override
4949         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
getDefaultInstanceForType()4950             getDefaultInstanceForType() {
4951           return com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
4952               .getDefaultInstance();
4953         }
4954 
4955         @java.lang.Override
build()4956         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest build() {
4957           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest result =
4958               buildPartial();
4959           if (!result.isInitialized()) {
4960             throw newUninitializedMessageException(result);
4961           }
4962           return result;
4963         }
4964 
4965         @java.lang.Override
4966         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
buildPartial()4967             buildPartial() {
4968           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest result =
4969               new com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest(this);
4970           if (bitField0_ != 0) {
4971             buildPartial0(result);
4972           }
4973           onBuilt();
4974           return result;
4975         }
4976 
buildPartial0( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest result)4977         private void buildPartial0(
4978             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest result) {
4979           int from_bitField0_ = bitField0_;
4980           if (((from_bitField0_ & 0x00000001) != 0)) {
4981             result.earliestStartTime_ =
4982                 earliestStartTimeBuilder_ == null
4983                     ? earliestStartTime_
4984                     : earliestStartTimeBuilder_.build();
4985           }
4986           if (((from_bitField0_ & 0x00000002) != 0)) {
4987             result.latestStartTime_ =
4988                 latestStartTimeBuilder_ == null
4989                     ? latestStartTime_
4990                     : latestStartTimeBuilder_.build();
4991           }
4992           if (((from_bitField0_ & 0x00000004) != 0)) {
4993             result.minDuration_ =
4994                 minDurationBuilder_ == null ? minDuration_ : minDurationBuilder_.build();
4995           }
4996         }
4997 
4998         @java.lang.Override
clone()4999         public Builder clone() {
5000           return super.clone();
5001         }
5002 
5003         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5004         public Builder setField(
5005             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5006           return super.setField(field, value);
5007         }
5008 
5009         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)5010         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
5011           return super.clearField(field);
5012         }
5013 
5014         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)5015         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
5016           return super.clearOneof(oneof);
5017         }
5018 
5019         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)5020         public Builder setRepeatedField(
5021             com.google.protobuf.Descriptors.FieldDescriptor field,
5022             int index,
5023             java.lang.Object value) {
5024           return super.setRepeatedField(field, index, value);
5025         }
5026 
5027         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5028         public Builder addRepeatedField(
5029             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5030           return super.addRepeatedField(field, value);
5031         }
5032 
5033         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)5034         public Builder mergeFrom(com.google.protobuf.Message other) {
5035           if (other
5036               instanceof com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest) {
5037             return mergeFrom(
5038                 (com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest) other);
5039           } else {
5040             super.mergeFrom(other);
5041             return this;
5042           }
5043         }
5044 
mergeFrom( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest other)5045         public Builder mergeFrom(
5046             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest other) {
5047           if (other
5048               == com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
5049                   .getDefaultInstance()) return this;
5050           if (other.hasEarliestStartTime()) {
5051             mergeEarliestStartTime(other.getEarliestStartTime());
5052           }
5053           if (other.hasLatestStartTime()) {
5054             mergeLatestStartTime(other.getLatestStartTime());
5055           }
5056           if (other.hasMinDuration()) {
5057             mergeMinDuration(other.getMinDuration());
5058           }
5059           this.mergeUnknownFields(other.getUnknownFields());
5060           onChanged();
5061           return this;
5062         }
5063 
5064         @java.lang.Override
isInitialized()5065         public final boolean isInitialized() {
5066           return true;
5067         }
5068 
5069         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5070         public Builder mergeFrom(
5071             com.google.protobuf.CodedInputStream input,
5072             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5073             throws java.io.IOException {
5074           if (extensionRegistry == null) {
5075             throw new java.lang.NullPointerException();
5076           }
5077           try {
5078             boolean done = false;
5079             while (!done) {
5080               int tag = input.readTag();
5081               switch (tag) {
5082                 case 0:
5083                   done = true;
5084                   break;
5085                 case 10:
5086                   {
5087                     input.readMessage(
5088                         getEarliestStartTimeFieldBuilder().getBuilder(), extensionRegistry);
5089                     bitField0_ |= 0x00000001;
5090                     break;
5091                   } // case 10
5092                 case 18:
5093                   {
5094                     input.readMessage(
5095                         getLatestStartTimeFieldBuilder().getBuilder(), extensionRegistry);
5096                     bitField0_ |= 0x00000002;
5097                     break;
5098                   } // case 18
5099                 case 26:
5100                   {
5101                     input.readMessage(getMinDurationFieldBuilder().getBuilder(), extensionRegistry);
5102                     bitField0_ |= 0x00000004;
5103                     break;
5104                   } // case 26
5105                 default:
5106                   {
5107                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
5108                       done = true; // was an endgroup tag
5109                     }
5110                     break;
5111                   } // default:
5112               } // switch (tag)
5113             } // while (!done)
5114           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5115             throw e.unwrapIOException();
5116           } finally {
5117             onChanged();
5118           } // finally
5119           return this;
5120         }
5121 
5122         private int bitField0_;
5123 
5124         private com.google.protobuf.Timestamp earliestStartTime_;
5125         private com.google.protobuf.SingleFieldBuilderV3<
5126                 com.google.protobuf.Timestamp,
5127                 com.google.protobuf.Timestamp.Builder,
5128                 com.google.protobuf.TimestampOrBuilder>
5129             earliestStartTimeBuilder_;
5130         /**
5131          *
5132          *
5133          * <pre>
5134          * Required. Lower bound (inclusive) on the start of the break.
5135          * </pre>
5136          *
5137          * <code>
5138          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5139          * </code>
5140          *
5141          * @return Whether the earliestStartTime field is set.
5142          */
hasEarliestStartTime()5143         public boolean hasEarliestStartTime() {
5144           return ((bitField0_ & 0x00000001) != 0);
5145         }
5146         /**
5147          *
5148          *
5149          * <pre>
5150          * Required. Lower bound (inclusive) on the start of the break.
5151          * </pre>
5152          *
5153          * <code>
5154          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5155          * </code>
5156          *
5157          * @return The earliestStartTime.
5158          */
getEarliestStartTime()5159         public com.google.protobuf.Timestamp getEarliestStartTime() {
5160           if (earliestStartTimeBuilder_ == null) {
5161             return earliestStartTime_ == null
5162                 ? com.google.protobuf.Timestamp.getDefaultInstance()
5163                 : earliestStartTime_;
5164           } else {
5165             return earliestStartTimeBuilder_.getMessage();
5166           }
5167         }
5168         /**
5169          *
5170          *
5171          * <pre>
5172          * Required. Lower bound (inclusive) on the start of the break.
5173          * </pre>
5174          *
5175          * <code>
5176          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5177          * </code>
5178          */
setEarliestStartTime(com.google.protobuf.Timestamp value)5179         public Builder setEarliestStartTime(com.google.protobuf.Timestamp value) {
5180           if (earliestStartTimeBuilder_ == null) {
5181             if (value == null) {
5182               throw new NullPointerException();
5183             }
5184             earliestStartTime_ = value;
5185           } else {
5186             earliestStartTimeBuilder_.setMessage(value);
5187           }
5188           bitField0_ |= 0x00000001;
5189           onChanged();
5190           return this;
5191         }
5192         /**
5193          *
5194          *
5195          * <pre>
5196          * Required. Lower bound (inclusive) on the start of the break.
5197          * </pre>
5198          *
5199          * <code>
5200          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5201          * </code>
5202          */
setEarliestStartTime(com.google.protobuf.Timestamp.Builder builderForValue)5203         public Builder setEarliestStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
5204           if (earliestStartTimeBuilder_ == null) {
5205             earliestStartTime_ = builderForValue.build();
5206           } else {
5207             earliestStartTimeBuilder_.setMessage(builderForValue.build());
5208           }
5209           bitField0_ |= 0x00000001;
5210           onChanged();
5211           return this;
5212         }
5213         /**
5214          *
5215          *
5216          * <pre>
5217          * Required. Lower bound (inclusive) on the start of the break.
5218          * </pre>
5219          *
5220          * <code>
5221          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5222          * </code>
5223          */
mergeEarliestStartTime(com.google.protobuf.Timestamp value)5224         public Builder mergeEarliestStartTime(com.google.protobuf.Timestamp value) {
5225           if (earliestStartTimeBuilder_ == null) {
5226             if (((bitField0_ & 0x00000001) != 0)
5227                 && earliestStartTime_ != null
5228                 && earliestStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
5229               getEarliestStartTimeBuilder().mergeFrom(value);
5230             } else {
5231               earliestStartTime_ = value;
5232             }
5233           } else {
5234             earliestStartTimeBuilder_.mergeFrom(value);
5235           }
5236           bitField0_ |= 0x00000001;
5237           onChanged();
5238           return this;
5239         }
5240         /**
5241          *
5242          *
5243          * <pre>
5244          * Required. Lower bound (inclusive) on the start of the break.
5245          * </pre>
5246          *
5247          * <code>
5248          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5249          * </code>
5250          */
clearEarliestStartTime()5251         public Builder clearEarliestStartTime() {
5252           bitField0_ = (bitField0_ & ~0x00000001);
5253           earliestStartTime_ = null;
5254           if (earliestStartTimeBuilder_ != null) {
5255             earliestStartTimeBuilder_.dispose();
5256             earliestStartTimeBuilder_ = null;
5257           }
5258           onChanged();
5259           return this;
5260         }
5261         /**
5262          *
5263          *
5264          * <pre>
5265          * Required. Lower bound (inclusive) on the start of the break.
5266          * </pre>
5267          *
5268          * <code>
5269          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5270          * </code>
5271          */
getEarliestStartTimeBuilder()5272         public com.google.protobuf.Timestamp.Builder getEarliestStartTimeBuilder() {
5273           bitField0_ |= 0x00000001;
5274           onChanged();
5275           return getEarliestStartTimeFieldBuilder().getBuilder();
5276         }
5277         /**
5278          *
5279          *
5280          * <pre>
5281          * Required. Lower bound (inclusive) on the start of the break.
5282          * </pre>
5283          *
5284          * <code>
5285          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5286          * </code>
5287          */
getEarliestStartTimeOrBuilder()5288         public com.google.protobuf.TimestampOrBuilder getEarliestStartTimeOrBuilder() {
5289           if (earliestStartTimeBuilder_ != null) {
5290             return earliestStartTimeBuilder_.getMessageOrBuilder();
5291           } else {
5292             return earliestStartTime_ == null
5293                 ? com.google.protobuf.Timestamp.getDefaultInstance()
5294                 : earliestStartTime_;
5295           }
5296         }
5297         /**
5298          *
5299          *
5300          * <pre>
5301          * Required. Lower bound (inclusive) on the start of the break.
5302          * </pre>
5303          *
5304          * <code>
5305          * .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED];
5306          * </code>
5307          */
5308         private com.google.protobuf.SingleFieldBuilderV3<
5309                 com.google.protobuf.Timestamp,
5310                 com.google.protobuf.Timestamp.Builder,
5311                 com.google.protobuf.TimestampOrBuilder>
getEarliestStartTimeFieldBuilder()5312             getEarliestStartTimeFieldBuilder() {
5313           if (earliestStartTimeBuilder_ == null) {
5314             earliestStartTimeBuilder_ =
5315                 new com.google.protobuf.SingleFieldBuilderV3<
5316                     com.google.protobuf.Timestamp,
5317                     com.google.protobuf.Timestamp.Builder,
5318                     com.google.protobuf.TimestampOrBuilder>(
5319                     getEarliestStartTime(), getParentForChildren(), isClean());
5320             earliestStartTime_ = null;
5321           }
5322           return earliestStartTimeBuilder_;
5323         }
5324 
5325         private com.google.protobuf.Timestamp latestStartTime_;
5326         private com.google.protobuf.SingleFieldBuilderV3<
5327                 com.google.protobuf.Timestamp,
5328                 com.google.protobuf.Timestamp.Builder,
5329                 com.google.protobuf.TimestampOrBuilder>
5330             latestStartTimeBuilder_;
5331         /**
5332          *
5333          *
5334          * <pre>
5335          * Required. Upper bound (inclusive) on the start of the break.
5336          * </pre>
5337          *
5338          * <code>
5339          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5340          * </code>
5341          *
5342          * @return Whether the latestStartTime field is set.
5343          */
hasLatestStartTime()5344         public boolean hasLatestStartTime() {
5345           return ((bitField0_ & 0x00000002) != 0);
5346         }
5347         /**
5348          *
5349          *
5350          * <pre>
5351          * Required. Upper bound (inclusive) on the start of the break.
5352          * </pre>
5353          *
5354          * <code>
5355          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5356          * </code>
5357          *
5358          * @return The latestStartTime.
5359          */
getLatestStartTime()5360         public com.google.protobuf.Timestamp getLatestStartTime() {
5361           if (latestStartTimeBuilder_ == null) {
5362             return latestStartTime_ == null
5363                 ? com.google.protobuf.Timestamp.getDefaultInstance()
5364                 : latestStartTime_;
5365           } else {
5366             return latestStartTimeBuilder_.getMessage();
5367           }
5368         }
5369         /**
5370          *
5371          *
5372          * <pre>
5373          * Required. Upper bound (inclusive) on the start of the break.
5374          * </pre>
5375          *
5376          * <code>
5377          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5378          * </code>
5379          */
setLatestStartTime(com.google.protobuf.Timestamp value)5380         public Builder setLatestStartTime(com.google.protobuf.Timestamp value) {
5381           if (latestStartTimeBuilder_ == null) {
5382             if (value == null) {
5383               throw new NullPointerException();
5384             }
5385             latestStartTime_ = value;
5386           } else {
5387             latestStartTimeBuilder_.setMessage(value);
5388           }
5389           bitField0_ |= 0x00000002;
5390           onChanged();
5391           return this;
5392         }
5393         /**
5394          *
5395          *
5396          * <pre>
5397          * Required. Upper bound (inclusive) on the start of the break.
5398          * </pre>
5399          *
5400          * <code>
5401          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5402          * </code>
5403          */
setLatestStartTime(com.google.protobuf.Timestamp.Builder builderForValue)5404         public Builder setLatestStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
5405           if (latestStartTimeBuilder_ == null) {
5406             latestStartTime_ = builderForValue.build();
5407           } else {
5408             latestStartTimeBuilder_.setMessage(builderForValue.build());
5409           }
5410           bitField0_ |= 0x00000002;
5411           onChanged();
5412           return this;
5413         }
5414         /**
5415          *
5416          *
5417          * <pre>
5418          * Required. Upper bound (inclusive) on the start of the break.
5419          * </pre>
5420          *
5421          * <code>
5422          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5423          * </code>
5424          */
mergeLatestStartTime(com.google.protobuf.Timestamp value)5425         public Builder mergeLatestStartTime(com.google.protobuf.Timestamp value) {
5426           if (latestStartTimeBuilder_ == null) {
5427             if (((bitField0_ & 0x00000002) != 0)
5428                 && latestStartTime_ != null
5429                 && latestStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
5430               getLatestStartTimeBuilder().mergeFrom(value);
5431             } else {
5432               latestStartTime_ = value;
5433             }
5434           } else {
5435             latestStartTimeBuilder_.mergeFrom(value);
5436           }
5437           bitField0_ |= 0x00000002;
5438           onChanged();
5439           return this;
5440         }
5441         /**
5442          *
5443          *
5444          * <pre>
5445          * Required. Upper bound (inclusive) on the start of the break.
5446          * </pre>
5447          *
5448          * <code>
5449          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5450          * </code>
5451          */
clearLatestStartTime()5452         public Builder clearLatestStartTime() {
5453           bitField0_ = (bitField0_ & ~0x00000002);
5454           latestStartTime_ = null;
5455           if (latestStartTimeBuilder_ != null) {
5456             latestStartTimeBuilder_.dispose();
5457             latestStartTimeBuilder_ = null;
5458           }
5459           onChanged();
5460           return this;
5461         }
5462         /**
5463          *
5464          *
5465          * <pre>
5466          * Required. Upper bound (inclusive) on the start of the break.
5467          * </pre>
5468          *
5469          * <code>
5470          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5471          * </code>
5472          */
getLatestStartTimeBuilder()5473         public com.google.protobuf.Timestamp.Builder getLatestStartTimeBuilder() {
5474           bitField0_ |= 0x00000002;
5475           onChanged();
5476           return getLatestStartTimeFieldBuilder().getBuilder();
5477         }
5478         /**
5479          *
5480          *
5481          * <pre>
5482          * Required. Upper bound (inclusive) on the start of the break.
5483          * </pre>
5484          *
5485          * <code>
5486          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5487          * </code>
5488          */
getLatestStartTimeOrBuilder()5489         public com.google.protobuf.TimestampOrBuilder getLatestStartTimeOrBuilder() {
5490           if (latestStartTimeBuilder_ != null) {
5491             return latestStartTimeBuilder_.getMessageOrBuilder();
5492           } else {
5493             return latestStartTime_ == null
5494                 ? com.google.protobuf.Timestamp.getDefaultInstance()
5495                 : latestStartTime_;
5496           }
5497         }
5498         /**
5499          *
5500          *
5501          * <pre>
5502          * Required. Upper bound (inclusive) on the start of the break.
5503          * </pre>
5504          *
5505          * <code>
5506          * .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED];
5507          * </code>
5508          */
5509         private com.google.protobuf.SingleFieldBuilderV3<
5510                 com.google.protobuf.Timestamp,
5511                 com.google.protobuf.Timestamp.Builder,
5512                 com.google.protobuf.TimestampOrBuilder>
getLatestStartTimeFieldBuilder()5513             getLatestStartTimeFieldBuilder() {
5514           if (latestStartTimeBuilder_ == null) {
5515             latestStartTimeBuilder_ =
5516                 new com.google.protobuf.SingleFieldBuilderV3<
5517                     com.google.protobuf.Timestamp,
5518                     com.google.protobuf.Timestamp.Builder,
5519                     com.google.protobuf.TimestampOrBuilder>(
5520                     getLatestStartTime(), getParentForChildren(), isClean());
5521             latestStartTime_ = null;
5522           }
5523           return latestStartTimeBuilder_;
5524         }
5525 
5526         private com.google.protobuf.Duration minDuration_;
5527         private com.google.protobuf.SingleFieldBuilderV3<
5528                 com.google.protobuf.Duration,
5529                 com.google.protobuf.Duration.Builder,
5530                 com.google.protobuf.DurationOrBuilder>
5531             minDurationBuilder_;
5532         /**
5533          *
5534          *
5535          * <pre>
5536          * Required. Minimum duration of the break. Must be positive.
5537          * </pre>
5538          *
5539          * <code>
5540          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5541          * </code>
5542          *
5543          * @return Whether the minDuration field is set.
5544          */
hasMinDuration()5545         public boolean hasMinDuration() {
5546           return ((bitField0_ & 0x00000004) != 0);
5547         }
5548         /**
5549          *
5550          *
5551          * <pre>
5552          * Required. Minimum duration of the break. Must be positive.
5553          * </pre>
5554          *
5555          * <code>
5556          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5557          * </code>
5558          *
5559          * @return The minDuration.
5560          */
getMinDuration()5561         public com.google.protobuf.Duration getMinDuration() {
5562           if (minDurationBuilder_ == null) {
5563             return minDuration_ == null
5564                 ? com.google.protobuf.Duration.getDefaultInstance()
5565                 : minDuration_;
5566           } else {
5567             return minDurationBuilder_.getMessage();
5568           }
5569         }
5570         /**
5571          *
5572          *
5573          * <pre>
5574          * Required. Minimum duration of the break. Must be positive.
5575          * </pre>
5576          *
5577          * <code>
5578          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5579          * </code>
5580          */
setMinDuration(com.google.protobuf.Duration value)5581         public Builder setMinDuration(com.google.protobuf.Duration value) {
5582           if (minDurationBuilder_ == null) {
5583             if (value == null) {
5584               throw new NullPointerException();
5585             }
5586             minDuration_ = value;
5587           } else {
5588             minDurationBuilder_.setMessage(value);
5589           }
5590           bitField0_ |= 0x00000004;
5591           onChanged();
5592           return this;
5593         }
5594         /**
5595          *
5596          *
5597          * <pre>
5598          * Required. Minimum duration of the break. Must be positive.
5599          * </pre>
5600          *
5601          * <code>
5602          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5603          * </code>
5604          */
setMinDuration(com.google.protobuf.Duration.Builder builderForValue)5605         public Builder setMinDuration(com.google.protobuf.Duration.Builder builderForValue) {
5606           if (minDurationBuilder_ == null) {
5607             minDuration_ = builderForValue.build();
5608           } else {
5609             minDurationBuilder_.setMessage(builderForValue.build());
5610           }
5611           bitField0_ |= 0x00000004;
5612           onChanged();
5613           return this;
5614         }
5615         /**
5616          *
5617          *
5618          * <pre>
5619          * Required. Minimum duration of the break. Must be positive.
5620          * </pre>
5621          *
5622          * <code>
5623          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5624          * </code>
5625          */
mergeMinDuration(com.google.protobuf.Duration value)5626         public Builder mergeMinDuration(com.google.protobuf.Duration value) {
5627           if (minDurationBuilder_ == null) {
5628             if (((bitField0_ & 0x00000004) != 0)
5629                 && minDuration_ != null
5630                 && minDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
5631               getMinDurationBuilder().mergeFrom(value);
5632             } else {
5633               minDuration_ = value;
5634             }
5635           } else {
5636             minDurationBuilder_.mergeFrom(value);
5637           }
5638           bitField0_ |= 0x00000004;
5639           onChanged();
5640           return this;
5641         }
5642         /**
5643          *
5644          *
5645          * <pre>
5646          * Required. Minimum duration of the break. Must be positive.
5647          * </pre>
5648          *
5649          * <code>
5650          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5651          * </code>
5652          */
clearMinDuration()5653         public Builder clearMinDuration() {
5654           bitField0_ = (bitField0_ & ~0x00000004);
5655           minDuration_ = null;
5656           if (minDurationBuilder_ != null) {
5657             minDurationBuilder_.dispose();
5658             minDurationBuilder_ = null;
5659           }
5660           onChanged();
5661           return this;
5662         }
5663         /**
5664          *
5665          *
5666          * <pre>
5667          * Required. Minimum duration of the break. Must be positive.
5668          * </pre>
5669          *
5670          * <code>
5671          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5672          * </code>
5673          */
getMinDurationBuilder()5674         public com.google.protobuf.Duration.Builder getMinDurationBuilder() {
5675           bitField0_ |= 0x00000004;
5676           onChanged();
5677           return getMinDurationFieldBuilder().getBuilder();
5678         }
5679         /**
5680          *
5681          *
5682          * <pre>
5683          * Required. Minimum duration of the break. Must be positive.
5684          * </pre>
5685          *
5686          * <code>
5687          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5688          * </code>
5689          */
getMinDurationOrBuilder()5690         public com.google.protobuf.DurationOrBuilder getMinDurationOrBuilder() {
5691           if (minDurationBuilder_ != null) {
5692             return minDurationBuilder_.getMessageOrBuilder();
5693           } else {
5694             return minDuration_ == null
5695                 ? com.google.protobuf.Duration.getDefaultInstance()
5696                 : minDuration_;
5697           }
5698         }
5699         /**
5700          *
5701          *
5702          * <pre>
5703          * Required. Minimum duration of the break. Must be positive.
5704          * </pre>
5705          *
5706          * <code>
5707          * .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED];
5708          * </code>
5709          */
5710         private com.google.protobuf.SingleFieldBuilderV3<
5711                 com.google.protobuf.Duration,
5712                 com.google.protobuf.Duration.Builder,
5713                 com.google.protobuf.DurationOrBuilder>
getMinDurationFieldBuilder()5714             getMinDurationFieldBuilder() {
5715           if (minDurationBuilder_ == null) {
5716             minDurationBuilder_ =
5717                 new com.google.protobuf.SingleFieldBuilderV3<
5718                     com.google.protobuf.Duration,
5719                     com.google.protobuf.Duration.Builder,
5720                     com.google.protobuf.DurationOrBuilder>(
5721                     getMinDuration(), getParentForChildren(), isClean());
5722             minDuration_ = null;
5723           }
5724           return minDurationBuilder_;
5725         }
5726 
5727         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5728         public final Builder setUnknownFields(
5729             final com.google.protobuf.UnknownFieldSet unknownFields) {
5730           return super.setUnknownFields(unknownFields);
5731         }
5732 
5733         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5734         public final Builder mergeUnknownFields(
5735             final com.google.protobuf.UnknownFieldSet unknownFields) {
5736           return super.mergeUnknownFields(unknownFields);
5737         }
5738 
5739         // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
5740       }
5741 
5742       // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest)
5743       private static final com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
5744           DEFAULT_INSTANCE;
5745 
5746       static {
5747         DEFAULT_INSTANCE =
5748             new com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest();
5749       }
5750 
5751       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
getDefaultInstance()5752           getDefaultInstance() {
5753         return DEFAULT_INSTANCE;
5754       }
5755 
5756       private static final com.google.protobuf.Parser<BreakRequest> PARSER =
5757           new com.google.protobuf.AbstractParser<BreakRequest>() {
5758             @java.lang.Override
5759             public BreakRequest parsePartialFrom(
5760                 com.google.protobuf.CodedInputStream input,
5761                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5762                 throws com.google.protobuf.InvalidProtocolBufferException {
5763               Builder builder = newBuilder();
5764               try {
5765                 builder.mergeFrom(input, extensionRegistry);
5766               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5767                 throw e.setUnfinishedMessage(builder.buildPartial());
5768               } catch (com.google.protobuf.UninitializedMessageException e) {
5769                 throw e.asInvalidProtocolBufferException()
5770                     .setUnfinishedMessage(builder.buildPartial());
5771               } catch (java.io.IOException e) {
5772                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
5773                     .setUnfinishedMessage(builder.buildPartial());
5774               }
5775               return builder.buildPartial();
5776             }
5777           };
5778 
parser()5779       public static com.google.protobuf.Parser<BreakRequest> parser() {
5780         return PARSER;
5781       }
5782 
5783       @java.lang.Override
getParserForType()5784       public com.google.protobuf.Parser<BreakRequest> getParserForType() {
5785         return PARSER;
5786       }
5787 
5788       @java.lang.Override
5789       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
getDefaultInstanceForType()5790           getDefaultInstanceForType() {
5791         return DEFAULT_INSTANCE;
5792       }
5793     }
5794 
5795     public interface FrequencyConstraintOrBuilder
5796         extends
5797         // @@protoc_insertion_point(interface_extends:google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
5798         com.google.protobuf.MessageOrBuilder {
5799 
5800       /**
5801        *
5802        *
5803        * <pre>
5804        * Required. Minimum break duration for this constraint. Nonnegative.
5805        * See description of `FrequencyConstraint`.
5806        * </pre>
5807        *
5808        * <code>
5809        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
5810        * </code>
5811        *
5812        * @return Whether the minBreakDuration field is set.
5813        */
hasMinBreakDuration()5814       boolean hasMinBreakDuration();
5815       /**
5816        *
5817        *
5818        * <pre>
5819        * Required. Minimum break duration for this constraint. Nonnegative.
5820        * See description of `FrequencyConstraint`.
5821        * </pre>
5822        *
5823        * <code>
5824        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
5825        * </code>
5826        *
5827        * @return The minBreakDuration.
5828        */
getMinBreakDuration()5829       com.google.protobuf.Duration getMinBreakDuration();
5830       /**
5831        *
5832        *
5833        * <pre>
5834        * Required. Minimum break duration for this constraint. Nonnegative.
5835        * See description of `FrequencyConstraint`.
5836        * </pre>
5837        *
5838        * <code>
5839        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
5840        * </code>
5841        */
getMinBreakDurationOrBuilder()5842       com.google.protobuf.DurationOrBuilder getMinBreakDurationOrBuilder();
5843 
5844       /**
5845        *
5846        *
5847        * <pre>
5848        * Required. Maximum allowed span of any interval of time in the route
5849        * that does not include at least partially a break of `duration &gt;=
5850        * min_break_duration`. Must be positive.
5851        * </pre>
5852        *
5853        * <code>
5854        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
5855        * </code>
5856        *
5857        * @return Whether the maxInterBreakDuration field is set.
5858        */
hasMaxInterBreakDuration()5859       boolean hasMaxInterBreakDuration();
5860       /**
5861        *
5862        *
5863        * <pre>
5864        * Required. Maximum allowed span of any interval of time in the route
5865        * that does not include at least partially a break of `duration &gt;=
5866        * min_break_duration`. Must be positive.
5867        * </pre>
5868        *
5869        * <code>
5870        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
5871        * </code>
5872        *
5873        * @return The maxInterBreakDuration.
5874        */
getMaxInterBreakDuration()5875       com.google.protobuf.Duration getMaxInterBreakDuration();
5876       /**
5877        *
5878        *
5879        * <pre>
5880        * Required. Maximum allowed span of any interval of time in the route
5881        * that does not include at least partially a break of `duration &gt;=
5882        * min_break_duration`. Must be positive.
5883        * </pre>
5884        *
5885        * <code>
5886        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
5887        * </code>
5888        */
getMaxInterBreakDurationOrBuilder()5889       com.google.protobuf.DurationOrBuilder getMaxInterBreakDurationOrBuilder();
5890     }
5891     /**
5892      *
5893      *
5894      * <pre>
5895      * One may further constrain the frequency and duration of the breaks
5896      * specified above, by enforcing a minimum break frequency, such as
5897      * "There must be a break of at least 1 hour every 12 hours". Assuming that
5898      * this can be interpreted as "Within any sliding time window of 12h, there
5899      * must be at least one break of at least one hour", that example would
5900      * translate to the following `FrequencyConstraint`:
5901      * ```
5902      * {
5903      *    min_break_duration { seconds: 3600 }         # 1 hour.
5904      *    max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
5905      * }
5906      * ```
5907      * The timing and duration of the breaks in the solution will respect all
5908      * such constraints, in addition to the time windows and minimum durations
5909      * already specified in the `BreakRequest`.
5910      * A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
5911      * For example, the following schedule honors the "1h every 12h" example:
5912      * ```
5913      *   04:00 vehicle start
5914      *    .. performing travel and visits ..
5915      *   09:00 1 hour break
5916      *   10:00 end of the break
5917      *    .. performing travel and visits ..
5918      *   12:00 20-min lunch break
5919      *   12:20 end of the break
5920      *    .. performing travel and visits ..
5921      *   21:00 1 hour break
5922      *   22:00 end of the break
5923      *    .. performing travel and visits ..
5924      *   23:59 vehicle end
5925      * ```
5926      * </pre>
5927      *
5928      * Protobuf type {@code
5929      * google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint}
5930      */
5931     public static final class FrequencyConstraint extends com.google.protobuf.GeneratedMessageV3
5932         implements
5933         // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
5934         FrequencyConstraintOrBuilder {
5935       private static final long serialVersionUID = 0L;
5936       // Use FrequencyConstraint.newBuilder() to construct.
FrequencyConstraint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)5937       private FrequencyConstraint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
5938         super(builder);
5939       }
5940 
FrequencyConstraint()5941       private FrequencyConstraint() {}
5942 
5943       @java.lang.Override
5944       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)5945       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
5946         return new FrequencyConstraint();
5947       }
5948 
5949       @java.lang.Override
getUnknownFields()5950       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5951         return this.unknownFields;
5952       }
5953 
getDescriptor()5954       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
5955         return com.google.cloud.optimization.v1.FleetRoutingProto
5956             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_FrequencyConstraint_descriptor;
5957       }
5958 
5959       @java.lang.Override
5960       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()5961           internalGetFieldAccessorTable() {
5962         return com.google.cloud.optimization.v1.FleetRoutingProto
5963             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_FrequencyConstraint_fieldAccessorTable
5964             .ensureFieldAccessorsInitialized(
5965                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.class,
5966                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
5967                     .class);
5968       }
5969 
5970       public static final int MIN_BREAK_DURATION_FIELD_NUMBER = 1;
5971       private com.google.protobuf.Duration minBreakDuration_;
5972       /**
5973        *
5974        *
5975        * <pre>
5976        * Required. Minimum break duration for this constraint. Nonnegative.
5977        * See description of `FrequencyConstraint`.
5978        * </pre>
5979        *
5980        * <code>
5981        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
5982        * </code>
5983        *
5984        * @return Whether the minBreakDuration field is set.
5985        */
5986       @java.lang.Override
hasMinBreakDuration()5987       public boolean hasMinBreakDuration() {
5988         return minBreakDuration_ != null;
5989       }
5990       /**
5991        *
5992        *
5993        * <pre>
5994        * Required. Minimum break duration for this constraint. Nonnegative.
5995        * See description of `FrequencyConstraint`.
5996        * </pre>
5997        *
5998        * <code>
5999        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6000        * </code>
6001        *
6002        * @return The minBreakDuration.
6003        */
6004       @java.lang.Override
getMinBreakDuration()6005       public com.google.protobuf.Duration getMinBreakDuration() {
6006         return minBreakDuration_ == null
6007             ? com.google.protobuf.Duration.getDefaultInstance()
6008             : minBreakDuration_;
6009       }
6010       /**
6011        *
6012        *
6013        * <pre>
6014        * Required. Minimum break duration for this constraint. Nonnegative.
6015        * See description of `FrequencyConstraint`.
6016        * </pre>
6017        *
6018        * <code>
6019        * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6020        * </code>
6021        */
6022       @java.lang.Override
getMinBreakDurationOrBuilder()6023       public com.google.protobuf.DurationOrBuilder getMinBreakDurationOrBuilder() {
6024         return minBreakDuration_ == null
6025             ? com.google.protobuf.Duration.getDefaultInstance()
6026             : minBreakDuration_;
6027       }
6028 
6029       public static final int MAX_INTER_BREAK_DURATION_FIELD_NUMBER = 2;
6030       private com.google.protobuf.Duration maxInterBreakDuration_;
6031       /**
6032        *
6033        *
6034        * <pre>
6035        * Required. Maximum allowed span of any interval of time in the route
6036        * that does not include at least partially a break of `duration &gt;=
6037        * min_break_duration`. Must be positive.
6038        * </pre>
6039        *
6040        * <code>
6041        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6042        * </code>
6043        *
6044        * @return Whether the maxInterBreakDuration field is set.
6045        */
6046       @java.lang.Override
hasMaxInterBreakDuration()6047       public boolean hasMaxInterBreakDuration() {
6048         return maxInterBreakDuration_ != null;
6049       }
6050       /**
6051        *
6052        *
6053        * <pre>
6054        * Required. Maximum allowed span of any interval of time in the route
6055        * that does not include at least partially a break of `duration &gt;=
6056        * min_break_duration`. Must be positive.
6057        * </pre>
6058        *
6059        * <code>
6060        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6061        * </code>
6062        *
6063        * @return The maxInterBreakDuration.
6064        */
6065       @java.lang.Override
getMaxInterBreakDuration()6066       public com.google.protobuf.Duration getMaxInterBreakDuration() {
6067         return maxInterBreakDuration_ == null
6068             ? com.google.protobuf.Duration.getDefaultInstance()
6069             : maxInterBreakDuration_;
6070       }
6071       /**
6072        *
6073        *
6074        * <pre>
6075        * Required. Maximum allowed span of any interval of time in the route
6076        * that does not include at least partially a break of `duration &gt;=
6077        * min_break_duration`. Must be positive.
6078        * </pre>
6079        *
6080        * <code>
6081        * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6082        * </code>
6083        */
6084       @java.lang.Override
getMaxInterBreakDurationOrBuilder()6085       public com.google.protobuf.DurationOrBuilder getMaxInterBreakDurationOrBuilder() {
6086         return maxInterBreakDuration_ == null
6087             ? com.google.protobuf.Duration.getDefaultInstance()
6088             : maxInterBreakDuration_;
6089       }
6090 
6091       private byte memoizedIsInitialized = -1;
6092 
6093       @java.lang.Override
isInitialized()6094       public final boolean isInitialized() {
6095         byte isInitialized = memoizedIsInitialized;
6096         if (isInitialized == 1) return true;
6097         if (isInitialized == 0) return false;
6098 
6099         memoizedIsInitialized = 1;
6100         return true;
6101       }
6102 
6103       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)6104       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
6105         if (minBreakDuration_ != null) {
6106           output.writeMessage(1, getMinBreakDuration());
6107         }
6108         if (maxInterBreakDuration_ != null) {
6109           output.writeMessage(2, getMaxInterBreakDuration());
6110         }
6111         getUnknownFields().writeTo(output);
6112       }
6113 
6114       @java.lang.Override
getSerializedSize()6115       public int getSerializedSize() {
6116         int size = memoizedSize;
6117         if (size != -1) return size;
6118 
6119         size = 0;
6120         if (minBreakDuration_ != null) {
6121           size +=
6122               com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMinBreakDuration());
6123         }
6124         if (maxInterBreakDuration_ != null) {
6125           size +=
6126               com.google.protobuf.CodedOutputStream.computeMessageSize(
6127                   2, getMaxInterBreakDuration());
6128         }
6129         size += getUnknownFields().getSerializedSize();
6130         memoizedSize = size;
6131         return size;
6132       }
6133 
6134       @java.lang.Override
equals(final java.lang.Object obj)6135       public boolean equals(final java.lang.Object obj) {
6136         if (obj == this) {
6137           return true;
6138         }
6139         if (!(obj
6140             instanceof
6141             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)) {
6142           return super.equals(obj);
6143         }
6144         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint other =
6145             (com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint) obj;
6146 
6147         if (hasMinBreakDuration() != other.hasMinBreakDuration()) return false;
6148         if (hasMinBreakDuration()) {
6149           if (!getMinBreakDuration().equals(other.getMinBreakDuration())) return false;
6150         }
6151         if (hasMaxInterBreakDuration() != other.hasMaxInterBreakDuration()) return false;
6152         if (hasMaxInterBreakDuration()) {
6153           if (!getMaxInterBreakDuration().equals(other.getMaxInterBreakDuration())) return false;
6154         }
6155         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
6156         return true;
6157       }
6158 
6159       @java.lang.Override
hashCode()6160       public int hashCode() {
6161         if (memoizedHashCode != 0) {
6162           return memoizedHashCode;
6163         }
6164         int hash = 41;
6165         hash = (19 * hash) + getDescriptor().hashCode();
6166         if (hasMinBreakDuration()) {
6167           hash = (37 * hash) + MIN_BREAK_DURATION_FIELD_NUMBER;
6168           hash = (53 * hash) + getMinBreakDuration().hashCode();
6169         }
6170         if (hasMaxInterBreakDuration()) {
6171           hash = (37 * hash) + MAX_INTER_BREAK_DURATION_FIELD_NUMBER;
6172           hash = (53 * hash) + getMaxInterBreakDuration().hashCode();
6173         }
6174         hash = (29 * hash) + getUnknownFields().hashCode();
6175         memoizedHashCode = hash;
6176         return hash;
6177       }
6178 
6179       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(java.nio.ByteBuffer data)6180           parseFrom(java.nio.ByteBuffer data)
6181               throws com.google.protobuf.InvalidProtocolBufferException {
6182         return PARSER.parseFrom(data);
6183       }
6184 
6185       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6186           parseFrom(
6187               java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6188               throws com.google.protobuf.InvalidProtocolBufferException {
6189         return PARSER.parseFrom(data, extensionRegistry);
6190       }
6191 
6192       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(com.google.protobuf.ByteString data)6193           parseFrom(com.google.protobuf.ByteString data)
6194               throws com.google.protobuf.InvalidProtocolBufferException {
6195         return PARSER.parseFrom(data);
6196       }
6197 
6198       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6199           parseFrom(
6200               com.google.protobuf.ByteString data,
6201               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6202               throws com.google.protobuf.InvalidProtocolBufferException {
6203         return PARSER.parseFrom(data, extensionRegistry);
6204       }
6205 
6206       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(byte[] data)6207           parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
6208         return PARSER.parseFrom(data);
6209       }
6210 
6211       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6212           parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6213               throws com.google.protobuf.InvalidProtocolBufferException {
6214         return PARSER.parseFrom(data, extensionRegistry);
6215       }
6216 
6217       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(java.io.InputStream input)6218           parseFrom(java.io.InputStream input) throws java.io.IOException {
6219         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
6220       }
6221 
6222       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6223           parseFrom(
6224               java.io.InputStream input,
6225               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6226               throws java.io.IOException {
6227         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
6228             PARSER, input, extensionRegistry);
6229       }
6230 
6231       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseDelimitedFrom(java.io.InputStream input)6232           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
6233         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
6234       }
6235 
6236       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6237           parseDelimitedFrom(
6238               java.io.InputStream input,
6239               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6240               throws java.io.IOException {
6241         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
6242             PARSER, input, extensionRegistry);
6243       }
6244 
6245       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom(com.google.protobuf.CodedInputStream input)6246           parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
6247         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
6248       }
6249 
6250       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6251           parseFrom(
6252               com.google.protobuf.CodedInputStream input,
6253               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6254               throws java.io.IOException {
6255         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
6256             PARSER, input, extensionRegistry);
6257       }
6258 
6259       @java.lang.Override
newBuilderForType()6260       public Builder newBuilderForType() {
6261         return newBuilder();
6262       }
6263 
newBuilder()6264       public static Builder newBuilder() {
6265         return DEFAULT_INSTANCE.toBuilder();
6266       }
6267 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint prototype)6268       public static Builder newBuilder(
6269           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint prototype) {
6270         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
6271       }
6272 
6273       @java.lang.Override
toBuilder()6274       public Builder toBuilder() {
6275         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
6276       }
6277 
6278       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)6279       protected Builder newBuilderForType(
6280           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6281         Builder builder = new Builder(parent);
6282         return builder;
6283       }
6284       /**
6285        *
6286        *
6287        * <pre>
6288        * One may further constrain the frequency and duration of the breaks
6289        * specified above, by enforcing a minimum break frequency, such as
6290        * "There must be a break of at least 1 hour every 12 hours". Assuming that
6291        * this can be interpreted as "Within any sliding time window of 12h, there
6292        * must be at least one break of at least one hour", that example would
6293        * translate to the following `FrequencyConstraint`:
6294        * ```
6295        * {
6296        *    min_break_duration { seconds: 3600 }         # 1 hour.
6297        *    max_inter_break_duration { seconds: 39600 }  # 11 hours (12 - 1 = 11).
6298        * }
6299        * ```
6300        * The timing and duration of the breaks in the solution will respect all
6301        * such constraints, in addition to the time windows and minimum durations
6302        * already specified in the `BreakRequest`.
6303        * A `FrequencyConstraint` may in practice apply to non-consecutive breaks.
6304        * For example, the following schedule honors the "1h every 12h" example:
6305        * ```
6306        *   04:00 vehicle start
6307        *    .. performing travel and visits ..
6308        *   09:00 1 hour break
6309        *   10:00 end of the break
6310        *    .. performing travel and visits ..
6311        *   12:00 20-min lunch break
6312        *   12:20 end of the break
6313        *    .. performing travel and visits ..
6314        *   21:00 1 hour break
6315        *   22:00 end of the break
6316        *    .. performing travel and visits ..
6317        *   23:59 vehicle end
6318        * ```
6319        * </pre>
6320        *
6321        * Protobuf type {@code
6322        * google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint}
6323        */
6324       public static final class Builder
6325           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
6326           implements
6327           // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
6328           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder {
getDescriptor()6329         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
6330           return com.google.cloud.optimization.v1.FleetRoutingProto
6331               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_FrequencyConstraint_descriptor;
6332         }
6333 
6334         @java.lang.Override
6335         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()6336             internalGetFieldAccessorTable() {
6337           return com.google.cloud.optimization.v1.FleetRoutingProto
6338               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_FrequencyConstraint_fieldAccessorTable
6339               .ensureFieldAccessorsInitialized(
6340                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
6341                       .class,
6342                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
6343                       .Builder.class);
6344         }
6345 
6346         // Construct using
6347         // com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.newBuilder()
Builder()6348         private Builder() {}
6349 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)6350         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6351           super(parent);
6352         }
6353 
6354         @java.lang.Override
clear()6355         public Builder clear() {
6356           super.clear();
6357           bitField0_ = 0;
6358           minBreakDuration_ = null;
6359           if (minBreakDurationBuilder_ != null) {
6360             minBreakDurationBuilder_.dispose();
6361             minBreakDurationBuilder_ = null;
6362           }
6363           maxInterBreakDuration_ = null;
6364           if (maxInterBreakDurationBuilder_ != null) {
6365             maxInterBreakDurationBuilder_.dispose();
6366             maxInterBreakDurationBuilder_ = null;
6367           }
6368           return this;
6369         }
6370 
6371         @java.lang.Override
getDescriptorForType()6372         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
6373           return com.google.cloud.optimization.v1.FleetRoutingProto
6374               .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_FrequencyConstraint_descriptor;
6375         }
6376 
6377         @java.lang.Override
6378         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getDefaultInstanceForType()6379             getDefaultInstanceForType() {
6380           return com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
6381               .getDefaultInstance();
6382         }
6383 
6384         @java.lang.Override
6385         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
build()6386             build() {
6387           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint result =
6388               buildPartial();
6389           if (!result.isInitialized()) {
6390             throw newUninitializedMessageException(result);
6391           }
6392           return result;
6393         }
6394 
6395         @java.lang.Override
6396         public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
buildPartial()6397             buildPartial() {
6398           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint result =
6399               new com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint(
6400                   this);
6401           if (bitField0_ != 0) {
6402             buildPartial0(result);
6403           }
6404           onBuilt();
6405           return result;
6406         }
6407 
buildPartial0( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint result)6408         private void buildPartial0(
6409             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint result) {
6410           int from_bitField0_ = bitField0_;
6411           if (((from_bitField0_ & 0x00000001) != 0)) {
6412             result.minBreakDuration_ =
6413                 minBreakDurationBuilder_ == null
6414                     ? minBreakDuration_
6415                     : minBreakDurationBuilder_.build();
6416           }
6417           if (((from_bitField0_ & 0x00000002) != 0)) {
6418             result.maxInterBreakDuration_ =
6419                 maxInterBreakDurationBuilder_ == null
6420                     ? maxInterBreakDuration_
6421                     : maxInterBreakDurationBuilder_.build();
6422           }
6423         }
6424 
6425         @java.lang.Override
clone()6426         public Builder clone() {
6427           return super.clone();
6428         }
6429 
6430         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)6431         public Builder setField(
6432             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
6433           return super.setField(field, value);
6434         }
6435 
6436         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)6437         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
6438           return super.clearField(field);
6439         }
6440 
6441         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)6442         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
6443           return super.clearOneof(oneof);
6444         }
6445 
6446         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)6447         public Builder setRepeatedField(
6448             com.google.protobuf.Descriptors.FieldDescriptor field,
6449             int index,
6450             java.lang.Object value) {
6451           return super.setRepeatedField(field, index, value);
6452         }
6453 
6454         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)6455         public Builder addRepeatedField(
6456             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
6457           return super.addRepeatedField(field, value);
6458         }
6459 
6460         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)6461         public Builder mergeFrom(com.google.protobuf.Message other) {
6462           if (other
6463               instanceof
6464               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint) {
6465             return mergeFrom(
6466                 (com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
6467                     other);
6468           } else {
6469             super.mergeFrom(other);
6470             return this;
6471           }
6472         }
6473 
mergeFrom( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint other)6474         public Builder mergeFrom(
6475             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint other) {
6476           if (other
6477               == com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
6478                   .getDefaultInstance()) return this;
6479           if (other.hasMinBreakDuration()) {
6480             mergeMinBreakDuration(other.getMinBreakDuration());
6481           }
6482           if (other.hasMaxInterBreakDuration()) {
6483             mergeMaxInterBreakDuration(other.getMaxInterBreakDuration());
6484           }
6485           this.mergeUnknownFields(other.getUnknownFields());
6486           onChanged();
6487           return this;
6488         }
6489 
6490         @java.lang.Override
isInitialized()6491         public final boolean isInitialized() {
6492           return true;
6493         }
6494 
6495         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6496         public Builder mergeFrom(
6497             com.google.protobuf.CodedInputStream input,
6498             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6499             throws java.io.IOException {
6500           if (extensionRegistry == null) {
6501             throw new java.lang.NullPointerException();
6502           }
6503           try {
6504             boolean done = false;
6505             while (!done) {
6506               int tag = input.readTag();
6507               switch (tag) {
6508                 case 0:
6509                   done = true;
6510                   break;
6511                 case 10:
6512                   {
6513                     input.readMessage(
6514                         getMinBreakDurationFieldBuilder().getBuilder(), extensionRegistry);
6515                     bitField0_ |= 0x00000001;
6516                     break;
6517                   } // case 10
6518                 case 18:
6519                   {
6520                     input.readMessage(
6521                         getMaxInterBreakDurationFieldBuilder().getBuilder(), extensionRegistry);
6522                     bitField0_ |= 0x00000002;
6523                     break;
6524                   } // case 18
6525                 default:
6526                   {
6527                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
6528                       done = true; // was an endgroup tag
6529                     }
6530                     break;
6531                   } // default:
6532               } // switch (tag)
6533             } // while (!done)
6534           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6535             throw e.unwrapIOException();
6536           } finally {
6537             onChanged();
6538           } // finally
6539           return this;
6540         }
6541 
6542         private int bitField0_;
6543 
6544         private com.google.protobuf.Duration minBreakDuration_;
6545         private com.google.protobuf.SingleFieldBuilderV3<
6546                 com.google.protobuf.Duration,
6547                 com.google.protobuf.Duration.Builder,
6548                 com.google.protobuf.DurationOrBuilder>
6549             minBreakDurationBuilder_;
6550         /**
6551          *
6552          *
6553          * <pre>
6554          * Required. Minimum break duration for this constraint. Nonnegative.
6555          * See description of `FrequencyConstraint`.
6556          * </pre>
6557          *
6558          * <code>
6559          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6560          * </code>
6561          *
6562          * @return Whether the minBreakDuration field is set.
6563          */
hasMinBreakDuration()6564         public boolean hasMinBreakDuration() {
6565           return ((bitField0_ & 0x00000001) != 0);
6566         }
6567         /**
6568          *
6569          *
6570          * <pre>
6571          * Required. Minimum break duration for this constraint. Nonnegative.
6572          * See description of `FrequencyConstraint`.
6573          * </pre>
6574          *
6575          * <code>
6576          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6577          * </code>
6578          *
6579          * @return The minBreakDuration.
6580          */
getMinBreakDuration()6581         public com.google.protobuf.Duration getMinBreakDuration() {
6582           if (minBreakDurationBuilder_ == null) {
6583             return minBreakDuration_ == null
6584                 ? com.google.protobuf.Duration.getDefaultInstance()
6585                 : minBreakDuration_;
6586           } else {
6587             return minBreakDurationBuilder_.getMessage();
6588           }
6589         }
6590         /**
6591          *
6592          *
6593          * <pre>
6594          * Required. Minimum break duration for this constraint. Nonnegative.
6595          * See description of `FrequencyConstraint`.
6596          * </pre>
6597          *
6598          * <code>
6599          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6600          * </code>
6601          */
setMinBreakDuration(com.google.protobuf.Duration value)6602         public Builder setMinBreakDuration(com.google.protobuf.Duration value) {
6603           if (minBreakDurationBuilder_ == null) {
6604             if (value == null) {
6605               throw new NullPointerException();
6606             }
6607             minBreakDuration_ = value;
6608           } else {
6609             minBreakDurationBuilder_.setMessage(value);
6610           }
6611           bitField0_ |= 0x00000001;
6612           onChanged();
6613           return this;
6614         }
6615         /**
6616          *
6617          *
6618          * <pre>
6619          * Required. Minimum break duration for this constraint. Nonnegative.
6620          * See description of `FrequencyConstraint`.
6621          * </pre>
6622          *
6623          * <code>
6624          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6625          * </code>
6626          */
setMinBreakDuration(com.google.protobuf.Duration.Builder builderForValue)6627         public Builder setMinBreakDuration(com.google.protobuf.Duration.Builder builderForValue) {
6628           if (minBreakDurationBuilder_ == null) {
6629             minBreakDuration_ = builderForValue.build();
6630           } else {
6631             minBreakDurationBuilder_.setMessage(builderForValue.build());
6632           }
6633           bitField0_ |= 0x00000001;
6634           onChanged();
6635           return this;
6636         }
6637         /**
6638          *
6639          *
6640          * <pre>
6641          * Required. Minimum break duration for this constraint. Nonnegative.
6642          * See description of `FrequencyConstraint`.
6643          * </pre>
6644          *
6645          * <code>
6646          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6647          * </code>
6648          */
mergeMinBreakDuration(com.google.protobuf.Duration value)6649         public Builder mergeMinBreakDuration(com.google.protobuf.Duration value) {
6650           if (minBreakDurationBuilder_ == null) {
6651             if (((bitField0_ & 0x00000001) != 0)
6652                 && minBreakDuration_ != null
6653                 && minBreakDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
6654               getMinBreakDurationBuilder().mergeFrom(value);
6655             } else {
6656               minBreakDuration_ = value;
6657             }
6658           } else {
6659             minBreakDurationBuilder_.mergeFrom(value);
6660           }
6661           bitField0_ |= 0x00000001;
6662           onChanged();
6663           return this;
6664         }
6665         /**
6666          *
6667          *
6668          * <pre>
6669          * Required. Minimum break duration for this constraint. Nonnegative.
6670          * See description of `FrequencyConstraint`.
6671          * </pre>
6672          *
6673          * <code>
6674          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6675          * </code>
6676          */
clearMinBreakDuration()6677         public Builder clearMinBreakDuration() {
6678           bitField0_ = (bitField0_ & ~0x00000001);
6679           minBreakDuration_ = null;
6680           if (minBreakDurationBuilder_ != null) {
6681             minBreakDurationBuilder_.dispose();
6682             minBreakDurationBuilder_ = null;
6683           }
6684           onChanged();
6685           return this;
6686         }
6687         /**
6688          *
6689          *
6690          * <pre>
6691          * Required. Minimum break duration for this constraint. Nonnegative.
6692          * See description of `FrequencyConstraint`.
6693          * </pre>
6694          *
6695          * <code>
6696          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6697          * </code>
6698          */
getMinBreakDurationBuilder()6699         public com.google.protobuf.Duration.Builder getMinBreakDurationBuilder() {
6700           bitField0_ |= 0x00000001;
6701           onChanged();
6702           return getMinBreakDurationFieldBuilder().getBuilder();
6703         }
6704         /**
6705          *
6706          *
6707          * <pre>
6708          * Required. Minimum break duration for this constraint. Nonnegative.
6709          * See description of `FrequencyConstraint`.
6710          * </pre>
6711          *
6712          * <code>
6713          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6714          * </code>
6715          */
getMinBreakDurationOrBuilder()6716         public com.google.protobuf.DurationOrBuilder getMinBreakDurationOrBuilder() {
6717           if (minBreakDurationBuilder_ != null) {
6718             return minBreakDurationBuilder_.getMessageOrBuilder();
6719           } else {
6720             return minBreakDuration_ == null
6721                 ? com.google.protobuf.Duration.getDefaultInstance()
6722                 : minBreakDuration_;
6723           }
6724         }
6725         /**
6726          *
6727          *
6728          * <pre>
6729          * Required. Minimum break duration for this constraint. Nonnegative.
6730          * See description of `FrequencyConstraint`.
6731          * </pre>
6732          *
6733          * <code>
6734          * .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
6735          * </code>
6736          */
6737         private com.google.protobuf.SingleFieldBuilderV3<
6738                 com.google.protobuf.Duration,
6739                 com.google.protobuf.Duration.Builder,
6740                 com.google.protobuf.DurationOrBuilder>
getMinBreakDurationFieldBuilder()6741             getMinBreakDurationFieldBuilder() {
6742           if (minBreakDurationBuilder_ == null) {
6743             minBreakDurationBuilder_ =
6744                 new com.google.protobuf.SingleFieldBuilderV3<
6745                     com.google.protobuf.Duration,
6746                     com.google.protobuf.Duration.Builder,
6747                     com.google.protobuf.DurationOrBuilder>(
6748                     getMinBreakDuration(), getParentForChildren(), isClean());
6749             minBreakDuration_ = null;
6750           }
6751           return minBreakDurationBuilder_;
6752         }
6753 
6754         private com.google.protobuf.Duration maxInterBreakDuration_;
6755         private com.google.protobuf.SingleFieldBuilderV3<
6756                 com.google.protobuf.Duration,
6757                 com.google.protobuf.Duration.Builder,
6758                 com.google.protobuf.DurationOrBuilder>
6759             maxInterBreakDurationBuilder_;
6760         /**
6761          *
6762          *
6763          * <pre>
6764          * Required. Maximum allowed span of any interval of time in the route
6765          * that does not include at least partially a break of `duration &gt;=
6766          * min_break_duration`. Must be positive.
6767          * </pre>
6768          *
6769          * <code>
6770          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6771          * </code>
6772          *
6773          * @return Whether the maxInterBreakDuration field is set.
6774          */
hasMaxInterBreakDuration()6775         public boolean hasMaxInterBreakDuration() {
6776           return ((bitField0_ & 0x00000002) != 0);
6777         }
6778         /**
6779          *
6780          *
6781          * <pre>
6782          * Required. Maximum allowed span of any interval of time in the route
6783          * that does not include at least partially a break of `duration &gt;=
6784          * min_break_duration`. Must be positive.
6785          * </pre>
6786          *
6787          * <code>
6788          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6789          * </code>
6790          *
6791          * @return The maxInterBreakDuration.
6792          */
getMaxInterBreakDuration()6793         public com.google.protobuf.Duration getMaxInterBreakDuration() {
6794           if (maxInterBreakDurationBuilder_ == null) {
6795             return maxInterBreakDuration_ == null
6796                 ? com.google.protobuf.Duration.getDefaultInstance()
6797                 : maxInterBreakDuration_;
6798           } else {
6799             return maxInterBreakDurationBuilder_.getMessage();
6800           }
6801         }
6802         /**
6803          *
6804          *
6805          * <pre>
6806          * Required. Maximum allowed span of any interval of time in the route
6807          * that does not include at least partially a break of `duration &gt;=
6808          * min_break_duration`. Must be positive.
6809          * </pre>
6810          *
6811          * <code>
6812          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6813          * </code>
6814          */
setMaxInterBreakDuration(com.google.protobuf.Duration value)6815         public Builder setMaxInterBreakDuration(com.google.protobuf.Duration value) {
6816           if (maxInterBreakDurationBuilder_ == null) {
6817             if (value == null) {
6818               throw new NullPointerException();
6819             }
6820             maxInterBreakDuration_ = value;
6821           } else {
6822             maxInterBreakDurationBuilder_.setMessage(value);
6823           }
6824           bitField0_ |= 0x00000002;
6825           onChanged();
6826           return this;
6827         }
6828         /**
6829          *
6830          *
6831          * <pre>
6832          * Required. Maximum allowed span of any interval of time in the route
6833          * that does not include at least partially a break of `duration &gt;=
6834          * min_break_duration`. Must be positive.
6835          * </pre>
6836          *
6837          * <code>
6838          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6839          * </code>
6840          */
setMaxInterBreakDuration( com.google.protobuf.Duration.Builder builderForValue)6841         public Builder setMaxInterBreakDuration(
6842             com.google.protobuf.Duration.Builder builderForValue) {
6843           if (maxInterBreakDurationBuilder_ == null) {
6844             maxInterBreakDuration_ = builderForValue.build();
6845           } else {
6846             maxInterBreakDurationBuilder_.setMessage(builderForValue.build());
6847           }
6848           bitField0_ |= 0x00000002;
6849           onChanged();
6850           return this;
6851         }
6852         /**
6853          *
6854          *
6855          * <pre>
6856          * Required. Maximum allowed span of any interval of time in the route
6857          * that does not include at least partially a break of `duration &gt;=
6858          * min_break_duration`. Must be positive.
6859          * </pre>
6860          *
6861          * <code>
6862          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6863          * </code>
6864          */
mergeMaxInterBreakDuration(com.google.protobuf.Duration value)6865         public Builder mergeMaxInterBreakDuration(com.google.protobuf.Duration value) {
6866           if (maxInterBreakDurationBuilder_ == null) {
6867             if (((bitField0_ & 0x00000002) != 0)
6868                 && maxInterBreakDuration_ != null
6869                 && maxInterBreakDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
6870               getMaxInterBreakDurationBuilder().mergeFrom(value);
6871             } else {
6872               maxInterBreakDuration_ = value;
6873             }
6874           } else {
6875             maxInterBreakDurationBuilder_.mergeFrom(value);
6876           }
6877           bitField0_ |= 0x00000002;
6878           onChanged();
6879           return this;
6880         }
6881         /**
6882          *
6883          *
6884          * <pre>
6885          * Required. Maximum allowed span of any interval of time in the route
6886          * that does not include at least partially a break of `duration &gt;=
6887          * min_break_duration`. Must be positive.
6888          * </pre>
6889          *
6890          * <code>
6891          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6892          * </code>
6893          */
clearMaxInterBreakDuration()6894         public Builder clearMaxInterBreakDuration() {
6895           bitField0_ = (bitField0_ & ~0x00000002);
6896           maxInterBreakDuration_ = null;
6897           if (maxInterBreakDurationBuilder_ != null) {
6898             maxInterBreakDurationBuilder_.dispose();
6899             maxInterBreakDurationBuilder_ = null;
6900           }
6901           onChanged();
6902           return this;
6903         }
6904         /**
6905          *
6906          *
6907          * <pre>
6908          * Required. Maximum allowed span of any interval of time in the route
6909          * that does not include at least partially a break of `duration &gt;=
6910          * min_break_duration`. Must be positive.
6911          * </pre>
6912          *
6913          * <code>
6914          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6915          * </code>
6916          */
getMaxInterBreakDurationBuilder()6917         public com.google.protobuf.Duration.Builder getMaxInterBreakDurationBuilder() {
6918           bitField0_ |= 0x00000002;
6919           onChanged();
6920           return getMaxInterBreakDurationFieldBuilder().getBuilder();
6921         }
6922         /**
6923          *
6924          *
6925          * <pre>
6926          * Required. Maximum allowed span of any interval of time in the route
6927          * that does not include at least partially a break of `duration &gt;=
6928          * min_break_duration`. Must be positive.
6929          * </pre>
6930          *
6931          * <code>
6932          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6933          * </code>
6934          */
getMaxInterBreakDurationOrBuilder()6935         public com.google.protobuf.DurationOrBuilder getMaxInterBreakDurationOrBuilder() {
6936           if (maxInterBreakDurationBuilder_ != null) {
6937             return maxInterBreakDurationBuilder_.getMessageOrBuilder();
6938           } else {
6939             return maxInterBreakDuration_ == null
6940                 ? com.google.protobuf.Duration.getDefaultInstance()
6941                 : maxInterBreakDuration_;
6942           }
6943         }
6944         /**
6945          *
6946          *
6947          * <pre>
6948          * Required. Maximum allowed span of any interval of time in the route
6949          * that does not include at least partially a break of `duration &gt;=
6950          * min_break_duration`. Must be positive.
6951          * </pre>
6952          *
6953          * <code>
6954          * .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
6955          * </code>
6956          */
6957         private com.google.protobuf.SingleFieldBuilderV3<
6958                 com.google.protobuf.Duration,
6959                 com.google.protobuf.Duration.Builder,
6960                 com.google.protobuf.DurationOrBuilder>
getMaxInterBreakDurationFieldBuilder()6961             getMaxInterBreakDurationFieldBuilder() {
6962           if (maxInterBreakDurationBuilder_ == null) {
6963             maxInterBreakDurationBuilder_ =
6964                 new com.google.protobuf.SingleFieldBuilderV3<
6965                     com.google.protobuf.Duration,
6966                     com.google.protobuf.Duration.Builder,
6967                     com.google.protobuf.DurationOrBuilder>(
6968                     getMaxInterBreakDuration(), getParentForChildren(), isClean());
6969             maxInterBreakDuration_ = null;
6970           }
6971           return maxInterBreakDurationBuilder_;
6972         }
6973 
6974         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6975         public final Builder setUnknownFields(
6976             final com.google.protobuf.UnknownFieldSet unknownFields) {
6977           return super.setUnknownFields(unknownFields);
6978         }
6979 
6980         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6981         public final Builder mergeUnknownFields(
6982             final com.google.protobuf.UnknownFieldSet unknownFields) {
6983           return super.mergeUnknownFields(unknownFields);
6984         }
6985 
6986         // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
6987       }
6988 
6989       // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint)
6990       private static final com.google.cloud.optimization.v1.ShipmentModel.BreakRule
6991               .FrequencyConstraint
6992           DEFAULT_INSTANCE;
6993 
6994       static {
6995         DEFAULT_INSTANCE =
6996             new com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint();
6997       }
6998 
6999       public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getDefaultInstance()7000           getDefaultInstance() {
7001         return DEFAULT_INSTANCE;
7002       }
7003 
7004       private static final com.google.protobuf.Parser<FrequencyConstraint> PARSER =
7005           new com.google.protobuf.AbstractParser<FrequencyConstraint>() {
7006             @java.lang.Override
7007             public FrequencyConstraint parsePartialFrom(
7008                 com.google.protobuf.CodedInputStream input,
7009                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7010                 throws com.google.protobuf.InvalidProtocolBufferException {
7011               Builder builder = newBuilder();
7012               try {
7013                 builder.mergeFrom(input, extensionRegistry);
7014               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7015                 throw e.setUnfinishedMessage(builder.buildPartial());
7016               } catch (com.google.protobuf.UninitializedMessageException e) {
7017                 throw e.asInvalidProtocolBufferException()
7018                     .setUnfinishedMessage(builder.buildPartial());
7019               } catch (java.io.IOException e) {
7020                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
7021                     .setUnfinishedMessage(builder.buildPartial());
7022               }
7023               return builder.buildPartial();
7024             }
7025           };
7026 
parser()7027       public static com.google.protobuf.Parser<FrequencyConstraint> parser() {
7028         return PARSER;
7029       }
7030 
7031       @java.lang.Override
getParserForType()7032       public com.google.protobuf.Parser<FrequencyConstraint> getParserForType() {
7033         return PARSER;
7034       }
7035 
7036       @java.lang.Override
7037       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getDefaultInstanceForType()7038           getDefaultInstanceForType() {
7039         return DEFAULT_INSTANCE;
7040       }
7041     }
7042 
7043     public static final int BREAK_REQUESTS_FIELD_NUMBER = 1;
7044 
7045     @SuppressWarnings("serial")
7046     private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
7047         breakRequests_;
7048     /**
7049      *
7050      *
7051      * <pre>
7052      * Sequence of breaks. See the `BreakRequest` message.
7053      * </pre>
7054      *
7055      * <code>
7056      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7057      * </code>
7058      */
7059     @java.lang.Override
7060     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
getBreakRequestsList()7061         getBreakRequestsList() {
7062       return breakRequests_;
7063     }
7064     /**
7065      *
7066      *
7067      * <pre>
7068      * Sequence of breaks. See the `BreakRequest` message.
7069      * </pre>
7070      *
7071      * <code>
7072      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7073      * </code>
7074      */
7075     @java.lang.Override
7076     public java.util.List<
7077             ? extends
7078                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>
getBreakRequestsOrBuilderList()7079         getBreakRequestsOrBuilderList() {
7080       return breakRequests_;
7081     }
7082     /**
7083      *
7084      *
7085      * <pre>
7086      * Sequence of breaks. See the `BreakRequest` message.
7087      * </pre>
7088      *
7089      * <code>
7090      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7091      * </code>
7092      */
7093     @java.lang.Override
getBreakRequestsCount()7094     public int getBreakRequestsCount() {
7095       return breakRequests_.size();
7096     }
7097     /**
7098      *
7099      *
7100      * <pre>
7101      * Sequence of breaks. See the `BreakRequest` message.
7102      * </pre>
7103      *
7104      * <code>
7105      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7106      * </code>
7107      */
7108     @java.lang.Override
getBreakRequests( int index)7109     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest getBreakRequests(
7110         int index) {
7111       return breakRequests_.get(index);
7112     }
7113     /**
7114      *
7115      *
7116      * <pre>
7117      * Sequence of breaks. See the `BreakRequest` message.
7118      * </pre>
7119      *
7120      * <code>
7121      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7122      * </code>
7123      */
7124     @java.lang.Override
7125     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder
getBreakRequestsOrBuilder(int index)7126         getBreakRequestsOrBuilder(int index) {
7127       return breakRequests_.get(index);
7128     }
7129 
7130     public static final int FREQUENCY_CONSTRAINTS_FIELD_NUMBER = 2;
7131 
7132     @SuppressWarnings("serial")
7133     private java.util.List<
7134             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
7135         frequencyConstraints_;
7136     /**
7137      *
7138      *
7139      * <pre>
7140      * Several `FrequencyConstraint` may apply. They must all be satisfied by
7141      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
7142      * </pre>
7143      *
7144      * <code>
7145      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
7146      * </code>
7147      */
7148     @java.lang.Override
7149     public java.util.List<
7150             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
getFrequencyConstraintsList()7151         getFrequencyConstraintsList() {
7152       return frequencyConstraints_;
7153     }
7154     /**
7155      *
7156      *
7157      * <pre>
7158      * Several `FrequencyConstraint` may apply. They must all be satisfied by
7159      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
7160      * </pre>
7161      *
7162      * <code>
7163      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
7164      * </code>
7165      */
7166     @java.lang.Override
7167     public java.util.List<
7168             ? extends
7169                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule
7170                     .FrequencyConstraintOrBuilder>
getFrequencyConstraintsOrBuilderList()7171         getFrequencyConstraintsOrBuilderList() {
7172       return frequencyConstraints_;
7173     }
7174     /**
7175      *
7176      *
7177      * <pre>
7178      * Several `FrequencyConstraint` may apply. They must all be satisfied by
7179      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
7180      * </pre>
7181      *
7182      * <code>
7183      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
7184      * </code>
7185      */
7186     @java.lang.Override
getFrequencyConstraintsCount()7187     public int getFrequencyConstraintsCount() {
7188       return frequencyConstraints_.size();
7189     }
7190     /**
7191      *
7192      *
7193      * <pre>
7194      * Several `FrequencyConstraint` may apply. They must all be satisfied by
7195      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
7196      * </pre>
7197      *
7198      * <code>
7199      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
7200      * </code>
7201      */
7202     @java.lang.Override
7203     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getFrequencyConstraints(int index)7204         getFrequencyConstraints(int index) {
7205       return frequencyConstraints_.get(index);
7206     }
7207     /**
7208      *
7209      *
7210      * <pre>
7211      * Several `FrequencyConstraint` may apply. They must all be satisfied by
7212      * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
7213      * </pre>
7214      *
7215      * <code>
7216      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
7217      * </code>
7218      */
7219     @java.lang.Override
7220     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder
getFrequencyConstraintsOrBuilder(int index)7221         getFrequencyConstraintsOrBuilder(int index) {
7222       return frequencyConstraints_.get(index);
7223     }
7224 
7225     private byte memoizedIsInitialized = -1;
7226 
7227     @java.lang.Override
isInitialized()7228     public final boolean isInitialized() {
7229       byte isInitialized = memoizedIsInitialized;
7230       if (isInitialized == 1) return true;
7231       if (isInitialized == 0) return false;
7232 
7233       memoizedIsInitialized = 1;
7234       return true;
7235     }
7236 
7237     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)7238     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
7239       for (int i = 0; i < breakRequests_.size(); i++) {
7240         output.writeMessage(1, breakRequests_.get(i));
7241       }
7242       for (int i = 0; i < frequencyConstraints_.size(); i++) {
7243         output.writeMessage(2, frequencyConstraints_.get(i));
7244       }
7245       getUnknownFields().writeTo(output);
7246     }
7247 
7248     @java.lang.Override
getSerializedSize()7249     public int getSerializedSize() {
7250       int size = memoizedSize;
7251       if (size != -1) return size;
7252 
7253       size = 0;
7254       for (int i = 0; i < breakRequests_.size(); i++) {
7255         size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, breakRequests_.get(i));
7256       }
7257       for (int i = 0; i < frequencyConstraints_.size(); i++) {
7258         size +=
7259             com.google.protobuf.CodedOutputStream.computeMessageSize(
7260                 2, frequencyConstraints_.get(i));
7261       }
7262       size += getUnknownFields().getSerializedSize();
7263       memoizedSize = size;
7264       return size;
7265     }
7266 
7267     @java.lang.Override
equals(final java.lang.Object obj)7268     public boolean equals(final java.lang.Object obj) {
7269       if (obj == this) {
7270         return true;
7271       }
7272       if (!(obj instanceof com.google.cloud.optimization.v1.ShipmentModel.BreakRule)) {
7273         return super.equals(obj);
7274       }
7275       com.google.cloud.optimization.v1.ShipmentModel.BreakRule other =
7276           (com.google.cloud.optimization.v1.ShipmentModel.BreakRule) obj;
7277 
7278       if (!getBreakRequestsList().equals(other.getBreakRequestsList())) return false;
7279       if (!getFrequencyConstraintsList().equals(other.getFrequencyConstraintsList())) return false;
7280       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
7281       return true;
7282     }
7283 
7284     @java.lang.Override
hashCode()7285     public int hashCode() {
7286       if (memoizedHashCode != 0) {
7287         return memoizedHashCode;
7288       }
7289       int hash = 41;
7290       hash = (19 * hash) + getDescriptor().hashCode();
7291       if (getBreakRequestsCount() > 0) {
7292         hash = (37 * hash) + BREAK_REQUESTS_FIELD_NUMBER;
7293         hash = (53 * hash) + getBreakRequestsList().hashCode();
7294       }
7295       if (getFrequencyConstraintsCount() > 0) {
7296         hash = (37 * hash) + FREQUENCY_CONSTRAINTS_FIELD_NUMBER;
7297         hash = (53 * hash) + getFrequencyConstraintsList().hashCode();
7298       }
7299       hash = (29 * hash) + getUnknownFields().hashCode();
7300       memoizedHashCode = hash;
7301       return hash;
7302     }
7303 
parseFrom( java.nio.ByteBuffer data)7304     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7305         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
7306       return PARSER.parseFrom(data);
7307     }
7308 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7309     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7310         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7311         throws com.google.protobuf.InvalidProtocolBufferException {
7312       return PARSER.parseFrom(data, extensionRegistry);
7313     }
7314 
parseFrom( com.google.protobuf.ByteString data)7315     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7316         com.google.protobuf.ByteString data)
7317         throws com.google.protobuf.InvalidProtocolBufferException {
7318       return PARSER.parseFrom(data);
7319     }
7320 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7321     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7322         com.google.protobuf.ByteString data,
7323         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7324         throws com.google.protobuf.InvalidProtocolBufferException {
7325       return PARSER.parseFrom(data, extensionRegistry);
7326     }
7327 
parseFrom(byte[] data)7328     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(byte[] data)
7329         throws com.google.protobuf.InvalidProtocolBufferException {
7330       return PARSER.parseFrom(data);
7331     }
7332 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7333     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7334         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7335         throws com.google.protobuf.InvalidProtocolBufferException {
7336       return PARSER.parseFrom(data, extensionRegistry);
7337     }
7338 
parseFrom( java.io.InputStream input)7339     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7340         java.io.InputStream input) throws java.io.IOException {
7341       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7342     }
7343 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7344     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7345         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7346         throws java.io.IOException {
7347       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7348           PARSER, input, extensionRegistry);
7349     }
7350 
parseDelimitedFrom( java.io.InputStream input)7351     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseDelimitedFrom(
7352         java.io.InputStream input) throws java.io.IOException {
7353       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
7354     }
7355 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7356     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseDelimitedFrom(
7357         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7358         throws java.io.IOException {
7359       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
7360           PARSER, input, extensionRegistry);
7361     }
7362 
parseFrom( com.google.protobuf.CodedInputStream input)7363     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7364         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
7365       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7366     }
7367 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7368     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule parseFrom(
7369         com.google.protobuf.CodedInputStream input,
7370         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7371         throws java.io.IOException {
7372       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7373           PARSER, input, extensionRegistry);
7374     }
7375 
7376     @java.lang.Override
newBuilderForType()7377     public Builder newBuilderForType() {
7378       return newBuilder();
7379     }
7380 
newBuilder()7381     public static Builder newBuilder() {
7382       return DEFAULT_INSTANCE.toBuilder();
7383     }
7384 
newBuilder( com.google.cloud.optimization.v1.ShipmentModel.BreakRule prototype)7385     public static Builder newBuilder(
7386         com.google.cloud.optimization.v1.ShipmentModel.BreakRule prototype) {
7387       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
7388     }
7389 
7390     @java.lang.Override
toBuilder()7391     public Builder toBuilder() {
7392       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
7393     }
7394 
7395     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7396     protected Builder newBuilderForType(
7397         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7398       Builder builder = new Builder(parent);
7399       return builder;
7400     }
7401     /**
7402      *
7403      *
7404      * <pre>
7405      * Deprecated: Use top level
7406      * [BreakRule][google.cloud.optimization.v1.ShipmentModel.BreakRule] instead.
7407      * Rules to generate time breaks for a vehicle (e.g. lunch
7408      * breaks). A break is a contiguous period of time during which the vehicle
7409      * remains idle at its current position and cannot perform any visit. A break
7410      * may occur:
7411      * * during the travel between two visits (which includes the time right
7412      *   before or right after a visit, but not in the middle of a visit), in
7413      *   which case it extends the corresponding transit time between the visits
7414      * * before the vehicle start (the vehicle may not start in the middle of
7415      *   a break), in which case it does not affect the vehicle start time.
7416      * * after the vehicle end (ditto, with the vehicle end time).
7417      * </pre>
7418      *
7419      * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel.BreakRule}
7420      */
7421     public static final class Builder
7422         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
7423         implements
7424         // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel.BreakRule)
7425         com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder {
getDescriptor()7426       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
7427         return com.google.cloud.optimization.v1.FleetRoutingProto
7428             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_descriptor;
7429       }
7430 
7431       @java.lang.Override
7432       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()7433           internalGetFieldAccessorTable() {
7434         return com.google.cloud.optimization.v1.FleetRoutingProto
7435             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_fieldAccessorTable
7436             .ensureFieldAccessorsInitialized(
7437                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.class,
7438                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder.class);
7439       }
7440 
7441       // Construct using com.google.cloud.optimization.v1.ShipmentModel.BreakRule.newBuilder()
Builder()7442       private Builder() {}
7443 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7444       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7445         super(parent);
7446       }
7447 
7448       @java.lang.Override
clear()7449       public Builder clear() {
7450         super.clear();
7451         bitField0_ = 0;
7452         if (breakRequestsBuilder_ == null) {
7453           breakRequests_ = java.util.Collections.emptyList();
7454         } else {
7455           breakRequests_ = null;
7456           breakRequestsBuilder_.clear();
7457         }
7458         bitField0_ = (bitField0_ & ~0x00000001);
7459         if (frequencyConstraintsBuilder_ == null) {
7460           frequencyConstraints_ = java.util.Collections.emptyList();
7461         } else {
7462           frequencyConstraints_ = null;
7463           frequencyConstraintsBuilder_.clear();
7464         }
7465         bitField0_ = (bitField0_ & ~0x00000002);
7466         return this;
7467       }
7468 
7469       @java.lang.Override
getDescriptorForType()7470       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
7471         return com.google.cloud.optimization.v1.FleetRoutingProto
7472             .internal_static_google_cloud_optimization_v1_ShipmentModel_BreakRule_descriptor;
7473       }
7474 
7475       @java.lang.Override
getDefaultInstanceForType()7476       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule getDefaultInstanceForType() {
7477         return com.google.cloud.optimization.v1.ShipmentModel.BreakRule.getDefaultInstance();
7478       }
7479 
7480       @java.lang.Override
build()7481       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule build() {
7482         com.google.cloud.optimization.v1.ShipmentModel.BreakRule result = buildPartial();
7483         if (!result.isInitialized()) {
7484           throw newUninitializedMessageException(result);
7485         }
7486         return result;
7487       }
7488 
7489       @java.lang.Override
buildPartial()7490       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule buildPartial() {
7491         com.google.cloud.optimization.v1.ShipmentModel.BreakRule result =
7492             new com.google.cloud.optimization.v1.ShipmentModel.BreakRule(this);
7493         buildPartialRepeatedFields(result);
7494         if (bitField0_ != 0) {
7495           buildPartial0(result);
7496         }
7497         onBuilt();
7498         return result;
7499       }
7500 
buildPartialRepeatedFields( com.google.cloud.optimization.v1.ShipmentModel.BreakRule result)7501       private void buildPartialRepeatedFields(
7502           com.google.cloud.optimization.v1.ShipmentModel.BreakRule result) {
7503         if (breakRequestsBuilder_ == null) {
7504           if (((bitField0_ & 0x00000001) != 0)) {
7505             breakRequests_ = java.util.Collections.unmodifiableList(breakRequests_);
7506             bitField0_ = (bitField0_ & ~0x00000001);
7507           }
7508           result.breakRequests_ = breakRequests_;
7509         } else {
7510           result.breakRequests_ = breakRequestsBuilder_.build();
7511         }
7512         if (frequencyConstraintsBuilder_ == null) {
7513           if (((bitField0_ & 0x00000002) != 0)) {
7514             frequencyConstraints_ = java.util.Collections.unmodifiableList(frequencyConstraints_);
7515             bitField0_ = (bitField0_ & ~0x00000002);
7516           }
7517           result.frequencyConstraints_ = frequencyConstraints_;
7518         } else {
7519           result.frequencyConstraints_ = frequencyConstraintsBuilder_.build();
7520         }
7521       }
7522 
buildPartial0(com.google.cloud.optimization.v1.ShipmentModel.BreakRule result)7523       private void buildPartial0(com.google.cloud.optimization.v1.ShipmentModel.BreakRule result) {
7524         int from_bitField0_ = bitField0_;
7525       }
7526 
7527       @java.lang.Override
clone()7528       public Builder clone() {
7529         return super.clone();
7530       }
7531 
7532       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7533       public Builder setField(
7534           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7535         return super.setField(field, value);
7536       }
7537 
7538       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)7539       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
7540         return super.clearField(field);
7541       }
7542 
7543       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)7544       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
7545         return super.clearOneof(oneof);
7546       }
7547 
7548       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)7549       public Builder setRepeatedField(
7550           com.google.protobuf.Descriptors.FieldDescriptor field,
7551           int index,
7552           java.lang.Object value) {
7553         return super.setRepeatedField(field, index, value);
7554       }
7555 
7556       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7557       public Builder addRepeatedField(
7558           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7559         return super.addRepeatedField(field, value);
7560       }
7561 
7562       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)7563       public Builder mergeFrom(com.google.protobuf.Message other) {
7564         if (other instanceof com.google.cloud.optimization.v1.ShipmentModel.BreakRule) {
7565           return mergeFrom((com.google.cloud.optimization.v1.ShipmentModel.BreakRule) other);
7566         } else {
7567           super.mergeFrom(other);
7568           return this;
7569         }
7570       }
7571 
mergeFrom(com.google.cloud.optimization.v1.ShipmentModel.BreakRule other)7572       public Builder mergeFrom(com.google.cloud.optimization.v1.ShipmentModel.BreakRule other) {
7573         if (other == com.google.cloud.optimization.v1.ShipmentModel.BreakRule.getDefaultInstance())
7574           return this;
7575         if (breakRequestsBuilder_ == null) {
7576           if (!other.breakRequests_.isEmpty()) {
7577             if (breakRequests_.isEmpty()) {
7578               breakRequests_ = other.breakRequests_;
7579               bitField0_ = (bitField0_ & ~0x00000001);
7580             } else {
7581               ensureBreakRequestsIsMutable();
7582               breakRequests_.addAll(other.breakRequests_);
7583             }
7584             onChanged();
7585           }
7586         } else {
7587           if (!other.breakRequests_.isEmpty()) {
7588             if (breakRequestsBuilder_.isEmpty()) {
7589               breakRequestsBuilder_.dispose();
7590               breakRequestsBuilder_ = null;
7591               breakRequests_ = other.breakRequests_;
7592               bitField0_ = (bitField0_ & ~0x00000001);
7593               breakRequestsBuilder_ =
7594                   com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
7595                       ? getBreakRequestsFieldBuilder()
7596                       : null;
7597             } else {
7598               breakRequestsBuilder_.addAllMessages(other.breakRequests_);
7599             }
7600           }
7601         }
7602         if (frequencyConstraintsBuilder_ == null) {
7603           if (!other.frequencyConstraints_.isEmpty()) {
7604             if (frequencyConstraints_.isEmpty()) {
7605               frequencyConstraints_ = other.frequencyConstraints_;
7606               bitField0_ = (bitField0_ & ~0x00000002);
7607             } else {
7608               ensureFrequencyConstraintsIsMutable();
7609               frequencyConstraints_.addAll(other.frequencyConstraints_);
7610             }
7611             onChanged();
7612           }
7613         } else {
7614           if (!other.frequencyConstraints_.isEmpty()) {
7615             if (frequencyConstraintsBuilder_.isEmpty()) {
7616               frequencyConstraintsBuilder_.dispose();
7617               frequencyConstraintsBuilder_ = null;
7618               frequencyConstraints_ = other.frequencyConstraints_;
7619               bitField0_ = (bitField0_ & ~0x00000002);
7620               frequencyConstraintsBuilder_ =
7621                   com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
7622                       ? getFrequencyConstraintsFieldBuilder()
7623                       : null;
7624             } else {
7625               frequencyConstraintsBuilder_.addAllMessages(other.frequencyConstraints_);
7626             }
7627           }
7628         }
7629         this.mergeUnknownFields(other.getUnknownFields());
7630         onChanged();
7631         return this;
7632       }
7633 
7634       @java.lang.Override
isInitialized()7635       public final boolean isInitialized() {
7636         return true;
7637       }
7638 
7639       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7640       public Builder mergeFrom(
7641           com.google.protobuf.CodedInputStream input,
7642           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7643           throws java.io.IOException {
7644         if (extensionRegistry == null) {
7645           throw new java.lang.NullPointerException();
7646         }
7647         try {
7648           boolean done = false;
7649           while (!done) {
7650             int tag = input.readTag();
7651             switch (tag) {
7652               case 0:
7653                 done = true;
7654                 break;
7655               case 10:
7656                 {
7657                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest m =
7658                       input.readMessage(
7659                           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
7660                               .parser(),
7661                           extensionRegistry);
7662                   if (breakRequestsBuilder_ == null) {
7663                     ensureBreakRequestsIsMutable();
7664                     breakRequests_.add(m);
7665                   } else {
7666                     breakRequestsBuilder_.addMessage(m);
7667                   }
7668                   break;
7669                 } // case 10
7670               case 18:
7671                 {
7672                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint m =
7673                       input.readMessage(
7674                           com.google.cloud.optimization.v1.ShipmentModel.BreakRule
7675                               .FrequencyConstraint.parser(),
7676                           extensionRegistry);
7677                   if (frequencyConstraintsBuilder_ == null) {
7678                     ensureFrequencyConstraintsIsMutable();
7679                     frequencyConstraints_.add(m);
7680                   } else {
7681                     frequencyConstraintsBuilder_.addMessage(m);
7682                   }
7683                   break;
7684                 } // case 18
7685               default:
7686                 {
7687                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
7688                     done = true; // was an endgroup tag
7689                   }
7690                   break;
7691                 } // default:
7692             } // switch (tag)
7693           } // while (!done)
7694         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7695           throw e.unwrapIOException();
7696         } finally {
7697           onChanged();
7698         } // finally
7699         return this;
7700       }
7701 
7702       private int bitField0_;
7703 
7704       private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
7705           breakRequests_ = java.util.Collections.emptyList();
7706 
ensureBreakRequestsIsMutable()7707       private void ensureBreakRequestsIsMutable() {
7708         if (!((bitField0_ & 0x00000001) != 0)) {
7709           breakRequests_ =
7710               new java.util.ArrayList<
7711                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>(
7712                   breakRequests_);
7713           bitField0_ |= 0x00000001;
7714         }
7715       }
7716 
7717       private com.google.protobuf.RepeatedFieldBuilderV3<
7718               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest,
7719               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder,
7720               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>
7721           breakRequestsBuilder_;
7722 
7723       /**
7724        *
7725        *
7726        * <pre>
7727        * Sequence of breaks. See the `BreakRequest` message.
7728        * </pre>
7729        *
7730        * <code>
7731        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7732        * </code>
7733        */
7734       public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
getBreakRequestsList()7735           getBreakRequestsList() {
7736         if (breakRequestsBuilder_ == null) {
7737           return java.util.Collections.unmodifiableList(breakRequests_);
7738         } else {
7739           return breakRequestsBuilder_.getMessageList();
7740         }
7741       }
7742       /**
7743        *
7744        *
7745        * <pre>
7746        * Sequence of breaks. See the `BreakRequest` message.
7747        * </pre>
7748        *
7749        * <code>
7750        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7751        * </code>
7752        */
getBreakRequestsCount()7753       public int getBreakRequestsCount() {
7754         if (breakRequestsBuilder_ == null) {
7755           return breakRequests_.size();
7756         } else {
7757           return breakRequestsBuilder_.getCount();
7758         }
7759       }
7760       /**
7761        *
7762        *
7763        * <pre>
7764        * Sequence of breaks. See the `BreakRequest` message.
7765        * </pre>
7766        *
7767        * <code>
7768        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7769        * </code>
7770        */
getBreakRequests( int index)7771       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest getBreakRequests(
7772           int index) {
7773         if (breakRequestsBuilder_ == null) {
7774           return breakRequests_.get(index);
7775         } else {
7776           return breakRequestsBuilder_.getMessage(index);
7777         }
7778       }
7779       /**
7780        *
7781        *
7782        * <pre>
7783        * Sequence of breaks. See the `BreakRequest` message.
7784        * </pre>
7785        *
7786        * <code>
7787        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7788        * </code>
7789        */
setBreakRequests( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value)7790       public Builder setBreakRequests(
7791           int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value) {
7792         if (breakRequestsBuilder_ == null) {
7793           if (value == null) {
7794             throw new NullPointerException();
7795           }
7796           ensureBreakRequestsIsMutable();
7797           breakRequests_.set(index, value);
7798           onChanged();
7799         } else {
7800           breakRequestsBuilder_.setMessage(index, value);
7801         }
7802         return this;
7803       }
7804       /**
7805        *
7806        *
7807        * <pre>
7808        * Sequence of breaks. See the `BreakRequest` message.
7809        * </pre>
7810        *
7811        * <code>
7812        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7813        * </code>
7814        */
setBreakRequests( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder builderForValue)7815       public Builder setBreakRequests(
7816           int index,
7817           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
7818               builderForValue) {
7819         if (breakRequestsBuilder_ == null) {
7820           ensureBreakRequestsIsMutable();
7821           breakRequests_.set(index, builderForValue.build());
7822           onChanged();
7823         } else {
7824           breakRequestsBuilder_.setMessage(index, builderForValue.build());
7825         }
7826         return this;
7827       }
7828       /**
7829        *
7830        *
7831        * <pre>
7832        * Sequence of breaks. See the `BreakRequest` message.
7833        * </pre>
7834        *
7835        * <code>
7836        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7837        * </code>
7838        */
addBreakRequests( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value)7839       public Builder addBreakRequests(
7840           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value) {
7841         if (breakRequestsBuilder_ == null) {
7842           if (value == null) {
7843             throw new NullPointerException();
7844           }
7845           ensureBreakRequestsIsMutable();
7846           breakRequests_.add(value);
7847           onChanged();
7848         } else {
7849           breakRequestsBuilder_.addMessage(value);
7850         }
7851         return this;
7852       }
7853       /**
7854        *
7855        *
7856        * <pre>
7857        * Sequence of breaks. See the `BreakRequest` message.
7858        * </pre>
7859        *
7860        * <code>
7861        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7862        * </code>
7863        */
addBreakRequests( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value)7864       public Builder addBreakRequests(
7865           int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest value) {
7866         if (breakRequestsBuilder_ == null) {
7867           if (value == null) {
7868             throw new NullPointerException();
7869           }
7870           ensureBreakRequestsIsMutable();
7871           breakRequests_.add(index, value);
7872           onChanged();
7873         } else {
7874           breakRequestsBuilder_.addMessage(index, value);
7875         }
7876         return this;
7877       }
7878       /**
7879        *
7880        *
7881        * <pre>
7882        * Sequence of breaks. See the `BreakRequest` message.
7883        * </pre>
7884        *
7885        * <code>
7886        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7887        * </code>
7888        */
addBreakRequests( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder builderForValue)7889       public Builder addBreakRequests(
7890           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
7891               builderForValue) {
7892         if (breakRequestsBuilder_ == null) {
7893           ensureBreakRequestsIsMutable();
7894           breakRequests_.add(builderForValue.build());
7895           onChanged();
7896         } else {
7897           breakRequestsBuilder_.addMessage(builderForValue.build());
7898         }
7899         return this;
7900       }
7901       /**
7902        *
7903        *
7904        * <pre>
7905        * Sequence of breaks. See the `BreakRequest` message.
7906        * </pre>
7907        *
7908        * <code>
7909        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7910        * </code>
7911        */
addBreakRequests( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder builderForValue)7912       public Builder addBreakRequests(
7913           int index,
7914           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
7915               builderForValue) {
7916         if (breakRequestsBuilder_ == null) {
7917           ensureBreakRequestsIsMutable();
7918           breakRequests_.add(index, builderForValue.build());
7919           onChanged();
7920         } else {
7921           breakRequestsBuilder_.addMessage(index, builderForValue.build());
7922         }
7923         return this;
7924       }
7925       /**
7926        *
7927        *
7928        * <pre>
7929        * Sequence of breaks. See the `BreakRequest` message.
7930        * </pre>
7931        *
7932        * <code>
7933        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7934        * </code>
7935        */
addAllBreakRequests( java.lang.Iterable< ? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest> values)7936       public Builder addAllBreakRequests(
7937           java.lang.Iterable<
7938                   ? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest>
7939               values) {
7940         if (breakRequestsBuilder_ == null) {
7941           ensureBreakRequestsIsMutable();
7942           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, breakRequests_);
7943           onChanged();
7944         } else {
7945           breakRequestsBuilder_.addAllMessages(values);
7946         }
7947         return this;
7948       }
7949       /**
7950        *
7951        *
7952        * <pre>
7953        * Sequence of breaks. See the `BreakRequest` message.
7954        * </pre>
7955        *
7956        * <code>
7957        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7958        * </code>
7959        */
clearBreakRequests()7960       public Builder clearBreakRequests() {
7961         if (breakRequestsBuilder_ == null) {
7962           breakRequests_ = java.util.Collections.emptyList();
7963           bitField0_ = (bitField0_ & ~0x00000001);
7964           onChanged();
7965         } else {
7966           breakRequestsBuilder_.clear();
7967         }
7968         return this;
7969       }
7970       /**
7971        *
7972        *
7973        * <pre>
7974        * Sequence of breaks. See the `BreakRequest` message.
7975        * </pre>
7976        *
7977        * <code>
7978        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
7979        * </code>
7980        */
removeBreakRequests(int index)7981       public Builder removeBreakRequests(int index) {
7982         if (breakRequestsBuilder_ == null) {
7983           ensureBreakRequestsIsMutable();
7984           breakRequests_.remove(index);
7985           onChanged();
7986         } else {
7987           breakRequestsBuilder_.remove(index);
7988         }
7989         return this;
7990       }
7991       /**
7992        *
7993        *
7994        * <pre>
7995        * Sequence of breaks. See the `BreakRequest` message.
7996        * </pre>
7997        *
7998        * <code>
7999        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8000        * </code>
8001        */
8002       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
getBreakRequestsBuilder(int index)8003           getBreakRequestsBuilder(int index) {
8004         return getBreakRequestsFieldBuilder().getBuilder(index);
8005       }
8006       /**
8007        *
8008        *
8009        * <pre>
8010        * Sequence of breaks. See the `BreakRequest` message.
8011        * </pre>
8012        *
8013        * <code>
8014        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8015        * </code>
8016        */
8017       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder
getBreakRequestsOrBuilder(int index)8018           getBreakRequestsOrBuilder(int index) {
8019         if (breakRequestsBuilder_ == null) {
8020           return breakRequests_.get(index);
8021         } else {
8022           return breakRequestsBuilder_.getMessageOrBuilder(index);
8023         }
8024       }
8025       /**
8026        *
8027        *
8028        * <pre>
8029        * Sequence of breaks. See the `BreakRequest` message.
8030        * </pre>
8031        *
8032        * <code>
8033        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8034        * </code>
8035        */
8036       public java.util.List<
8037               ? extends
8038                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>
getBreakRequestsOrBuilderList()8039           getBreakRequestsOrBuilderList() {
8040         if (breakRequestsBuilder_ != null) {
8041           return breakRequestsBuilder_.getMessageOrBuilderList();
8042         } else {
8043           return java.util.Collections.unmodifiableList(breakRequests_);
8044         }
8045       }
8046       /**
8047        *
8048        *
8049        * <pre>
8050        * Sequence of breaks. See the `BreakRequest` message.
8051        * </pre>
8052        *
8053        * <code>
8054        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8055        * </code>
8056        */
8057       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
addBreakRequestsBuilder()8058           addBreakRequestsBuilder() {
8059         return getBreakRequestsFieldBuilder()
8060             .addBuilder(
8061                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
8062                     .getDefaultInstance());
8063       }
8064       /**
8065        *
8066        *
8067        * <pre>
8068        * Sequence of breaks. See the `BreakRequest` message.
8069        * </pre>
8070        *
8071        * <code>
8072        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8073        * </code>
8074        */
8075       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder
addBreakRequestsBuilder(int index)8076           addBreakRequestsBuilder(int index) {
8077         return getBreakRequestsFieldBuilder()
8078             .addBuilder(
8079                 index,
8080                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest
8081                     .getDefaultInstance());
8082       }
8083       /**
8084        *
8085        *
8086        * <pre>
8087        * Sequence of breaks. See the `BreakRequest` message.
8088        * </pre>
8089        *
8090        * <code>
8091        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1;
8092        * </code>
8093        */
8094       public java.util.List<
8095               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder>
getBreakRequestsBuilderList()8096           getBreakRequestsBuilderList() {
8097         return getBreakRequestsFieldBuilder().getBuilderList();
8098       }
8099 
8100       private com.google.protobuf.RepeatedFieldBuilderV3<
8101               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest,
8102               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder,
8103               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>
getBreakRequestsFieldBuilder()8104           getBreakRequestsFieldBuilder() {
8105         if (breakRequestsBuilder_ == null) {
8106           breakRequestsBuilder_ =
8107               new com.google.protobuf.RepeatedFieldBuilderV3<
8108                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest,
8109                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest.Builder,
8110                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequestOrBuilder>(
8111                   breakRequests_,
8112                   ((bitField0_ & 0x00000001) != 0),
8113                   getParentForChildren(),
8114                   isClean());
8115           breakRequests_ = null;
8116         }
8117         return breakRequestsBuilder_;
8118       }
8119 
8120       private java.util.List<
8121               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
8122           frequencyConstraints_ = java.util.Collections.emptyList();
8123 
ensureFrequencyConstraintsIsMutable()8124       private void ensureFrequencyConstraintsIsMutable() {
8125         if (!((bitField0_ & 0x00000002) != 0)) {
8126           frequencyConstraints_ =
8127               new java.util.ArrayList<
8128                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>(
8129                   frequencyConstraints_);
8130           bitField0_ |= 0x00000002;
8131         }
8132       }
8133 
8134       private com.google.protobuf.RepeatedFieldBuilderV3<
8135               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint,
8136               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder,
8137               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder>
8138           frequencyConstraintsBuilder_;
8139 
8140       /**
8141        *
8142        *
8143        * <pre>
8144        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8145        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8146        * </pre>
8147        *
8148        * <code>
8149        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8150        * </code>
8151        */
8152       public java.util.List<
8153               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
getFrequencyConstraintsList()8154           getFrequencyConstraintsList() {
8155         if (frequencyConstraintsBuilder_ == null) {
8156           return java.util.Collections.unmodifiableList(frequencyConstraints_);
8157         } else {
8158           return frequencyConstraintsBuilder_.getMessageList();
8159         }
8160       }
8161       /**
8162        *
8163        *
8164        * <pre>
8165        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8166        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8167        * </pre>
8168        *
8169        * <code>
8170        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8171        * </code>
8172        */
getFrequencyConstraintsCount()8173       public int getFrequencyConstraintsCount() {
8174         if (frequencyConstraintsBuilder_ == null) {
8175           return frequencyConstraints_.size();
8176         } else {
8177           return frequencyConstraintsBuilder_.getCount();
8178         }
8179       }
8180       /**
8181        *
8182        *
8183        * <pre>
8184        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8185        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8186        * </pre>
8187        *
8188        * <code>
8189        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8190        * </code>
8191        */
8192       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
getFrequencyConstraints(int index)8193           getFrequencyConstraints(int index) {
8194         if (frequencyConstraintsBuilder_ == null) {
8195           return frequencyConstraints_.get(index);
8196         } else {
8197           return frequencyConstraintsBuilder_.getMessage(index);
8198         }
8199       }
8200       /**
8201        *
8202        *
8203        * <pre>
8204        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8205        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8206        * </pre>
8207        *
8208        * <code>
8209        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8210        * </code>
8211        */
setFrequencyConstraints( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value)8212       public Builder setFrequencyConstraints(
8213           int index,
8214           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value) {
8215         if (frequencyConstraintsBuilder_ == null) {
8216           if (value == null) {
8217             throw new NullPointerException();
8218           }
8219           ensureFrequencyConstraintsIsMutable();
8220           frequencyConstraints_.set(index, value);
8221           onChanged();
8222         } else {
8223           frequencyConstraintsBuilder_.setMessage(index, value);
8224         }
8225         return this;
8226       }
8227       /**
8228        *
8229        *
8230        * <pre>
8231        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8232        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8233        * </pre>
8234        *
8235        * <code>
8236        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8237        * </code>
8238        */
setFrequencyConstraints( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder builderForValue)8239       public Builder setFrequencyConstraints(
8240           int index,
8241           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
8242               builderForValue) {
8243         if (frequencyConstraintsBuilder_ == null) {
8244           ensureFrequencyConstraintsIsMutable();
8245           frequencyConstraints_.set(index, builderForValue.build());
8246           onChanged();
8247         } else {
8248           frequencyConstraintsBuilder_.setMessage(index, builderForValue.build());
8249         }
8250         return this;
8251       }
8252       /**
8253        *
8254        *
8255        * <pre>
8256        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8257        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8258        * </pre>
8259        *
8260        * <code>
8261        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8262        * </code>
8263        */
addFrequencyConstraints( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value)8264       public Builder addFrequencyConstraints(
8265           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value) {
8266         if (frequencyConstraintsBuilder_ == null) {
8267           if (value == null) {
8268             throw new NullPointerException();
8269           }
8270           ensureFrequencyConstraintsIsMutable();
8271           frequencyConstraints_.add(value);
8272           onChanged();
8273         } else {
8274           frequencyConstraintsBuilder_.addMessage(value);
8275         }
8276         return this;
8277       }
8278       /**
8279        *
8280        *
8281        * <pre>
8282        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8283        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8284        * </pre>
8285        *
8286        * <code>
8287        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8288        * </code>
8289        */
addFrequencyConstraints( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value)8290       public Builder addFrequencyConstraints(
8291           int index,
8292           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint value) {
8293         if (frequencyConstraintsBuilder_ == null) {
8294           if (value == null) {
8295             throw new NullPointerException();
8296           }
8297           ensureFrequencyConstraintsIsMutable();
8298           frequencyConstraints_.add(index, value);
8299           onChanged();
8300         } else {
8301           frequencyConstraintsBuilder_.addMessage(index, value);
8302         }
8303         return this;
8304       }
8305       /**
8306        *
8307        *
8308        * <pre>
8309        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8310        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8311        * </pre>
8312        *
8313        * <code>
8314        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8315        * </code>
8316        */
addFrequencyConstraints( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder builderForValue)8317       public Builder addFrequencyConstraints(
8318           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
8319               builderForValue) {
8320         if (frequencyConstraintsBuilder_ == null) {
8321           ensureFrequencyConstraintsIsMutable();
8322           frequencyConstraints_.add(builderForValue.build());
8323           onChanged();
8324         } else {
8325           frequencyConstraintsBuilder_.addMessage(builderForValue.build());
8326         }
8327         return this;
8328       }
8329       /**
8330        *
8331        *
8332        * <pre>
8333        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8334        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8335        * </pre>
8336        *
8337        * <code>
8338        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8339        * </code>
8340        */
addFrequencyConstraints( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder builderForValue)8341       public Builder addFrequencyConstraints(
8342           int index,
8343           com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
8344               builderForValue) {
8345         if (frequencyConstraintsBuilder_ == null) {
8346           ensureFrequencyConstraintsIsMutable();
8347           frequencyConstraints_.add(index, builderForValue.build());
8348           onChanged();
8349         } else {
8350           frequencyConstraintsBuilder_.addMessage(index, builderForValue.build());
8351         }
8352         return this;
8353       }
8354       /**
8355        *
8356        *
8357        * <pre>
8358        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8359        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8360        * </pre>
8361        *
8362        * <code>
8363        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8364        * </code>
8365        */
addAllFrequencyConstraints( java.lang.Iterable< ? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint> values)8366       public Builder addAllFrequencyConstraints(
8367           java.lang.Iterable<
8368                   ? extends
8369                       com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint>
8370               values) {
8371         if (frequencyConstraintsBuilder_ == null) {
8372           ensureFrequencyConstraintsIsMutable();
8373           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, frequencyConstraints_);
8374           onChanged();
8375         } else {
8376           frequencyConstraintsBuilder_.addAllMessages(values);
8377         }
8378         return this;
8379       }
8380       /**
8381        *
8382        *
8383        * <pre>
8384        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8385        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8386        * </pre>
8387        *
8388        * <code>
8389        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8390        * </code>
8391        */
clearFrequencyConstraints()8392       public Builder clearFrequencyConstraints() {
8393         if (frequencyConstraintsBuilder_ == null) {
8394           frequencyConstraints_ = java.util.Collections.emptyList();
8395           bitField0_ = (bitField0_ & ~0x00000002);
8396           onChanged();
8397         } else {
8398           frequencyConstraintsBuilder_.clear();
8399         }
8400         return this;
8401       }
8402       /**
8403        *
8404        *
8405        * <pre>
8406        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8407        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8408        * </pre>
8409        *
8410        * <code>
8411        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8412        * </code>
8413        */
removeFrequencyConstraints(int index)8414       public Builder removeFrequencyConstraints(int index) {
8415         if (frequencyConstraintsBuilder_ == null) {
8416           ensureFrequencyConstraintsIsMutable();
8417           frequencyConstraints_.remove(index);
8418           onChanged();
8419         } else {
8420           frequencyConstraintsBuilder_.remove(index);
8421         }
8422         return this;
8423       }
8424       /**
8425        *
8426        *
8427        * <pre>
8428        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8429        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8430        * </pre>
8431        *
8432        * <code>
8433        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8434        * </code>
8435        */
8436       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
getFrequencyConstraintsBuilder(int index)8437           getFrequencyConstraintsBuilder(int index) {
8438         return getFrequencyConstraintsFieldBuilder().getBuilder(index);
8439       }
8440       /**
8441        *
8442        *
8443        * <pre>
8444        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8445        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8446        * </pre>
8447        *
8448        * <code>
8449        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8450        * </code>
8451        */
8452       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder
getFrequencyConstraintsOrBuilder(int index)8453           getFrequencyConstraintsOrBuilder(int index) {
8454         if (frequencyConstraintsBuilder_ == null) {
8455           return frequencyConstraints_.get(index);
8456         } else {
8457           return frequencyConstraintsBuilder_.getMessageOrBuilder(index);
8458         }
8459       }
8460       /**
8461        *
8462        *
8463        * <pre>
8464        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8465        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8466        * </pre>
8467        *
8468        * <code>
8469        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8470        * </code>
8471        */
8472       public java.util.List<
8473               ? extends
8474                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule
8475                       .FrequencyConstraintOrBuilder>
getFrequencyConstraintsOrBuilderList()8476           getFrequencyConstraintsOrBuilderList() {
8477         if (frequencyConstraintsBuilder_ != null) {
8478           return frequencyConstraintsBuilder_.getMessageOrBuilderList();
8479         } else {
8480           return java.util.Collections.unmodifiableList(frequencyConstraints_);
8481         }
8482       }
8483       /**
8484        *
8485        *
8486        * <pre>
8487        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8488        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8489        * </pre>
8490        *
8491        * <code>
8492        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8493        * </code>
8494        */
8495       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
addFrequencyConstraintsBuilder()8496           addFrequencyConstraintsBuilder() {
8497         return getFrequencyConstraintsFieldBuilder()
8498             .addBuilder(
8499                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
8500                     .getDefaultInstance());
8501       }
8502       /**
8503        *
8504        *
8505        * <pre>
8506        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8507        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8508        * </pre>
8509        *
8510        * <code>
8511        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8512        * </code>
8513        */
8514       public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder
addFrequencyConstraintsBuilder(int index)8515           addFrequencyConstraintsBuilder(int index) {
8516         return getFrequencyConstraintsFieldBuilder()
8517             .addBuilder(
8518                 index,
8519                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
8520                     .getDefaultInstance());
8521       }
8522       /**
8523        *
8524        *
8525        * <pre>
8526        * Several `FrequencyConstraint` may apply. They must all be satisfied by
8527        * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`.
8528        * </pre>
8529        *
8530        * <code>
8531        * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2;
8532        * </code>
8533        */
8534       public java.util.List<
8535               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder>
getFrequencyConstraintsBuilderList()8536           getFrequencyConstraintsBuilderList() {
8537         return getFrequencyConstraintsFieldBuilder().getBuilderList();
8538       }
8539 
8540       private com.google.protobuf.RepeatedFieldBuilderV3<
8541               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint,
8542               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint.Builder,
8543               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraintOrBuilder>
getFrequencyConstraintsFieldBuilder()8544           getFrequencyConstraintsFieldBuilder() {
8545         if (frequencyConstraintsBuilder_ == null) {
8546           frequencyConstraintsBuilder_ =
8547               new com.google.protobuf.RepeatedFieldBuilderV3<
8548                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint,
8549                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
8550                       .Builder,
8551                   com.google.cloud.optimization.v1.ShipmentModel.BreakRule
8552                       .FrequencyConstraintOrBuilder>(
8553                   frequencyConstraints_,
8554                   ((bitField0_ & 0x00000002) != 0),
8555                   getParentForChildren(),
8556                   isClean());
8557           frequencyConstraints_ = null;
8558         }
8559         return frequencyConstraintsBuilder_;
8560       }
8561 
8562       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8563       public final Builder setUnknownFields(
8564           final com.google.protobuf.UnknownFieldSet unknownFields) {
8565         return super.setUnknownFields(unknownFields);
8566       }
8567 
8568       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)8569       public final Builder mergeUnknownFields(
8570           final com.google.protobuf.UnknownFieldSet unknownFields) {
8571         return super.mergeUnknownFields(unknownFields);
8572       }
8573 
8574       // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule)
8575     }
8576 
8577     // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel.BreakRule)
8578     private static final com.google.cloud.optimization.v1.ShipmentModel.BreakRule DEFAULT_INSTANCE;
8579 
8580     static {
8581       DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.ShipmentModel.BreakRule();
8582     }
8583 
getDefaultInstance()8584     public static com.google.cloud.optimization.v1.ShipmentModel.BreakRule getDefaultInstance() {
8585       return DEFAULT_INSTANCE;
8586     }
8587 
8588     private static final com.google.protobuf.Parser<BreakRule> PARSER =
8589         new com.google.protobuf.AbstractParser<BreakRule>() {
8590           @java.lang.Override
8591           public BreakRule parsePartialFrom(
8592               com.google.protobuf.CodedInputStream input,
8593               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8594               throws com.google.protobuf.InvalidProtocolBufferException {
8595             Builder builder = newBuilder();
8596             try {
8597               builder.mergeFrom(input, extensionRegistry);
8598             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8599               throw e.setUnfinishedMessage(builder.buildPartial());
8600             } catch (com.google.protobuf.UninitializedMessageException e) {
8601               throw e.asInvalidProtocolBufferException()
8602                   .setUnfinishedMessage(builder.buildPartial());
8603             } catch (java.io.IOException e) {
8604               throw new com.google.protobuf.InvalidProtocolBufferException(e)
8605                   .setUnfinishedMessage(builder.buildPartial());
8606             }
8607             return builder.buildPartial();
8608           }
8609         };
8610 
parser()8611     public static com.google.protobuf.Parser<BreakRule> parser() {
8612       return PARSER;
8613     }
8614 
8615     @java.lang.Override
getParserForType()8616     public com.google.protobuf.Parser<BreakRule> getParserForType() {
8617       return PARSER;
8618     }
8619 
8620     @java.lang.Override
getDefaultInstanceForType()8621     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule getDefaultInstanceForType() {
8622       return DEFAULT_INSTANCE;
8623     }
8624   }
8625 
8626   private int bitField0_;
8627   public static final int SHIPMENTS_FIELD_NUMBER = 1;
8628 
8629   @SuppressWarnings("serial")
8630   private java.util.List<com.google.cloud.optimization.v1.Shipment> shipments_;
8631   /**
8632    *
8633    *
8634    * <pre>
8635    * Set of shipments which must be performed in the model.
8636    * </pre>
8637    *
8638    * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
8639    */
8640   @java.lang.Override
getShipmentsList()8641   public java.util.List<com.google.cloud.optimization.v1.Shipment> getShipmentsList() {
8642     return shipments_;
8643   }
8644   /**
8645    *
8646    *
8647    * <pre>
8648    * Set of shipments which must be performed in the model.
8649    * </pre>
8650    *
8651    * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
8652    */
8653   @java.lang.Override
8654   public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentOrBuilder>
getShipmentsOrBuilderList()8655       getShipmentsOrBuilderList() {
8656     return shipments_;
8657   }
8658   /**
8659    *
8660    *
8661    * <pre>
8662    * Set of shipments which must be performed in the model.
8663    * </pre>
8664    *
8665    * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
8666    */
8667   @java.lang.Override
getShipmentsCount()8668   public int getShipmentsCount() {
8669     return shipments_.size();
8670   }
8671   /**
8672    *
8673    *
8674    * <pre>
8675    * Set of shipments which must be performed in the model.
8676    * </pre>
8677    *
8678    * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
8679    */
8680   @java.lang.Override
getShipments(int index)8681   public com.google.cloud.optimization.v1.Shipment getShipments(int index) {
8682     return shipments_.get(index);
8683   }
8684   /**
8685    *
8686    *
8687    * <pre>
8688    * Set of shipments which must be performed in the model.
8689    * </pre>
8690    *
8691    * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
8692    */
8693   @java.lang.Override
getShipmentsOrBuilder(int index)8694   public com.google.cloud.optimization.v1.ShipmentOrBuilder getShipmentsOrBuilder(int index) {
8695     return shipments_.get(index);
8696   }
8697 
8698   public static final int VEHICLES_FIELD_NUMBER = 2;
8699 
8700   @SuppressWarnings("serial")
8701   private java.util.List<com.google.cloud.optimization.v1.Vehicle> vehicles_;
8702   /**
8703    *
8704    *
8705    * <pre>
8706    * Set of vehicles which can be used to perform visits.
8707    * </pre>
8708    *
8709    * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
8710    */
8711   @java.lang.Override
getVehiclesList()8712   public java.util.List<com.google.cloud.optimization.v1.Vehicle> getVehiclesList() {
8713     return vehicles_;
8714   }
8715   /**
8716    *
8717    *
8718    * <pre>
8719    * Set of vehicles which can be used to perform visits.
8720    * </pre>
8721    *
8722    * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
8723    */
8724   @java.lang.Override
8725   public java.util.List<? extends com.google.cloud.optimization.v1.VehicleOrBuilder>
getVehiclesOrBuilderList()8726       getVehiclesOrBuilderList() {
8727     return vehicles_;
8728   }
8729   /**
8730    *
8731    *
8732    * <pre>
8733    * Set of vehicles which can be used to perform visits.
8734    * </pre>
8735    *
8736    * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
8737    */
8738   @java.lang.Override
getVehiclesCount()8739   public int getVehiclesCount() {
8740     return vehicles_.size();
8741   }
8742   /**
8743    *
8744    *
8745    * <pre>
8746    * Set of vehicles which can be used to perform visits.
8747    * </pre>
8748    *
8749    * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
8750    */
8751   @java.lang.Override
getVehicles(int index)8752   public com.google.cloud.optimization.v1.Vehicle getVehicles(int index) {
8753     return vehicles_.get(index);
8754   }
8755   /**
8756    *
8757    *
8758    * <pre>
8759    * Set of vehicles which can be used to perform visits.
8760    * </pre>
8761    *
8762    * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
8763    */
8764   @java.lang.Override
getVehiclesOrBuilder(int index)8765   public com.google.cloud.optimization.v1.VehicleOrBuilder getVehiclesOrBuilder(int index) {
8766     return vehicles_.get(index);
8767   }
8768 
8769   public static final int MAX_ACTIVE_VEHICLES_FIELD_NUMBER = 4;
8770   private int maxActiveVehicles_ = 0;
8771   /**
8772    *
8773    *
8774    * <pre>
8775    * Constrains the maximum number of active vehicles. A vehicle is active if
8776    * its route performs at least one shipment. This can be used to limit the
8777    * number of routes in the case where there are fewer drivers than
8778    * vehicles and that the fleet of vehicles is heterogeneous. The optimization
8779    * will then select the best subset of vehicles to use.
8780    * Must be strictly positive.
8781    * </pre>
8782    *
8783    * <code>optional int32 max_active_vehicles = 4;</code>
8784    *
8785    * @return Whether the maxActiveVehicles field is set.
8786    */
8787   @java.lang.Override
hasMaxActiveVehicles()8788   public boolean hasMaxActiveVehicles() {
8789     return ((bitField0_ & 0x00000001) != 0);
8790   }
8791   /**
8792    *
8793    *
8794    * <pre>
8795    * Constrains the maximum number of active vehicles. A vehicle is active if
8796    * its route performs at least one shipment. This can be used to limit the
8797    * number of routes in the case where there are fewer drivers than
8798    * vehicles and that the fleet of vehicles is heterogeneous. The optimization
8799    * will then select the best subset of vehicles to use.
8800    * Must be strictly positive.
8801    * </pre>
8802    *
8803    * <code>optional int32 max_active_vehicles = 4;</code>
8804    *
8805    * @return The maxActiveVehicles.
8806    */
8807   @java.lang.Override
getMaxActiveVehicles()8808   public int getMaxActiveVehicles() {
8809     return maxActiveVehicles_;
8810   }
8811 
8812   public static final int GLOBAL_START_TIME_FIELD_NUMBER = 5;
8813   private com.google.protobuf.Timestamp globalStartTime_;
8814   /**
8815    *
8816    *
8817    * <pre>
8818    * Global start and end time of the model: no times outside of this range
8819    * can be considered valid.
8820    * The model's time span must be less than a year, i.e. the `global_end_time`
8821    * and the `global_start_time` must be within 31536000 seconds of each other.
8822    * When using `cost_per_*hour` fields, you might want to set this window to a
8823    * smaller interval to increase performance (eg. if you model a single day,
8824    * you should set the global time limits to that day).
8825    * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
8826    * as default.
8827    * </pre>
8828    *
8829    * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
8830    *
8831    * @return Whether the globalStartTime field is set.
8832    */
8833   @java.lang.Override
hasGlobalStartTime()8834   public boolean hasGlobalStartTime() {
8835     return globalStartTime_ != null;
8836   }
8837   /**
8838    *
8839    *
8840    * <pre>
8841    * Global start and end time of the model: no times outside of this range
8842    * can be considered valid.
8843    * The model's time span must be less than a year, i.e. the `global_end_time`
8844    * and the `global_start_time` must be within 31536000 seconds of each other.
8845    * When using `cost_per_*hour` fields, you might want to set this window to a
8846    * smaller interval to increase performance (eg. if you model a single day,
8847    * you should set the global time limits to that day).
8848    * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
8849    * as default.
8850    * </pre>
8851    *
8852    * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
8853    *
8854    * @return The globalStartTime.
8855    */
8856   @java.lang.Override
getGlobalStartTime()8857   public com.google.protobuf.Timestamp getGlobalStartTime() {
8858     return globalStartTime_ == null
8859         ? com.google.protobuf.Timestamp.getDefaultInstance()
8860         : globalStartTime_;
8861   }
8862   /**
8863    *
8864    *
8865    * <pre>
8866    * Global start and end time of the model: no times outside of this range
8867    * can be considered valid.
8868    * The model's time span must be less than a year, i.e. the `global_end_time`
8869    * and the `global_start_time` must be within 31536000 seconds of each other.
8870    * When using `cost_per_*hour` fields, you might want to set this window to a
8871    * smaller interval to increase performance (eg. if you model a single day,
8872    * you should set the global time limits to that day).
8873    * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
8874    * as default.
8875    * </pre>
8876    *
8877    * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
8878    */
8879   @java.lang.Override
getGlobalStartTimeOrBuilder()8880   public com.google.protobuf.TimestampOrBuilder getGlobalStartTimeOrBuilder() {
8881     return globalStartTime_ == null
8882         ? com.google.protobuf.Timestamp.getDefaultInstance()
8883         : globalStartTime_;
8884   }
8885 
8886   public static final int GLOBAL_END_TIME_FIELD_NUMBER = 6;
8887   private com.google.protobuf.Timestamp globalEndTime_;
8888   /**
8889    *
8890    *
8891    * <pre>
8892    * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
8893    * is used as default.
8894    * </pre>
8895    *
8896    * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
8897    *
8898    * @return Whether the globalEndTime field is set.
8899    */
8900   @java.lang.Override
hasGlobalEndTime()8901   public boolean hasGlobalEndTime() {
8902     return globalEndTime_ != null;
8903   }
8904   /**
8905    *
8906    *
8907    * <pre>
8908    * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
8909    * is used as default.
8910    * </pre>
8911    *
8912    * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
8913    *
8914    * @return The globalEndTime.
8915    */
8916   @java.lang.Override
getGlobalEndTime()8917   public com.google.protobuf.Timestamp getGlobalEndTime() {
8918     return globalEndTime_ == null
8919         ? com.google.protobuf.Timestamp.getDefaultInstance()
8920         : globalEndTime_;
8921   }
8922   /**
8923    *
8924    *
8925    * <pre>
8926    * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
8927    * is used as default.
8928    * </pre>
8929    *
8930    * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
8931    */
8932   @java.lang.Override
getGlobalEndTimeOrBuilder()8933   public com.google.protobuf.TimestampOrBuilder getGlobalEndTimeOrBuilder() {
8934     return globalEndTime_ == null
8935         ? com.google.protobuf.Timestamp.getDefaultInstance()
8936         : globalEndTime_;
8937   }
8938 
8939   public static final int GLOBAL_DURATION_COST_PER_HOUR_FIELD_NUMBER = 7;
8940   private double globalDurationCostPerHour_ = 0D;
8941   /**
8942    *
8943    *
8944    * <pre>
8945    * The "global duration" of the overall plan is the difference between the
8946    * earliest effective start time and the latest effective end time of
8947    * all vehicles. Users can assign a cost per hour to that quantity to try
8948    * and optimize for earliest job completion, for example. This cost must be in
8949    * the same unit as
8950    * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
8951    * </pre>
8952    *
8953    * <code>double global_duration_cost_per_hour = 7;</code>
8954    *
8955    * @return The globalDurationCostPerHour.
8956    */
8957   @java.lang.Override
getGlobalDurationCostPerHour()8958   public double getGlobalDurationCostPerHour() {
8959     return globalDurationCostPerHour_;
8960   }
8961 
8962   public static final int DURATION_DISTANCE_MATRICES_FIELD_NUMBER = 8;
8963 
8964   @SuppressWarnings("serial")
8965   private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>
8966       durationDistanceMatrices_;
8967   /**
8968    *
8969    *
8970    * <pre>
8971    * Specifies duration and distance matrices used in the model. If this field
8972    * is empty, Google Maps or geodesic distances will be used instead, depending
8973    * on the value of the `use_geodesic_distances` field. If it is not empty,
8974    * `use_geodesic_distances` cannot be true and neither
8975    * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
8976    * can be empty.
8977    * Usage examples:
8978    * * There are two locations: locA and locB.
8979    * * 1 vehicle starting its route at locA and ending it at locA.
8980    * * 1 pickup visit request at locB.
8981    * ```
8982    * model {
8983    *   vehicles { start_tags: "locA"  end_tags: "locA" }
8984    *   shipments { pickups { tags: "locB" } }
8985    *   duration_distance_matrix_src_tags: "locA"
8986    *   duration_distance_matrix_src_tags: "locB"
8987    *   duration_distance_matrix_dst_tags: "locA"
8988    *   duration_distance_matrix_dst_tags: "locB"
8989    *   duration_distance_matrices {
8990    *     rows {  # from: locA
8991    *       durations { seconds: 0 }   meters: 0    # to: locA
8992    *       durations { seconds: 100 } meters: 1000 # to: locB
8993    *     }
8994    *     rows {  # from: locB
8995    *       durations { seconds: 102 } meters: 990 # to: locA
8996    *       durations { seconds: 0 }   meters: 0   # to: locB
8997    *     }
8998    *   }
8999    * }
9000    * ```
9001    * * There are three locations: locA, locB and locC.
9002    * * 1 vehicle starting its route at locA and ending it at locB, using
9003    *   matrix "fast".
9004    * * 1 vehicle starting its route at locB and ending it at locB, using
9005    *   matrix "slow".
9006    * * 1 vehicle starting its route at locB and ending it at locB, using
9007    *   matrix "fast".
9008    * * 1 pickup visit request at locC.
9009    * ```
9010    * model {
9011    *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
9012    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
9013    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
9014    *   shipments { pickups { tags: "locC" } }
9015    *   duration_distance_matrix_src_tags: "locA"
9016    *   duration_distance_matrix_src_tags: "locB"
9017    *   duration_distance_matrix_src_tags: "locC"
9018    *   duration_distance_matrix_dst_tags: "locB"
9019    *   duration_distance_matrix_dst_tags: "locC"
9020    *   duration_distance_matrices {
9021    *     vehicle_start_tag: "fast"
9022    *     rows {  # from: locA
9023    *       durations { seconds: 1000 } meters: 2000 # to: locB
9024    *       durations { seconds: 600 }  meters: 1000 # to: locC
9025    *     }
9026    *     rows {  # from: locB
9027    *       durations { seconds: 0 }   meters: 0    # to: locB
9028    *       durations { seconds: 700 } meters: 1200 # to: locC
9029    *     }
9030    *     rows {  # from: locC
9031    *       durations { seconds: 702 } meters: 1190 # to: locB
9032    *       durations { seconds: 0 }   meters: 0    # to: locC
9033    *     }
9034    *   }
9035    *   duration_distance_matrices {
9036    *     vehicle_start_tag: "slow"
9037    *     rows {  # from: locA
9038    *       durations { seconds: 1800 } meters: 2001 # to: locB
9039    *       durations { seconds: 900 }  meters: 1002 # to: locC
9040    *     }
9041    *     rows {  # from: locB
9042    *       durations { seconds: 0 }    meters: 0    # to: locB
9043    *       durations { seconds: 1000 } meters: 1202 # to: locC
9044    *     }
9045    *     rows {  # from: locC
9046    *       durations { seconds: 1001 } meters: 1195 # to: locB
9047    *       durations { seconds: 0 }    meters: 0    # to: locC
9048    *     }
9049    *   }
9050    * }
9051    * ```
9052    * </pre>
9053    *
9054    * <code>
9055    * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
9056    * </code>
9057    */
9058   @java.lang.Override
9059   public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>
getDurationDistanceMatricesList()9060       getDurationDistanceMatricesList() {
9061     return durationDistanceMatrices_;
9062   }
9063   /**
9064    *
9065    *
9066    * <pre>
9067    * Specifies duration and distance matrices used in the model. If this field
9068    * is empty, Google Maps or geodesic distances will be used instead, depending
9069    * on the value of the `use_geodesic_distances` field. If it is not empty,
9070    * `use_geodesic_distances` cannot be true and neither
9071    * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
9072    * can be empty.
9073    * Usage examples:
9074    * * There are two locations: locA and locB.
9075    * * 1 vehicle starting its route at locA and ending it at locA.
9076    * * 1 pickup visit request at locB.
9077    * ```
9078    * model {
9079    *   vehicles { start_tags: "locA"  end_tags: "locA" }
9080    *   shipments { pickups { tags: "locB" } }
9081    *   duration_distance_matrix_src_tags: "locA"
9082    *   duration_distance_matrix_src_tags: "locB"
9083    *   duration_distance_matrix_dst_tags: "locA"
9084    *   duration_distance_matrix_dst_tags: "locB"
9085    *   duration_distance_matrices {
9086    *     rows {  # from: locA
9087    *       durations { seconds: 0 }   meters: 0    # to: locA
9088    *       durations { seconds: 100 } meters: 1000 # to: locB
9089    *     }
9090    *     rows {  # from: locB
9091    *       durations { seconds: 102 } meters: 990 # to: locA
9092    *       durations { seconds: 0 }   meters: 0   # to: locB
9093    *     }
9094    *   }
9095    * }
9096    * ```
9097    * * There are three locations: locA, locB and locC.
9098    * * 1 vehicle starting its route at locA and ending it at locB, using
9099    *   matrix "fast".
9100    * * 1 vehicle starting its route at locB and ending it at locB, using
9101    *   matrix "slow".
9102    * * 1 vehicle starting its route at locB and ending it at locB, using
9103    *   matrix "fast".
9104    * * 1 pickup visit request at locC.
9105    * ```
9106    * model {
9107    *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
9108    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
9109    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
9110    *   shipments { pickups { tags: "locC" } }
9111    *   duration_distance_matrix_src_tags: "locA"
9112    *   duration_distance_matrix_src_tags: "locB"
9113    *   duration_distance_matrix_src_tags: "locC"
9114    *   duration_distance_matrix_dst_tags: "locB"
9115    *   duration_distance_matrix_dst_tags: "locC"
9116    *   duration_distance_matrices {
9117    *     vehicle_start_tag: "fast"
9118    *     rows {  # from: locA
9119    *       durations { seconds: 1000 } meters: 2000 # to: locB
9120    *       durations { seconds: 600 }  meters: 1000 # to: locC
9121    *     }
9122    *     rows {  # from: locB
9123    *       durations { seconds: 0 }   meters: 0    # to: locB
9124    *       durations { seconds: 700 } meters: 1200 # to: locC
9125    *     }
9126    *     rows {  # from: locC
9127    *       durations { seconds: 702 } meters: 1190 # to: locB
9128    *       durations { seconds: 0 }   meters: 0    # to: locC
9129    *     }
9130    *   }
9131    *   duration_distance_matrices {
9132    *     vehicle_start_tag: "slow"
9133    *     rows {  # from: locA
9134    *       durations { seconds: 1800 } meters: 2001 # to: locB
9135    *       durations { seconds: 900 }  meters: 1002 # to: locC
9136    *     }
9137    *     rows {  # from: locB
9138    *       durations { seconds: 0 }    meters: 0    # to: locB
9139    *       durations { seconds: 1000 } meters: 1202 # to: locC
9140    *     }
9141    *     rows {  # from: locC
9142    *       durations { seconds: 1001 } meters: 1195 # to: locB
9143    *       durations { seconds: 0 }    meters: 0    # to: locC
9144    *     }
9145    *   }
9146    * }
9147    * ```
9148    * </pre>
9149    *
9150    * <code>
9151    * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
9152    * </code>
9153    */
9154   @java.lang.Override
9155   public java.util.List<
9156           ? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>
getDurationDistanceMatricesOrBuilderList()9157       getDurationDistanceMatricesOrBuilderList() {
9158     return durationDistanceMatrices_;
9159   }
9160   /**
9161    *
9162    *
9163    * <pre>
9164    * Specifies duration and distance matrices used in the model. If this field
9165    * is empty, Google Maps or geodesic distances will be used instead, depending
9166    * on the value of the `use_geodesic_distances` field. If it is not empty,
9167    * `use_geodesic_distances` cannot be true and neither
9168    * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
9169    * can be empty.
9170    * Usage examples:
9171    * * There are two locations: locA and locB.
9172    * * 1 vehicle starting its route at locA and ending it at locA.
9173    * * 1 pickup visit request at locB.
9174    * ```
9175    * model {
9176    *   vehicles { start_tags: "locA"  end_tags: "locA" }
9177    *   shipments { pickups { tags: "locB" } }
9178    *   duration_distance_matrix_src_tags: "locA"
9179    *   duration_distance_matrix_src_tags: "locB"
9180    *   duration_distance_matrix_dst_tags: "locA"
9181    *   duration_distance_matrix_dst_tags: "locB"
9182    *   duration_distance_matrices {
9183    *     rows {  # from: locA
9184    *       durations { seconds: 0 }   meters: 0    # to: locA
9185    *       durations { seconds: 100 } meters: 1000 # to: locB
9186    *     }
9187    *     rows {  # from: locB
9188    *       durations { seconds: 102 } meters: 990 # to: locA
9189    *       durations { seconds: 0 }   meters: 0   # to: locB
9190    *     }
9191    *   }
9192    * }
9193    * ```
9194    * * There are three locations: locA, locB and locC.
9195    * * 1 vehicle starting its route at locA and ending it at locB, using
9196    *   matrix "fast".
9197    * * 1 vehicle starting its route at locB and ending it at locB, using
9198    *   matrix "slow".
9199    * * 1 vehicle starting its route at locB and ending it at locB, using
9200    *   matrix "fast".
9201    * * 1 pickup visit request at locC.
9202    * ```
9203    * model {
9204    *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
9205    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
9206    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
9207    *   shipments { pickups { tags: "locC" } }
9208    *   duration_distance_matrix_src_tags: "locA"
9209    *   duration_distance_matrix_src_tags: "locB"
9210    *   duration_distance_matrix_src_tags: "locC"
9211    *   duration_distance_matrix_dst_tags: "locB"
9212    *   duration_distance_matrix_dst_tags: "locC"
9213    *   duration_distance_matrices {
9214    *     vehicle_start_tag: "fast"
9215    *     rows {  # from: locA
9216    *       durations { seconds: 1000 } meters: 2000 # to: locB
9217    *       durations { seconds: 600 }  meters: 1000 # to: locC
9218    *     }
9219    *     rows {  # from: locB
9220    *       durations { seconds: 0 }   meters: 0    # to: locB
9221    *       durations { seconds: 700 } meters: 1200 # to: locC
9222    *     }
9223    *     rows {  # from: locC
9224    *       durations { seconds: 702 } meters: 1190 # to: locB
9225    *       durations { seconds: 0 }   meters: 0    # to: locC
9226    *     }
9227    *   }
9228    *   duration_distance_matrices {
9229    *     vehicle_start_tag: "slow"
9230    *     rows {  # from: locA
9231    *       durations { seconds: 1800 } meters: 2001 # to: locB
9232    *       durations { seconds: 900 }  meters: 1002 # to: locC
9233    *     }
9234    *     rows {  # from: locB
9235    *       durations { seconds: 0 }    meters: 0    # to: locB
9236    *       durations { seconds: 1000 } meters: 1202 # to: locC
9237    *     }
9238    *     rows {  # from: locC
9239    *       durations { seconds: 1001 } meters: 1195 # to: locB
9240    *       durations { seconds: 0 }    meters: 0    # to: locC
9241    *     }
9242    *   }
9243    * }
9244    * ```
9245    * </pre>
9246    *
9247    * <code>
9248    * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
9249    * </code>
9250    */
9251   @java.lang.Override
getDurationDistanceMatricesCount()9252   public int getDurationDistanceMatricesCount() {
9253     return durationDistanceMatrices_.size();
9254   }
9255   /**
9256    *
9257    *
9258    * <pre>
9259    * Specifies duration and distance matrices used in the model. If this field
9260    * is empty, Google Maps or geodesic distances will be used instead, depending
9261    * on the value of the `use_geodesic_distances` field. If it is not empty,
9262    * `use_geodesic_distances` cannot be true and neither
9263    * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
9264    * can be empty.
9265    * Usage examples:
9266    * * There are two locations: locA and locB.
9267    * * 1 vehicle starting its route at locA and ending it at locA.
9268    * * 1 pickup visit request at locB.
9269    * ```
9270    * model {
9271    *   vehicles { start_tags: "locA"  end_tags: "locA" }
9272    *   shipments { pickups { tags: "locB" } }
9273    *   duration_distance_matrix_src_tags: "locA"
9274    *   duration_distance_matrix_src_tags: "locB"
9275    *   duration_distance_matrix_dst_tags: "locA"
9276    *   duration_distance_matrix_dst_tags: "locB"
9277    *   duration_distance_matrices {
9278    *     rows {  # from: locA
9279    *       durations { seconds: 0 }   meters: 0    # to: locA
9280    *       durations { seconds: 100 } meters: 1000 # to: locB
9281    *     }
9282    *     rows {  # from: locB
9283    *       durations { seconds: 102 } meters: 990 # to: locA
9284    *       durations { seconds: 0 }   meters: 0   # to: locB
9285    *     }
9286    *   }
9287    * }
9288    * ```
9289    * * There are three locations: locA, locB and locC.
9290    * * 1 vehicle starting its route at locA and ending it at locB, using
9291    *   matrix "fast".
9292    * * 1 vehicle starting its route at locB and ending it at locB, using
9293    *   matrix "slow".
9294    * * 1 vehicle starting its route at locB and ending it at locB, using
9295    *   matrix "fast".
9296    * * 1 pickup visit request at locC.
9297    * ```
9298    * model {
9299    *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
9300    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
9301    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
9302    *   shipments { pickups { tags: "locC" } }
9303    *   duration_distance_matrix_src_tags: "locA"
9304    *   duration_distance_matrix_src_tags: "locB"
9305    *   duration_distance_matrix_src_tags: "locC"
9306    *   duration_distance_matrix_dst_tags: "locB"
9307    *   duration_distance_matrix_dst_tags: "locC"
9308    *   duration_distance_matrices {
9309    *     vehicle_start_tag: "fast"
9310    *     rows {  # from: locA
9311    *       durations { seconds: 1000 } meters: 2000 # to: locB
9312    *       durations { seconds: 600 }  meters: 1000 # to: locC
9313    *     }
9314    *     rows {  # from: locB
9315    *       durations { seconds: 0 }   meters: 0    # to: locB
9316    *       durations { seconds: 700 } meters: 1200 # to: locC
9317    *     }
9318    *     rows {  # from: locC
9319    *       durations { seconds: 702 } meters: 1190 # to: locB
9320    *       durations { seconds: 0 }   meters: 0    # to: locC
9321    *     }
9322    *   }
9323    *   duration_distance_matrices {
9324    *     vehicle_start_tag: "slow"
9325    *     rows {  # from: locA
9326    *       durations { seconds: 1800 } meters: 2001 # to: locB
9327    *       durations { seconds: 900 }  meters: 1002 # to: locC
9328    *     }
9329    *     rows {  # from: locB
9330    *       durations { seconds: 0 }    meters: 0    # to: locB
9331    *       durations { seconds: 1000 } meters: 1202 # to: locC
9332    *     }
9333    *     rows {  # from: locC
9334    *       durations { seconds: 1001 } meters: 1195 # to: locB
9335    *       durations { seconds: 0 }    meters: 0    # to: locC
9336    *     }
9337    *   }
9338    * }
9339    * ```
9340    * </pre>
9341    *
9342    * <code>
9343    * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
9344    * </code>
9345    */
9346   @java.lang.Override
9347   public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
getDurationDistanceMatrices(int index)9348       getDurationDistanceMatrices(int index) {
9349     return durationDistanceMatrices_.get(index);
9350   }
9351   /**
9352    *
9353    *
9354    * <pre>
9355    * Specifies duration and distance matrices used in the model. If this field
9356    * is empty, Google Maps or geodesic distances will be used instead, depending
9357    * on the value of the `use_geodesic_distances` field. If it is not empty,
9358    * `use_geodesic_distances` cannot be true and neither
9359    * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
9360    * can be empty.
9361    * Usage examples:
9362    * * There are two locations: locA and locB.
9363    * * 1 vehicle starting its route at locA and ending it at locA.
9364    * * 1 pickup visit request at locB.
9365    * ```
9366    * model {
9367    *   vehicles { start_tags: "locA"  end_tags: "locA" }
9368    *   shipments { pickups { tags: "locB" } }
9369    *   duration_distance_matrix_src_tags: "locA"
9370    *   duration_distance_matrix_src_tags: "locB"
9371    *   duration_distance_matrix_dst_tags: "locA"
9372    *   duration_distance_matrix_dst_tags: "locB"
9373    *   duration_distance_matrices {
9374    *     rows {  # from: locA
9375    *       durations { seconds: 0 }   meters: 0    # to: locA
9376    *       durations { seconds: 100 } meters: 1000 # to: locB
9377    *     }
9378    *     rows {  # from: locB
9379    *       durations { seconds: 102 } meters: 990 # to: locA
9380    *       durations { seconds: 0 }   meters: 0   # to: locB
9381    *     }
9382    *   }
9383    * }
9384    * ```
9385    * * There are three locations: locA, locB and locC.
9386    * * 1 vehicle starting its route at locA and ending it at locB, using
9387    *   matrix "fast".
9388    * * 1 vehicle starting its route at locB and ending it at locB, using
9389    *   matrix "slow".
9390    * * 1 vehicle starting its route at locB and ending it at locB, using
9391    *   matrix "fast".
9392    * * 1 pickup visit request at locC.
9393    * ```
9394    * model {
9395    *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
9396    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
9397    *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
9398    *   shipments { pickups { tags: "locC" } }
9399    *   duration_distance_matrix_src_tags: "locA"
9400    *   duration_distance_matrix_src_tags: "locB"
9401    *   duration_distance_matrix_src_tags: "locC"
9402    *   duration_distance_matrix_dst_tags: "locB"
9403    *   duration_distance_matrix_dst_tags: "locC"
9404    *   duration_distance_matrices {
9405    *     vehicle_start_tag: "fast"
9406    *     rows {  # from: locA
9407    *       durations { seconds: 1000 } meters: 2000 # to: locB
9408    *       durations { seconds: 600 }  meters: 1000 # to: locC
9409    *     }
9410    *     rows {  # from: locB
9411    *       durations { seconds: 0 }   meters: 0    # to: locB
9412    *       durations { seconds: 700 } meters: 1200 # to: locC
9413    *     }
9414    *     rows {  # from: locC
9415    *       durations { seconds: 702 } meters: 1190 # to: locB
9416    *       durations { seconds: 0 }   meters: 0    # to: locC
9417    *     }
9418    *   }
9419    *   duration_distance_matrices {
9420    *     vehicle_start_tag: "slow"
9421    *     rows {  # from: locA
9422    *       durations { seconds: 1800 } meters: 2001 # to: locB
9423    *       durations { seconds: 900 }  meters: 1002 # to: locC
9424    *     }
9425    *     rows {  # from: locB
9426    *       durations { seconds: 0 }    meters: 0    # to: locB
9427    *       durations { seconds: 1000 } meters: 1202 # to: locC
9428    *     }
9429    *     rows {  # from: locC
9430    *       durations { seconds: 1001 } meters: 1195 # to: locB
9431    *       durations { seconds: 0 }    meters: 0    # to: locC
9432    *     }
9433    *   }
9434    * }
9435    * ```
9436    * </pre>
9437    *
9438    * <code>
9439    * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
9440    * </code>
9441    */
9442   @java.lang.Override
9443   public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder
getDurationDistanceMatricesOrBuilder(int index)9444       getDurationDistanceMatricesOrBuilder(int index) {
9445     return durationDistanceMatrices_.get(index);
9446   }
9447 
9448   public static final int DURATION_DISTANCE_MATRIX_SRC_TAGS_FIELD_NUMBER = 9;
9449 
9450   @SuppressWarnings("serial")
9451   private com.google.protobuf.LazyStringList durationDistanceMatrixSrcTags_;
9452   /**
9453    *
9454    *
9455    * <pre>
9456    * Tags defining the sources of the duration and distance matrices;
9457    * `duration_distance_matrices(i).rows(j)` defines durations and distances
9458    * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
9459    * in matrix i.
9460    * Tags correspond to
9461    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9462    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9463    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9464    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9465    * the same; similarly a `VisitRequest`'s source and destination tags may be
9466    * the same. All tags must be different and cannot be empty strings. If this
9467    * field is not empty, then `duration_distance_matrices` must not be empty.
9468    * </pre>
9469    *
9470    * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
9471    *
9472    * @return A list containing the durationDistanceMatrixSrcTags.
9473    */
getDurationDistanceMatrixSrcTagsList()9474   public com.google.protobuf.ProtocolStringList getDurationDistanceMatrixSrcTagsList() {
9475     return durationDistanceMatrixSrcTags_;
9476   }
9477   /**
9478    *
9479    *
9480    * <pre>
9481    * Tags defining the sources of the duration and distance matrices;
9482    * `duration_distance_matrices(i).rows(j)` defines durations and distances
9483    * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
9484    * in matrix i.
9485    * Tags correspond to
9486    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9487    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9488    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9489    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9490    * the same; similarly a `VisitRequest`'s source and destination tags may be
9491    * the same. All tags must be different and cannot be empty strings. If this
9492    * field is not empty, then `duration_distance_matrices` must not be empty.
9493    * </pre>
9494    *
9495    * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
9496    *
9497    * @return The count of durationDistanceMatrixSrcTags.
9498    */
getDurationDistanceMatrixSrcTagsCount()9499   public int getDurationDistanceMatrixSrcTagsCount() {
9500     return durationDistanceMatrixSrcTags_.size();
9501   }
9502   /**
9503    *
9504    *
9505    * <pre>
9506    * Tags defining the sources of the duration and distance matrices;
9507    * `duration_distance_matrices(i).rows(j)` defines durations and distances
9508    * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
9509    * in matrix i.
9510    * Tags correspond to
9511    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9512    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9513    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9514    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9515    * the same; similarly a `VisitRequest`'s source and destination tags may be
9516    * the same. All tags must be different and cannot be empty strings. If this
9517    * field is not empty, then `duration_distance_matrices` must not be empty.
9518    * </pre>
9519    *
9520    * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
9521    *
9522    * @param index The index of the element to return.
9523    * @return The durationDistanceMatrixSrcTags at the given index.
9524    */
getDurationDistanceMatrixSrcTags(int index)9525   public java.lang.String getDurationDistanceMatrixSrcTags(int index) {
9526     return durationDistanceMatrixSrcTags_.get(index);
9527   }
9528   /**
9529    *
9530    *
9531    * <pre>
9532    * Tags defining the sources of the duration and distance matrices;
9533    * `duration_distance_matrices(i).rows(j)` defines durations and distances
9534    * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
9535    * in matrix i.
9536    * Tags correspond to
9537    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9538    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9539    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9540    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9541    * the same; similarly a `VisitRequest`'s source and destination tags may be
9542    * the same. All tags must be different and cannot be empty strings. If this
9543    * field is not empty, then `duration_distance_matrices` must not be empty.
9544    * </pre>
9545    *
9546    * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
9547    *
9548    * @param index The index of the value to return.
9549    * @return The bytes of the durationDistanceMatrixSrcTags at the given index.
9550    */
getDurationDistanceMatrixSrcTagsBytes(int index)9551   public com.google.protobuf.ByteString getDurationDistanceMatrixSrcTagsBytes(int index) {
9552     return durationDistanceMatrixSrcTags_.getByteString(index);
9553   }
9554 
9555   public static final int DURATION_DISTANCE_MATRIX_DST_TAGS_FIELD_NUMBER = 10;
9556 
9557   @SuppressWarnings("serial")
9558   private com.google.protobuf.LazyStringList durationDistanceMatrixDstTags_;
9559   /**
9560    *
9561    *
9562    * <pre>
9563    * Tags defining the destinations of the duration and distance matrices;
9564    * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
9565    * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
9566    * (resp. the distance) of the travel from visits with tag
9567    * `duration_distance_matrix_src_tags(j)` to visits with tag
9568    * `duration_distance_matrix_dst_tags(k)` in matrix i.
9569    * Tags correspond to
9570    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9571    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9572    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9573    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9574    * the same; similarly a `VisitRequest`'s source and destination tags may be
9575    * the same. All tags must be different and cannot be empty strings. If this
9576    * field is not empty, then `duration_distance_matrices` must not be empty.
9577    * </pre>
9578    *
9579    * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
9580    *
9581    * @return A list containing the durationDistanceMatrixDstTags.
9582    */
getDurationDistanceMatrixDstTagsList()9583   public com.google.protobuf.ProtocolStringList getDurationDistanceMatrixDstTagsList() {
9584     return durationDistanceMatrixDstTags_;
9585   }
9586   /**
9587    *
9588    *
9589    * <pre>
9590    * Tags defining the destinations of the duration and distance matrices;
9591    * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
9592    * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
9593    * (resp. the distance) of the travel from visits with tag
9594    * `duration_distance_matrix_src_tags(j)` to visits with tag
9595    * `duration_distance_matrix_dst_tags(k)` in matrix i.
9596    * Tags correspond to
9597    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9598    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9599    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9600    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9601    * the same; similarly a `VisitRequest`'s source and destination tags may be
9602    * the same. All tags must be different and cannot be empty strings. If this
9603    * field is not empty, then `duration_distance_matrices` must not be empty.
9604    * </pre>
9605    *
9606    * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
9607    *
9608    * @return The count of durationDistanceMatrixDstTags.
9609    */
getDurationDistanceMatrixDstTagsCount()9610   public int getDurationDistanceMatrixDstTagsCount() {
9611     return durationDistanceMatrixDstTags_.size();
9612   }
9613   /**
9614    *
9615    *
9616    * <pre>
9617    * Tags defining the destinations of the duration and distance matrices;
9618    * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
9619    * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
9620    * (resp. the distance) of the travel from visits with tag
9621    * `duration_distance_matrix_src_tags(j)` to visits with tag
9622    * `duration_distance_matrix_dst_tags(k)` in matrix i.
9623    * Tags correspond to
9624    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9625    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9626    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9627    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9628    * the same; similarly a `VisitRequest`'s source and destination tags may be
9629    * the same. All tags must be different and cannot be empty strings. If this
9630    * field is not empty, then `duration_distance_matrices` must not be empty.
9631    * </pre>
9632    *
9633    * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
9634    *
9635    * @param index The index of the element to return.
9636    * @return The durationDistanceMatrixDstTags at the given index.
9637    */
getDurationDistanceMatrixDstTags(int index)9638   public java.lang.String getDurationDistanceMatrixDstTags(int index) {
9639     return durationDistanceMatrixDstTags_.get(index);
9640   }
9641   /**
9642    *
9643    *
9644    * <pre>
9645    * Tags defining the destinations of the duration and distance matrices;
9646    * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
9647    * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
9648    * (resp. the distance) of the travel from visits with tag
9649    * `duration_distance_matrix_src_tags(j)` to visits with tag
9650    * `duration_distance_matrix_dst_tags(k)` in matrix i.
9651    * Tags correspond to
9652    * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
9653    * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
9654    * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
9655    * field. Note that a `Vehicle`'s source, destination and matrix tags may be
9656    * the same; similarly a `VisitRequest`'s source and destination tags may be
9657    * the same. All tags must be different and cannot be empty strings. If this
9658    * field is not empty, then `duration_distance_matrices` must not be empty.
9659    * </pre>
9660    *
9661    * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
9662    *
9663    * @param index The index of the value to return.
9664    * @return The bytes of the durationDistanceMatrixDstTags at the given index.
9665    */
getDurationDistanceMatrixDstTagsBytes(int index)9666   public com.google.protobuf.ByteString getDurationDistanceMatrixDstTagsBytes(int index) {
9667     return durationDistanceMatrixDstTags_.getByteString(index);
9668   }
9669 
9670   public static final int TRANSITION_ATTRIBUTES_FIELD_NUMBER = 11;
9671 
9672   @SuppressWarnings("serial")
9673   private java.util.List<com.google.cloud.optimization.v1.TransitionAttributes>
9674       transitionAttributes_;
9675   /**
9676    *
9677    *
9678    * <pre>
9679    * Transition attributes added to the model.
9680    * </pre>
9681    *
9682    * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
9683    * </code>
9684    */
9685   @java.lang.Override
9686   public java.util.List<com.google.cloud.optimization.v1.TransitionAttributes>
getTransitionAttributesList()9687       getTransitionAttributesList() {
9688     return transitionAttributes_;
9689   }
9690   /**
9691    *
9692    *
9693    * <pre>
9694    * Transition attributes added to the model.
9695    * </pre>
9696    *
9697    * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
9698    * </code>
9699    */
9700   @java.lang.Override
9701   public java.util.List<? extends com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>
getTransitionAttributesOrBuilderList()9702       getTransitionAttributesOrBuilderList() {
9703     return transitionAttributes_;
9704   }
9705   /**
9706    *
9707    *
9708    * <pre>
9709    * Transition attributes added to the model.
9710    * </pre>
9711    *
9712    * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
9713    * </code>
9714    */
9715   @java.lang.Override
getTransitionAttributesCount()9716   public int getTransitionAttributesCount() {
9717     return transitionAttributes_.size();
9718   }
9719   /**
9720    *
9721    *
9722    * <pre>
9723    * Transition attributes added to the model.
9724    * </pre>
9725    *
9726    * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
9727    * </code>
9728    */
9729   @java.lang.Override
getTransitionAttributes(int index)9730   public com.google.cloud.optimization.v1.TransitionAttributes getTransitionAttributes(int index) {
9731     return transitionAttributes_.get(index);
9732   }
9733   /**
9734    *
9735    *
9736    * <pre>
9737    * Transition attributes added to the model.
9738    * </pre>
9739    *
9740    * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
9741    * </code>
9742    */
9743   @java.lang.Override
9744   public com.google.cloud.optimization.v1.TransitionAttributesOrBuilder
getTransitionAttributesOrBuilder(int index)9745       getTransitionAttributesOrBuilder(int index) {
9746     return transitionAttributes_.get(index);
9747   }
9748 
9749   public static final int SHIPMENT_TYPE_INCOMPATIBILITIES_FIELD_NUMBER = 12;
9750 
9751   @SuppressWarnings("serial")
9752   private java.util.List<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>
9753       shipmentTypeIncompatibilities_;
9754   /**
9755    *
9756    *
9757    * <pre>
9758    * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
9759    * </pre>
9760    *
9761    * <code>
9762    * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
9763    * </code>
9764    */
9765   @java.lang.Override
9766   public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>
getShipmentTypeIncompatibilitiesList()9767       getShipmentTypeIncompatibilitiesList() {
9768     return shipmentTypeIncompatibilities_;
9769   }
9770   /**
9771    *
9772    *
9773    * <pre>
9774    * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
9775    * </pre>
9776    *
9777    * <code>
9778    * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
9779    * </code>
9780    */
9781   @java.lang.Override
9782   public java.util.List<
9783           ? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>
getShipmentTypeIncompatibilitiesOrBuilderList()9784       getShipmentTypeIncompatibilitiesOrBuilderList() {
9785     return shipmentTypeIncompatibilities_;
9786   }
9787   /**
9788    *
9789    *
9790    * <pre>
9791    * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
9792    * </pre>
9793    *
9794    * <code>
9795    * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
9796    * </code>
9797    */
9798   @java.lang.Override
getShipmentTypeIncompatibilitiesCount()9799   public int getShipmentTypeIncompatibilitiesCount() {
9800     return shipmentTypeIncompatibilities_.size();
9801   }
9802   /**
9803    *
9804    *
9805    * <pre>
9806    * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
9807    * </pre>
9808    *
9809    * <code>
9810    * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
9811    * </code>
9812    */
9813   @java.lang.Override
9814   public com.google.cloud.optimization.v1.ShipmentTypeIncompatibility
getShipmentTypeIncompatibilities(int index)9815       getShipmentTypeIncompatibilities(int index) {
9816     return shipmentTypeIncompatibilities_.get(index);
9817   }
9818   /**
9819    *
9820    *
9821    * <pre>
9822    * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
9823    * </pre>
9824    *
9825    * <code>
9826    * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
9827    * </code>
9828    */
9829   @java.lang.Override
9830   public com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder
getShipmentTypeIncompatibilitiesOrBuilder(int index)9831       getShipmentTypeIncompatibilitiesOrBuilder(int index) {
9832     return shipmentTypeIncompatibilities_.get(index);
9833   }
9834 
9835   public static final int SHIPMENT_TYPE_REQUIREMENTS_FIELD_NUMBER = 13;
9836 
9837   @SuppressWarnings("serial")
9838   private java.util.List<com.google.cloud.optimization.v1.ShipmentTypeRequirement>
9839       shipmentTypeRequirements_;
9840   /**
9841    *
9842    *
9843    * <pre>
9844    * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
9845    * </pre>
9846    *
9847    * <code>
9848    * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
9849    * </code>
9850    */
9851   @java.lang.Override
9852   public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeRequirement>
getShipmentTypeRequirementsList()9853       getShipmentTypeRequirementsList() {
9854     return shipmentTypeRequirements_;
9855   }
9856   /**
9857    *
9858    *
9859    * <pre>
9860    * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
9861    * </pre>
9862    *
9863    * <code>
9864    * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
9865    * </code>
9866    */
9867   @java.lang.Override
9868   public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>
getShipmentTypeRequirementsOrBuilderList()9869       getShipmentTypeRequirementsOrBuilderList() {
9870     return shipmentTypeRequirements_;
9871   }
9872   /**
9873    *
9874    *
9875    * <pre>
9876    * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
9877    * </pre>
9878    *
9879    * <code>
9880    * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
9881    * </code>
9882    */
9883   @java.lang.Override
getShipmentTypeRequirementsCount()9884   public int getShipmentTypeRequirementsCount() {
9885     return shipmentTypeRequirements_.size();
9886   }
9887   /**
9888    *
9889    *
9890    * <pre>
9891    * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
9892    * </pre>
9893    *
9894    * <code>
9895    * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
9896    * </code>
9897    */
9898   @java.lang.Override
getShipmentTypeRequirements( int index)9899   public com.google.cloud.optimization.v1.ShipmentTypeRequirement getShipmentTypeRequirements(
9900       int index) {
9901     return shipmentTypeRequirements_.get(index);
9902   }
9903   /**
9904    *
9905    *
9906    * <pre>
9907    * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
9908    * </pre>
9909    *
9910    * <code>
9911    * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
9912    * </code>
9913    */
9914   @java.lang.Override
9915   public com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder
getShipmentTypeRequirementsOrBuilder(int index)9916       getShipmentTypeRequirementsOrBuilder(int index) {
9917     return shipmentTypeRequirements_.get(index);
9918   }
9919 
9920   public static final int PRECEDENCE_RULES_FIELD_NUMBER = 14;
9921 
9922   @SuppressWarnings("serial")
9923   private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>
9924       precedenceRules_;
9925   /**
9926    *
9927    *
9928    * <pre>
9929    * Set of precedence rules which must be enforced in the model.
9930    * </pre>
9931    *
9932    * <code>
9933    * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
9934    * </code>
9935    */
9936   @java.lang.Override
9937   public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>
getPrecedenceRulesList()9938       getPrecedenceRulesList() {
9939     return precedenceRules_;
9940   }
9941   /**
9942    *
9943    *
9944    * <pre>
9945    * Set of precedence rules which must be enforced in the model.
9946    * </pre>
9947    *
9948    * <code>
9949    * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
9950    * </code>
9951    */
9952   @java.lang.Override
9953   public java.util.List<
9954           ? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>
getPrecedenceRulesOrBuilderList()9955       getPrecedenceRulesOrBuilderList() {
9956     return precedenceRules_;
9957   }
9958   /**
9959    *
9960    *
9961    * <pre>
9962    * Set of precedence rules which must be enforced in the model.
9963    * </pre>
9964    *
9965    * <code>
9966    * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
9967    * </code>
9968    */
9969   @java.lang.Override
getPrecedenceRulesCount()9970   public int getPrecedenceRulesCount() {
9971     return precedenceRules_.size();
9972   }
9973   /**
9974    *
9975    *
9976    * <pre>
9977    * Set of precedence rules which must be enforced in the model.
9978    * </pre>
9979    *
9980    * <code>
9981    * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
9982    * </code>
9983    */
9984   @java.lang.Override
getPrecedenceRules( int index)9985   public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule getPrecedenceRules(
9986       int index) {
9987     return precedenceRules_.get(index);
9988   }
9989   /**
9990    *
9991    *
9992    * <pre>
9993    * Set of precedence rules which must be enforced in the model.
9994    * </pre>
9995    *
9996    * <code>
9997    * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
9998    * </code>
9999    */
10000   @java.lang.Override
10001   public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder
getPrecedenceRulesOrBuilder(int index)10002       getPrecedenceRulesOrBuilder(int index) {
10003     return precedenceRules_.get(index);
10004   }
10005 
10006   public static final int BREAK_RULES_FIELD_NUMBER = 15;
10007 
10008   @SuppressWarnings("serial")
10009   private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule> breakRules_;
10010   /**
10011    *
10012    *
10013    * <pre>
10014    * Deprecated: No longer used.
10015    * Set of break rules used in the model.
10016    * Each vehicle specifies the `BreakRule` that applies to it via the
10017    * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
10018    * field (which must be a singleton).
10019    * </pre>
10020    *
10021    * <code>
10022    * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
10023    * </code>
10024    */
10025   @java.lang.Override
10026   @java.lang.Deprecated
10027   public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule>
getBreakRulesList()10028       getBreakRulesList() {
10029     return breakRules_;
10030   }
10031   /**
10032    *
10033    *
10034    * <pre>
10035    * Deprecated: No longer used.
10036    * Set of break rules used in the model.
10037    * Each vehicle specifies the `BreakRule` that applies to it via the
10038    * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
10039    * field (which must be a singleton).
10040    * </pre>
10041    *
10042    * <code>
10043    * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
10044    * </code>
10045    */
10046   @java.lang.Override
10047   @java.lang.Deprecated
10048   public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>
getBreakRulesOrBuilderList()10049       getBreakRulesOrBuilderList() {
10050     return breakRules_;
10051   }
10052   /**
10053    *
10054    *
10055    * <pre>
10056    * Deprecated: No longer used.
10057    * Set of break rules used in the model.
10058    * Each vehicle specifies the `BreakRule` that applies to it via the
10059    * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
10060    * field (which must be a singleton).
10061    * </pre>
10062    *
10063    * <code>
10064    * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
10065    * </code>
10066    */
10067   @java.lang.Override
10068   @java.lang.Deprecated
getBreakRulesCount()10069   public int getBreakRulesCount() {
10070     return breakRules_.size();
10071   }
10072   /**
10073    *
10074    *
10075    * <pre>
10076    * Deprecated: No longer used.
10077    * Set of break rules used in the model.
10078    * Each vehicle specifies the `BreakRule` that applies to it via the
10079    * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
10080    * field (which must be a singleton).
10081    * </pre>
10082    *
10083    * <code>
10084    * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
10085    * </code>
10086    */
10087   @java.lang.Override
10088   @java.lang.Deprecated
getBreakRules(int index)10089   public com.google.cloud.optimization.v1.ShipmentModel.BreakRule getBreakRules(int index) {
10090     return breakRules_.get(index);
10091   }
10092   /**
10093    *
10094    *
10095    * <pre>
10096    * Deprecated: No longer used.
10097    * Set of break rules used in the model.
10098    * Each vehicle specifies the `BreakRule` that applies to it via the
10099    * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
10100    * field (which must be a singleton).
10101    * </pre>
10102    *
10103    * <code>
10104    * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
10105    * </code>
10106    */
10107   @java.lang.Override
10108   @java.lang.Deprecated
getBreakRulesOrBuilder( int index)10109   public com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder getBreakRulesOrBuilder(
10110       int index) {
10111     return breakRules_.get(index);
10112   }
10113 
10114   private byte memoizedIsInitialized = -1;
10115 
10116   @java.lang.Override
isInitialized()10117   public final boolean isInitialized() {
10118     byte isInitialized = memoizedIsInitialized;
10119     if (isInitialized == 1) return true;
10120     if (isInitialized == 0) return false;
10121 
10122     memoizedIsInitialized = 1;
10123     return true;
10124   }
10125 
10126   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)10127   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
10128     for (int i = 0; i < shipments_.size(); i++) {
10129       output.writeMessage(1, shipments_.get(i));
10130     }
10131     for (int i = 0; i < vehicles_.size(); i++) {
10132       output.writeMessage(2, vehicles_.get(i));
10133     }
10134     if (((bitField0_ & 0x00000001) != 0)) {
10135       output.writeInt32(4, maxActiveVehicles_);
10136     }
10137     if (globalStartTime_ != null) {
10138       output.writeMessage(5, getGlobalStartTime());
10139     }
10140     if (globalEndTime_ != null) {
10141       output.writeMessage(6, getGlobalEndTime());
10142     }
10143     if (java.lang.Double.doubleToRawLongBits(globalDurationCostPerHour_) != 0) {
10144       output.writeDouble(7, globalDurationCostPerHour_);
10145     }
10146     for (int i = 0; i < durationDistanceMatrices_.size(); i++) {
10147       output.writeMessage(8, durationDistanceMatrices_.get(i));
10148     }
10149     for (int i = 0; i < durationDistanceMatrixSrcTags_.size(); i++) {
10150       com.google.protobuf.GeneratedMessageV3.writeString(
10151           output, 9, durationDistanceMatrixSrcTags_.getRaw(i));
10152     }
10153     for (int i = 0; i < durationDistanceMatrixDstTags_.size(); i++) {
10154       com.google.protobuf.GeneratedMessageV3.writeString(
10155           output, 10, durationDistanceMatrixDstTags_.getRaw(i));
10156     }
10157     for (int i = 0; i < transitionAttributes_.size(); i++) {
10158       output.writeMessage(11, transitionAttributes_.get(i));
10159     }
10160     for (int i = 0; i < shipmentTypeIncompatibilities_.size(); i++) {
10161       output.writeMessage(12, shipmentTypeIncompatibilities_.get(i));
10162     }
10163     for (int i = 0; i < shipmentTypeRequirements_.size(); i++) {
10164       output.writeMessage(13, shipmentTypeRequirements_.get(i));
10165     }
10166     for (int i = 0; i < precedenceRules_.size(); i++) {
10167       output.writeMessage(14, precedenceRules_.get(i));
10168     }
10169     for (int i = 0; i < breakRules_.size(); i++) {
10170       output.writeMessage(15, breakRules_.get(i));
10171     }
10172     getUnknownFields().writeTo(output);
10173   }
10174 
10175   @java.lang.Override
getSerializedSize()10176   public int getSerializedSize() {
10177     int size = memoizedSize;
10178     if (size != -1) return size;
10179 
10180     size = 0;
10181     for (int i = 0; i < shipments_.size(); i++) {
10182       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, shipments_.get(i));
10183     }
10184     for (int i = 0; i < vehicles_.size(); i++) {
10185       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, vehicles_.get(i));
10186     }
10187     if (((bitField0_ & 0x00000001) != 0)) {
10188       size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxActiveVehicles_);
10189     }
10190     if (globalStartTime_ != null) {
10191       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getGlobalStartTime());
10192     }
10193     if (globalEndTime_ != null) {
10194       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getGlobalEndTime());
10195     }
10196     if (java.lang.Double.doubleToRawLongBits(globalDurationCostPerHour_) != 0) {
10197       size +=
10198           com.google.protobuf.CodedOutputStream.computeDoubleSize(7, globalDurationCostPerHour_);
10199     }
10200     for (int i = 0; i < durationDistanceMatrices_.size(); i++) {
10201       size +=
10202           com.google.protobuf.CodedOutputStream.computeMessageSize(
10203               8, durationDistanceMatrices_.get(i));
10204     }
10205     {
10206       int dataSize = 0;
10207       for (int i = 0; i < durationDistanceMatrixSrcTags_.size(); i++) {
10208         dataSize += computeStringSizeNoTag(durationDistanceMatrixSrcTags_.getRaw(i));
10209       }
10210       size += dataSize;
10211       size += 1 * getDurationDistanceMatrixSrcTagsList().size();
10212     }
10213     {
10214       int dataSize = 0;
10215       for (int i = 0; i < durationDistanceMatrixDstTags_.size(); i++) {
10216         dataSize += computeStringSizeNoTag(durationDistanceMatrixDstTags_.getRaw(i));
10217       }
10218       size += dataSize;
10219       size += 1 * getDurationDistanceMatrixDstTagsList().size();
10220     }
10221     for (int i = 0; i < transitionAttributes_.size(); i++) {
10222       size +=
10223           com.google.protobuf.CodedOutputStream.computeMessageSize(
10224               11, transitionAttributes_.get(i));
10225     }
10226     for (int i = 0; i < shipmentTypeIncompatibilities_.size(); i++) {
10227       size +=
10228           com.google.protobuf.CodedOutputStream.computeMessageSize(
10229               12, shipmentTypeIncompatibilities_.get(i));
10230     }
10231     for (int i = 0; i < shipmentTypeRequirements_.size(); i++) {
10232       size +=
10233           com.google.protobuf.CodedOutputStream.computeMessageSize(
10234               13, shipmentTypeRequirements_.get(i));
10235     }
10236     for (int i = 0; i < precedenceRules_.size(); i++) {
10237       size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, precedenceRules_.get(i));
10238     }
10239     for (int i = 0; i < breakRules_.size(); i++) {
10240       size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, breakRules_.get(i));
10241     }
10242     size += getUnknownFields().getSerializedSize();
10243     memoizedSize = size;
10244     return size;
10245   }
10246 
10247   @java.lang.Override
equals(final java.lang.Object obj)10248   public boolean equals(final java.lang.Object obj) {
10249     if (obj == this) {
10250       return true;
10251     }
10252     if (!(obj instanceof com.google.cloud.optimization.v1.ShipmentModel)) {
10253       return super.equals(obj);
10254     }
10255     com.google.cloud.optimization.v1.ShipmentModel other =
10256         (com.google.cloud.optimization.v1.ShipmentModel) obj;
10257 
10258     if (!getShipmentsList().equals(other.getShipmentsList())) return false;
10259     if (!getVehiclesList().equals(other.getVehiclesList())) return false;
10260     if (hasMaxActiveVehicles() != other.hasMaxActiveVehicles()) return false;
10261     if (hasMaxActiveVehicles()) {
10262       if (getMaxActiveVehicles() != other.getMaxActiveVehicles()) return false;
10263     }
10264     if (hasGlobalStartTime() != other.hasGlobalStartTime()) return false;
10265     if (hasGlobalStartTime()) {
10266       if (!getGlobalStartTime().equals(other.getGlobalStartTime())) return false;
10267     }
10268     if (hasGlobalEndTime() != other.hasGlobalEndTime()) return false;
10269     if (hasGlobalEndTime()) {
10270       if (!getGlobalEndTime().equals(other.getGlobalEndTime())) return false;
10271     }
10272     if (java.lang.Double.doubleToLongBits(getGlobalDurationCostPerHour())
10273         != java.lang.Double.doubleToLongBits(other.getGlobalDurationCostPerHour())) return false;
10274     if (!getDurationDistanceMatricesList().equals(other.getDurationDistanceMatricesList()))
10275       return false;
10276     if (!getDurationDistanceMatrixSrcTagsList()
10277         .equals(other.getDurationDistanceMatrixSrcTagsList())) return false;
10278     if (!getDurationDistanceMatrixDstTagsList()
10279         .equals(other.getDurationDistanceMatrixDstTagsList())) return false;
10280     if (!getTransitionAttributesList().equals(other.getTransitionAttributesList())) return false;
10281     if (!getShipmentTypeIncompatibilitiesList()
10282         .equals(other.getShipmentTypeIncompatibilitiesList())) return false;
10283     if (!getShipmentTypeRequirementsList().equals(other.getShipmentTypeRequirementsList()))
10284       return false;
10285     if (!getPrecedenceRulesList().equals(other.getPrecedenceRulesList())) return false;
10286     if (!getBreakRulesList().equals(other.getBreakRulesList())) return false;
10287     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
10288     return true;
10289   }
10290 
10291   @java.lang.Override
hashCode()10292   public int hashCode() {
10293     if (memoizedHashCode != 0) {
10294       return memoizedHashCode;
10295     }
10296     int hash = 41;
10297     hash = (19 * hash) + getDescriptor().hashCode();
10298     if (getShipmentsCount() > 0) {
10299       hash = (37 * hash) + SHIPMENTS_FIELD_NUMBER;
10300       hash = (53 * hash) + getShipmentsList().hashCode();
10301     }
10302     if (getVehiclesCount() > 0) {
10303       hash = (37 * hash) + VEHICLES_FIELD_NUMBER;
10304       hash = (53 * hash) + getVehiclesList().hashCode();
10305     }
10306     if (hasMaxActiveVehicles()) {
10307       hash = (37 * hash) + MAX_ACTIVE_VEHICLES_FIELD_NUMBER;
10308       hash = (53 * hash) + getMaxActiveVehicles();
10309     }
10310     if (hasGlobalStartTime()) {
10311       hash = (37 * hash) + GLOBAL_START_TIME_FIELD_NUMBER;
10312       hash = (53 * hash) + getGlobalStartTime().hashCode();
10313     }
10314     if (hasGlobalEndTime()) {
10315       hash = (37 * hash) + GLOBAL_END_TIME_FIELD_NUMBER;
10316       hash = (53 * hash) + getGlobalEndTime().hashCode();
10317     }
10318     hash = (37 * hash) + GLOBAL_DURATION_COST_PER_HOUR_FIELD_NUMBER;
10319     hash =
10320         (53 * hash)
10321             + com.google.protobuf.Internal.hashLong(
10322                 java.lang.Double.doubleToLongBits(getGlobalDurationCostPerHour()));
10323     if (getDurationDistanceMatricesCount() > 0) {
10324       hash = (37 * hash) + DURATION_DISTANCE_MATRICES_FIELD_NUMBER;
10325       hash = (53 * hash) + getDurationDistanceMatricesList().hashCode();
10326     }
10327     if (getDurationDistanceMatrixSrcTagsCount() > 0) {
10328       hash = (37 * hash) + DURATION_DISTANCE_MATRIX_SRC_TAGS_FIELD_NUMBER;
10329       hash = (53 * hash) + getDurationDistanceMatrixSrcTagsList().hashCode();
10330     }
10331     if (getDurationDistanceMatrixDstTagsCount() > 0) {
10332       hash = (37 * hash) + DURATION_DISTANCE_MATRIX_DST_TAGS_FIELD_NUMBER;
10333       hash = (53 * hash) + getDurationDistanceMatrixDstTagsList().hashCode();
10334     }
10335     if (getTransitionAttributesCount() > 0) {
10336       hash = (37 * hash) + TRANSITION_ATTRIBUTES_FIELD_NUMBER;
10337       hash = (53 * hash) + getTransitionAttributesList().hashCode();
10338     }
10339     if (getShipmentTypeIncompatibilitiesCount() > 0) {
10340       hash = (37 * hash) + SHIPMENT_TYPE_INCOMPATIBILITIES_FIELD_NUMBER;
10341       hash = (53 * hash) + getShipmentTypeIncompatibilitiesList().hashCode();
10342     }
10343     if (getShipmentTypeRequirementsCount() > 0) {
10344       hash = (37 * hash) + SHIPMENT_TYPE_REQUIREMENTS_FIELD_NUMBER;
10345       hash = (53 * hash) + getShipmentTypeRequirementsList().hashCode();
10346     }
10347     if (getPrecedenceRulesCount() > 0) {
10348       hash = (37 * hash) + PRECEDENCE_RULES_FIELD_NUMBER;
10349       hash = (53 * hash) + getPrecedenceRulesList().hashCode();
10350     }
10351     if (getBreakRulesCount() > 0) {
10352       hash = (37 * hash) + BREAK_RULES_FIELD_NUMBER;
10353       hash = (53 * hash) + getBreakRulesList().hashCode();
10354     }
10355     hash = (29 * hash) + getUnknownFields().hashCode();
10356     memoizedHashCode = hash;
10357     return hash;
10358   }
10359 
parseFrom(java.nio.ByteBuffer data)10360   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(java.nio.ByteBuffer data)
10361       throws com.google.protobuf.InvalidProtocolBufferException {
10362     return PARSER.parseFrom(data);
10363   }
10364 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10365   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10366       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10367       throws com.google.protobuf.InvalidProtocolBufferException {
10368     return PARSER.parseFrom(data, extensionRegistry);
10369   }
10370 
parseFrom( com.google.protobuf.ByteString data)10371   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10372       com.google.protobuf.ByteString data)
10373       throws com.google.protobuf.InvalidProtocolBufferException {
10374     return PARSER.parseFrom(data);
10375   }
10376 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10377   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10378       com.google.protobuf.ByteString data,
10379       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10380       throws com.google.protobuf.InvalidProtocolBufferException {
10381     return PARSER.parseFrom(data, extensionRegistry);
10382   }
10383 
parseFrom(byte[] data)10384   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(byte[] data)
10385       throws com.google.protobuf.InvalidProtocolBufferException {
10386     return PARSER.parseFrom(data);
10387   }
10388 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10389   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10390       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10391       throws com.google.protobuf.InvalidProtocolBufferException {
10392     return PARSER.parseFrom(data, extensionRegistry);
10393   }
10394 
parseFrom(java.io.InputStream input)10395   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(java.io.InputStream input)
10396       throws java.io.IOException {
10397     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
10398   }
10399 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10400   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10401       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10402       throws java.io.IOException {
10403     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
10404         PARSER, input, extensionRegistry);
10405   }
10406 
parseDelimitedFrom( java.io.InputStream input)10407   public static com.google.cloud.optimization.v1.ShipmentModel parseDelimitedFrom(
10408       java.io.InputStream input) throws java.io.IOException {
10409     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
10410   }
10411 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10412   public static com.google.cloud.optimization.v1.ShipmentModel parseDelimitedFrom(
10413       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10414       throws java.io.IOException {
10415     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
10416         PARSER, input, extensionRegistry);
10417   }
10418 
parseFrom( com.google.protobuf.CodedInputStream input)10419   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10420       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
10421     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
10422   }
10423 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)10424   public static com.google.cloud.optimization.v1.ShipmentModel parseFrom(
10425       com.google.protobuf.CodedInputStream input,
10426       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10427       throws java.io.IOException {
10428     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
10429         PARSER, input, extensionRegistry);
10430   }
10431 
10432   @java.lang.Override
newBuilderForType()10433   public Builder newBuilderForType() {
10434     return newBuilder();
10435   }
10436 
newBuilder()10437   public static Builder newBuilder() {
10438     return DEFAULT_INSTANCE.toBuilder();
10439   }
10440 
newBuilder(com.google.cloud.optimization.v1.ShipmentModel prototype)10441   public static Builder newBuilder(com.google.cloud.optimization.v1.ShipmentModel prototype) {
10442     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
10443   }
10444 
10445   @java.lang.Override
toBuilder()10446   public Builder toBuilder() {
10447     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
10448   }
10449 
10450   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)10451   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10452     Builder builder = new Builder(parent);
10453     return builder;
10454   }
10455   /**
10456    *
10457    *
10458    * <pre>
10459    * A shipment model contains a set of shipments which must be performed by a
10460    * set of vehicles, while minimizing the overall cost, which is the sum of:
10461    * * the cost of routing the vehicles (sum of cost per total time, cost per
10462    *   travel time, and fixed cost over all vehicles).
10463    * * the unperformed shipment penalties.
10464    * * the cost of the global duration of the shipments
10465    * </pre>
10466    *
10467    * Protobuf type {@code google.cloud.optimization.v1.ShipmentModel}
10468    */
10469   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
10470       implements
10471       // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.ShipmentModel)
10472       com.google.cloud.optimization.v1.ShipmentModelOrBuilder {
getDescriptor()10473     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
10474       return com.google.cloud.optimization.v1.FleetRoutingProto
10475           .internal_static_google_cloud_optimization_v1_ShipmentModel_descriptor;
10476     }
10477 
10478     @java.lang.Override
10479     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()10480         internalGetFieldAccessorTable() {
10481       return com.google.cloud.optimization.v1.FleetRoutingProto
10482           .internal_static_google_cloud_optimization_v1_ShipmentModel_fieldAccessorTable
10483           .ensureFieldAccessorsInitialized(
10484               com.google.cloud.optimization.v1.ShipmentModel.class,
10485               com.google.cloud.optimization.v1.ShipmentModel.Builder.class);
10486     }
10487 
10488     // Construct using com.google.cloud.optimization.v1.ShipmentModel.newBuilder()
Builder()10489     private Builder() {}
10490 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)10491     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
10492       super(parent);
10493     }
10494 
10495     @java.lang.Override
clear()10496     public Builder clear() {
10497       super.clear();
10498       bitField0_ = 0;
10499       if (shipmentsBuilder_ == null) {
10500         shipments_ = java.util.Collections.emptyList();
10501       } else {
10502         shipments_ = null;
10503         shipmentsBuilder_.clear();
10504       }
10505       bitField0_ = (bitField0_ & ~0x00000001);
10506       if (vehiclesBuilder_ == null) {
10507         vehicles_ = java.util.Collections.emptyList();
10508       } else {
10509         vehicles_ = null;
10510         vehiclesBuilder_.clear();
10511       }
10512       bitField0_ = (bitField0_ & ~0x00000002);
10513       maxActiveVehicles_ = 0;
10514       globalStartTime_ = null;
10515       if (globalStartTimeBuilder_ != null) {
10516         globalStartTimeBuilder_.dispose();
10517         globalStartTimeBuilder_ = null;
10518       }
10519       globalEndTime_ = null;
10520       if (globalEndTimeBuilder_ != null) {
10521         globalEndTimeBuilder_.dispose();
10522         globalEndTimeBuilder_ = null;
10523       }
10524       globalDurationCostPerHour_ = 0D;
10525       if (durationDistanceMatricesBuilder_ == null) {
10526         durationDistanceMatrices_ = java.util.Collections.emptyList();
10527       } else {
10528         durationDistanceMatrices_ = null;
10529         durationDistanceMatricesBuilder_.clear();
10530       }
10531       bitField0_ = (bitField0_ & ~0x00000040);
10532       durationDistanceMatrixSrcTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
10533       bitField0_ = (bitField0_ & ~0x00000080);
10534       durationDistanceMatrixDstTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
10535       bitField0_ = (bitField0_ & ~0x00000100);
10536       if (transitionAttributesBuilder_ == null) {
10537         transitionAttributes_ = java.util.Collections.emptyList();
10538       } else {
10539         transitionAttributes_ = null;
10540         transitionAttributesBuilder_.clear();
10541       }
10542       bitField0_ = (bitField0_ & ~0x00000200);
10543       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
10544         shipmentTypeIncompatibilities_ = java.util.Collections.emptyList();
10545       } else {
10546         shipmentTypeIncompatibilities_ = null;
10547         shipmentTypeIncompatibilitiesBuilder_.clear();
10548       }
10549       bitField0_ = (bitField0_ & ~0x00000400);
10550       if (shipmentTypeRequirementsBuilder_ == null) {
10551         shipmentTypeRequirements_ = java.util.Collections.emptyList();
10552       } else {
10553         shipmentTypeRequirements_ = null;
10554         shipmentTypeRequirementsBuilder_.clear();
10555       }
10556       bitField0_ = (bitField0_ & ~0x00000800);
10557       if (precedenceRulesBuilder_ == null) {
10558         precedenceRules_ = java.util.Collections.emptyList();
10559       } else {
10560         precedenceRules_ = null;
10561         precedenceRulesBuilder_.clear();
10562       }
10563       bitField0_ = (bitField0_ & ~0x00001000);
10564       if (breakRulesBuilder_ == null) {
10565         breakRules_ = java.util.Collections.emptyList();
10566       } else {
10567         breakRules_ = null;
10568         breakRulesBuilder_.clear();
10569       }
10570       bitField0_ = (bitField0_ & ~0x00002000);
10571       return this;
10572     }
10573 
10574     @java.lang.Override
getDescriptorForType()10575     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
10576       return com.google.cloud.optimization.v1.FleetRoutingProto
10577           .internal_static_google_cloud_optimization_v1_ShipmentModel_descriptor;
10578     }
10579 
10580     @java.lang.Override
getDefaultInstanceForType()10581     public com.google.cloud.optimization.v1.ShipmentModel getDefaultInstanceForType() {
10582       return com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance();
10583     }
10584 
10585     @java.lang.Override
build()10586     public com.google.cloud.optimization.v1.ShipmentModel build() {
10587       com.google.cloud.optimization.v1.ShipmentModel result = buildPartial();
10588       if (!result.isInitialized()) {
10589         throw newUninitializedMessageException(result);
10590       }
10591       return result;
10592     }
10593 
10594     @java.lang.Override
buildPartial()10595     public com.google.cloud.optimization.v1.ShipmentModel buildPartial() {
10596       com.google.cloud.optimization.v1.ShipmentModel result =
10597           new com.google.cloud.optimization.v1.ShipmentModel(this);
10598       buildPartialRepeatedFields(result);
10599       if (bitField0_ != 0) {
10600         buildPartial0(result);
10601       }
10602       onBuilt();
10603       return result;
10604     }
10605 
buildPartialRepeatedFields(com.google.cloud.optimization.v1.ShipmentModel result)10606     private void buildPartialRepeatedFields(com.google.cloud.optimization.v1.ShipmentModel result) {
10607       if (shipmentsBuilder_ == null) {
10608         if (((bitField0_ & 0x00000001) != 0)) {
10609           shipments_ = java.util.Collections.unmodifiableList(shipments_);
10610           bitField0_ = (bitField0_ & ~0x00000001);
10611         }
10612         result.shipments_ = shipments_;
10613       } else {
10614         result.shipments_ = shipmentsBuilder_.build();
10615       }
10616       if (vehiclesBuilder_ == null) {
10617         if (((bitField0_ & 0x00000002) != 0)) {
10618           vehicles_ = java.util.Collections.unmodifiableList(vehicles_);
10619           bitField0_ = (bitField0_ & ~0x00000002);
10620         }
10621         result.vehicles_ = vehicles_;
10622       } else {
10623         result.vehicles_ = vehiclesBuilder_.build();
10624       }
10625       if (durationDistanceMatricesBuilder_ == null) {
10626         if (((bitField0_ & 0x00000040) != 0)) {
10627           durationDistanceMatrices_ =
10628               java.util.Collections.unmodifiableList(durationDistanceMatrices_);
10629           bitField0_ = (bitField0_ & ~0x00000040);
10630         }
10631         result.durationDistanceMatrices_ = durationDistanceMatrices_;
10632       } else {
10633         result.durationDistanceMatrices_ = durationDistanceMatricesBuilder_.build();
10634       }
10635       if (((bitField0_ & 0x00000080) != 0)) {
10636         durationDistanceMatrixSrcTags_ = durationDistanceMatrixSrcTags_.getUnmodifiableView();
10637         bitField0_ = (bitField0_ & ~0x00000080);
10638       }
10639       result.durationDistanceMatrixSrcTags_ = durationDistanceMatrixSrcTags_;
10640       if (((bitField0_ & 0x00000100) != 0)) {
10641         durationDistanceMatrixDstTags_ = durationDistanceMatrixDstTags_.getUnmodifiableView();
10642         bitField0_ = (bitField0_ & ~0x00000100);
10643       }
10644       result.durationDistanceMatrixDstTags_ = durationDistanceMatrixDstTags_;
10645       if (transitionAttributesBuilder_ == null) {
10646         if (((bitField0_ & 0x00000200) != 0)) {
10647           transitionAttributes_ = java.util.Collections.unmodifiableList(transitionAttributes_);
10648           bitField0_ = (bitField0_ & ~0x00000200);
10649         }
10650         result.transitionAttributes_ = transitionAttributes_;
10651       } else {
10652         result.transitionAttributes_ = transitionAttributesBuilder_.build();
10653       }
10654       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
10655         if (((bitField0_ & 0x00000400) != 0)) {
10656           shipmentTypeIncompatibilities_ =
10657               java.util.Collections.unmodifiableList(shipmentTypeIncompatibilities_);
10658           bitField0_ = (bitField0_ & ~0x00000400);
10659         }
10660         result.shipmentTypeIncompatibilities_ = shipmentTypeIncompatibilities_;
10661       } else {
10662         result.shipmentTypeIncompatibilities_ = shipmentTypeIncompatibilitiesBuilder_.build();
10663       }
10664       if (shipmentTypeRequirementsBuilder_ == null) {
10665         if (((bitField0_ & 0x00000800) != 0)) {
10666           shipmentTypeRequirements_ =
10667               java.util.Collections.unmodifiableList(shipmentTypeRequirements_);
10668           bitField0_ = (bitField0_ & ~0x00000800);
10669         }
10670         result.shipmentTypeRequirements_ = shipmentTypeRequirements_;
10671       } else {
10672         result.shipmentTypeRequirements_ = shipmentTypeRequirementsBuilder_.build();
10673       }
10674       if (precedenceRulesBuilder_ == null) {
10675         if (((bitField0_ & 0x00001000) != 0)) {
10676           precedenceRules_ = java.util.Collections.unmodifiableList(precedenceRules_);
10677           bitField0_ = (bitField0_ & ~0x00001000);
10678         }
10679         result.precedenceRules_ = precedenceRules_;
10680       } else {
10681         result.precedenceRules_ = precedenceRulesBuilder_.build();
10682       }
10683       if (breakRulesBuilder_ == null) {
10684         if (((bitField0_ & 0x00002000) != 0)) {
10685           breakRules_ = java.util.Collections.unmodifiableList(breakRules_);
10686           bitField0_ = (bitField0_ & ~0x00002000);
10687         }
10688         result.breakRules_ = breakRules_;
10689       } else {
10690         result.breakRules_ = breakRulesBuilder_.build();
10691       }
10692     }
10693 
buildPartial0(com.google.cloud.optimization.v1.ShipmentModel result)10694     private void buildPartial0(com.google.cloud.optimization.v1.ShipmentModel result) {
10695       int from_bitField0_ = bitField0_;
10696       int to_bitField0_ = 0;
10697       if (((from_bitField0_ & 0x00000004) != 0)) {
10698         result.maxActiveVehicles_ = maxActiveVehicles_;
10699         to_bitField0_ |= 0x00000001;
10700       }
10701       if (((from_bitField0_ & 0x00000008) != 0)) {
10702         result.globalStartTime_ =
10703             globalStartTimeBuilder_ == null ? globalStartTime_ : globalStartTimeBuilder_.build();
10704       }
10705       if (((from_bitField0_ & 0x00000010) != 0)) {
10706         result.globalEndTime_ =
10707             globalEndTimeBuilder_ == null ? globalEndTime_ : globalEndTimeBuilder_.build();
10708       }
10709       if (((from_bitField0_ & 0x00000020) != 0)) {
10710         result.globalDurationCostPerHour_ = globalDurationCostPerHour_;
10711       }
10712       result.bitField0_ |= to_bitField0_;
10713     }
10714 
10715     @java.lang.Override
clone()10716     public Builder clone() {
10717       return super.clone();
10718     }
10719 
10720     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)10721     public Builder setField(
10722         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
10723       return super.setField(field, value);
10724     }
10725 
10726     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)10727     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
10728       return super.clearField(field);
10729     }
10730 
10731     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)10732     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
10733       return super.clearOneof(oneof);
10734     }
10735 
10736     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)10737     public Builder setRepeatedField(
10738         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
10739       return super.setRepeatedField(field, index, value);
10740     }
10741 
10742     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)10743     public Builder addRepeatedField(
10744         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
10745       return super.addRepeatedField(field, value);
10746     }
10747 
10748     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)10749     public Builder mergeFrom(com.google.protobuf.Message other) {
10750       if (other instanceof com.google.cloud.optimization.v1.ShipmentModel) {
10751         return mergeFrom((com.google.cloud.optimization.v1.ShipmentModel) other);
10752       } else {
10753         super.mergeFrom(other);
10754         return this;
10755       }
10756     }
10757 
mergeFrom(com.google.cloud.optimization.v1.ShipmentModel other)10758     public Builder mergeFrom(com.google.cloud.optimization.v1.ShipmentModel other) {
10759       if (other == com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()) return this;
10760       if (shipmentsBuilder_ == null) {
10761         if (!other.shipments_.isEmpty()) {
10762           if (shipments_.isEmpty()) {
10763             shipments_ = other.shipments_;
10764             bitField0_ = (bitField0_ & ~0x00000001);
10765           } else {
10766             ensureShipmentsIsMutable();
10767             shipments_.addAll(other.shipments_);
10768           }
10769           onChanged();
10770         }
10771       } else {
10772         if (!other.shipments_.isEmpty()) {
10773           if (shipmentsBuilder_.isEmpty()) {
10774             shipmentsBuilder_.dispose();
10775             shipmentsBuilder_ = null;
10776             shipments_ = other.shipments_;
10777             bitField0_ = (bitField0_ & ~0x00000001);
10778             shipmentsBuilder_ =
10779                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10780                     ? getShipmentsFieldBuilder()
10781                     : null;
10782           } else {
10783             shipmentsBuilder_.addAllMessages(other.shipments_);
10784           }
10785         }
10786       }
10787       if (vehiclesBuilder_ == null) {
10788         if (!other.vehicles_.isEmpty()) {
10789           if (vehicles_.isEmpty()) {
10790             vehicles_ = other.vehicles_;
10791             bitField0_ = (bitField0_ & ~0x00000002);
10792           } else {
10793             ensureVehiclesIsMutable();
10794             vehicles_.addAll(other.vehicles_);
10795           }
10796           onChanged();
10797         }
10798       } else {
10799         if (!other.vehicles_.isEmpty()) {
10800           if (vehiclesBuilder_.isEmpty()) {
10801             vehiclesBuilder_.dispose();
10802             vehiclesBuilder_ = null;
10803             vehicles_ = other.vehicles_;
10804             bitField0_ = (bitField0_ & ~0x00000002);
10805             vehiclesBuilder_ =
10806                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10807                     ? getVehiclesFieldBuilder()
10808                     : null;
10809           } else {
10810             vehiclesBuilder_.addAllMessages(other.vehicles_);
10811           }
10812         }
10813       }
10814       if (other.hasMaxActiveVehicles()) {
10815         setMaxActiveVehicles(other.getMaxActiveVehicles());
10816       }
10817       if (other.hasGlobalStartTime()) {
10818         mergeGlobalStartTime(other.getGlobalStartTime());
10819       }
10820       if (other.hasGlobalEndTime()) {
10821         mergeGlobalEndTime(other.getGlobalEndTime());
10822       }
10823       if (other.getGlobalDurationCostPerHour() != 0D) {
10824         setGlobalDurationCostPerHour(other.getGlobalDurationCostPerHour());
10825       }
10826       if (durationDistanceMatricesBuilder_ == null) {
10827         if (!other.durationDistanceMatrices_.isEmpty()) {
10828           if (durationDistanceMatrices_.isEmpty()) {
10829             durationDistanceMatrices_ = other.durationDistanceMatrices_;
10830             bitField0_ = (bitField0_ & ~0x00000040);
10831           } else {
10832             ensureDurationDistanceMatricesIsMutable();
10833             durationDistanceMatrices_.addAll(other.durationDistanceMatrices_);
10834           }
10835           onChanged();
10836         }
10837       } else {
10838         if (!other.durationDistanceMatrices_.isEmpty()) {
10839           if (durationDistanceMatricesBuilder_.isEmpty()) {
10840             durationDistanceMatricesBuilder_.dispose();
10841             durationDistanceMatricesBuilder_ = null;
10842             durationDistanceMatrices_ = other.durationDistanceMatrices_;
10843             bitField0_ = (bitField0_ & ~0x00000040);
10844             durationDistanceMatricesBuilder_ =
10845                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10846                     ? getDurationDistanceMatricesFieldBuilder()
10847                     : null;
10848           } else {
10849             durationDistanceMatricesBuilder_.addAllMessages(other.durationDistanceMatrices_);
10850           }
10851         }
10852       }
10853       if (!other.durationDistanceMatrixSrcTags_.isEmpty()) {
10854         if (durationDistanceMatrixSrcTags_.isEmpty()) {
10855           durationDistanceMatrixSrcTags_ = other.durationDistanceMatrixSrcTags_;
10856           bitField0_ = (bitField0_ & ~0x00000080);
10857         } else {
10858           ensureDurationDistanceMatrixSrcTagsIsMutable();
10859           durationDistanceMatrixSrcTags_.addAll(other.durationDistanceMatrixSrcTags_);
10860         }
10861         onChanged();
10862       }
10863       if (!other.durationDistanceMatrixDstTags_.isEmpty()) {
10864         if (durationDistanceMatrixDstTags_.isEmpty()) {
10865           durationDistanceMatrixDstTags_ = other.durationDistanceMatrixDstTags_;
10866           bitField0_ = (bitField0_ & ~0x00000100);
10867         } else {
10868           ensureDurationDistanceMatrixDstTagsIsMutable();
10869           durationDistanceMatrixDstTags_.addAll(other.durationDistanceMatrixDstTags_);
10870         }
10871         onChanged();
10872       }
10873       if (transitionAttributesBuilder_ == null) {
10874         if (!other.transitionAttributes_.isEmpty()) {
10875           if (transitionAttributes_.isEmpty()) {
10876             transitionAttributes_ = other.transitionAttributes_;
10877             bitField0_ = (bitField0_ & ~0x00000200);
10878           } else {
10879             ensureTransitionAttributesIsMutable();
10880             transitionAttributes_.addAll(other.transitionAttributes_);
10881           }
10882           onChanged();
10883         }
10884       } else {
10885         if (!other.transitionAttributes_.isEmpty()) {
10886           if (transitionAttributesBuilder_.isEmpty()) {
10887             transitionAttributesBuilder_.dispose();
10888             transitionAttributesBuilder_ = null;
10889             transitionAttributes_ = other.transitionAttributes_;
10890             bitField0_ = (bitField0_ & ~0x00000200);
10891             transitionAttributesBuilder_ =
10892                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10893                     ? getTransitionAttributesFieldBuilder()
10894                     : null;
10895           } else {
10896             transitionAttributesBuilder_.addAllMessages(other.transitionAttributes_);
10897           }
10898         }
10899       }
10900       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
10901         if (!other.shipmentTypeIncompatibilities_.isEmpty()) {
10902           if (shipmentTypeIncompatibilities_.isEmpty()) {
10903             shipmentTypeIncompatibilities_ = other.shipmentTypeIncompatibilities_;
10904             bitField0_ = (bitField0_ & ~0x00000400);
10905           } else {
10906             ensureShipmentTypeIncompatibilitiesIsMutable();
10907             shipmentTypeIncompatibilities_.addAll(other.shipmentTypeIncompatibilities_);
10908           }
10909           onChanged();
10910         }
10911       } else {
10912         if (!other.shipmentTypeIncompatibilities_.isEmpty()) {
10913           if (shipmentTypeIncompatibilitiesBuilder_.isEmpty()) {
10914             shipmentTypeIncompatibilitiesBuilder_.dispose();
10915             shipmentTypeIncompatibilitiesBuilder_ = null;
10916             shipmentTypeIncompatibilities_ = other.shipmentTypeIncompatibilities_;
10917             bitField0_ = (bitField0_ & ~0x00000400);
10918             shipmentTypeIncompatibilitiesBuilder_ =
10919                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10920                     ? getShipmentTypeIncompatibilitiesFieldBuilder()
10921                     : null;
10922           } else {
10923             shipmentTypeIncompatibilitiesBuilder_.addAllMessages(
10924                 other.shipmentTypeIncompatibilities_);
10925           }
10926         }
10927       }
10928       if (shipmentTypeRequirementsBuilder_ == null) {
10929         if (!other.shipmentTypeRequirements_.isEmpty()) {
10930           if (shipmentTypeRequirements_.isEmpty()) {
10931             shipmentTypeRequirements_ = other.shipmentTypeRequirements_;
10932             bitField0_ = (bitField0_ & ~0x00000800);
10933           } else {
10934             ensureShipmentTypeRequirementsIsMutable();
10935             shipmentTypeRequirements_.addAll(other.shipmentTypeRequirements_);
10936           }
10937           onChanged();
10938         }
10939       } else {
10940         if (!other.shipmentTypeRequirements_.isEmpty()) {
10941           if (shipmentTypeRequirementsBuilder_.isEmpty()) {
10942             shipmentTypeRequirementsBuilder_.dispose();
10943             shipmentTypeRequirementsBuilder_ = null;
10944             shipmentTypeRequirements_ = other.shipmentTypeRequirements_;
10945             bitField0_ = (bitField0_ & ~0x00000800);
10946             shipmentTypeRequirementsBuilder_ =
10947                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10948                     ? getShipmentTypeRequirementsFieldBuilder()
10949                     : null;
10950           } else {
10951             shipmentTypeRequirementsBuilder_.addAllMessages(other.shipmentTypeRequirements_);
10952           }
10953         }
10954       }
10955       if (precedenceRulesBuilder_ == null) {
10956         if (!other.precedenceRules_.isEmpty()) {
10957           if (precedenceRules_.isEmpty()) {
10958             precedenceRules_ = other.precedenceRules_;
10959             bitField0_ = (bitField0_ & ~0x00001000);
10960           } else {
10961             ensurePrecedenceRulesIsMutable();
10962             precedenceRules_.addAll(other.precedenceRules_);
10963           }
10964           onChanged();
10965         }
10966       } else {
10967         if (!other.precedenceRules_.isEmpty()) {
10968           if (precedenceRulesBuilder_.isEmpty()) {
10969             precedenceRulesBuilder_.dispose();
10970             precedenceRulesBuilder_ = null;
10971             precedenceRules_ = other.precedenceRules_;
10972             bitField0_ = (bitField0_ & ~0x00001000);
10973             precedenceRulesBuilder_ =
10974                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
10975                     ? getPrecedenceRulesFieldBuilder()
10976                     : null;
10977           } else {
10978             precedenceRulesBuilder_.addAllMessages(other.precedenceRules_);
10979           }
10980         }
10981       }
10982       if (breakRulesBuilder_ == null) {
10983         if (!other.breakRules_.isEmpty()) {
10984           if (breakRules_.isEmpty()) {
10985             breakRules_ = other.breakRules_;
10986             bitField0_ = (bitField0_ & ~0x00002000);
10987           } else {
10988             ensureBreakRulesIsMutable();
10989             breakRules_.addAll(other.breakRules_);
10990           }
10991           onChanged();
10992         }
10993       } else {
10994         if (!other.breakRules_.isEmpty()) {
10995           if (breakRulesBuilder_.isEmpty()) {
10996             breakRulesBuilder_.dispose();
10997             breakRulesBuilder_ = null;
10998             breakRules_ = other.breakRules_;
10999             bitField0_ = (bitField0_ & ~0x00002000);
11000             breakRulesBuilder_ =
11001                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
11002                     ? getBreakRulesFieldBuilder()
11003                     : null;
11004           } else {
11005             breakRulesBuilder_.addAllMessages(other.breakRules_);
11006           }
11007         }
11008       }
11009       this.mergeUnknownFields(other.getUnknownFields());
11010       onChanged();
11011       return this;
11012     }
11013 
11014     @java.lang.Override
isInitialized()11015     public final boolean isInitialized() {
11016       return true;
11017     }
11018 
11019     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)11020     public Builder mergeFrom(
11021         com.google.protobuf.CodedInputStream input,
11022         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11023         throws java.io.IOException {
11024       if (extensionRegistry == null) {
11025         throw new java.lang.NullPointerException();
11026       }
11027       try {
11028         boolean done = false;
11029         while (!done) {
11030           int tag = input.readTag();
11031           switch (tag) {
11032             case 0:
11033               done = true;
11034               break;
11035             case 10:
11036               {
11037                 com.google.cloud.optimization.v1.Shipment m =
11038                     input.readMessage(
11039                         com.google.cloud.optimization.v1.Shipment.parser(), extensionRegistry);
11040                 if (shipmentsBuilder_ == null) {
11041                   ensureShipmentsIsMutable();
11042                   shipments_.add(m);
11043                 } else {
11044                   shipmentsBuilder_.addMessage(m);
11045                 }
11046                 break;
11047               } // case 10
11048             case 18:
11049               {
11050                 com.google.cloud.optimization.v1.Vehicle m =
11051                     input.readMessage(
11052                         com.google.cloud.optimization.v1.Vehicle.parser(), extensionRegistry);
11053                 if (vehiclesBuilder_ == null) {
11054                   ensureVehiclesIsMutable();
11055                   vehicles_.add(m);
11056                 } else {
11057                   vehiclesBuilder_.addMessage(m);
11058                 }
11059                 break;
11060               } // case 18
11061             case 32:
11062               {
11063                 maxActiveVehicles_ = input.readInt32();
11064                 bitField0_ |= 0x00000004;
11065                 break;
11066               } // case 32
11067             case 42:
11068               {
11069                 input.readMessage(getGlobalStartTimeFieldBuilder().getBuilder(), extensionRegistry);
11070                 bitField0_ |= 0x00000008;
11071                 break;
11072               } // case 42
11073             case 50:
11074               {
11075                 input.readMessage(getGlobalEndTimeFieldBuilder().getBuilder(), extensionRegistry);
11076                 bitField0_ |= 0x00000010;
11077                 break;
11078               } // case 50
11079             case 57:
11080               {
11081                 globalDurationCostPerHour_ = input.readDouble();
11082                 bitField0_ |= 0x00000020;
11083                 break;
11084               } // case 57
11085             case 66:
11086               {
11087                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix m =
11088                     input.readMessage(
11089                         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
11090                             .parser(),
11091                         extensionRegistry);
11092                 if (durationDistanceMatricesBuilder_ == null) {
11093                   ensureDurationDistanceMatricesIsMutable();
11094                   durationDistanceMatrices_.add(m);
11095                 } else {
11096                   durationDistanceMatricesBuilder_.addMessage(m);
11097                 }
11098                 break;
11099               } // case 66
11100             case 74:
11101               {
11102                 java.lang.String s = input.readStringRequireUtf8();
11103                 ensureDurationDistanceMatrixSrcTagsIsMutable();
11104                 durationDistanceMatrixSrcTags_.add(s);
11105                 break;
11106               } // case 74
11107             case 82:
11108               {
11109                 java.lang.String s = input.readStringRequireUtf8();
11110                 ensureDurationDistanceMatrixDstTagsIsMutable();
11111                 durationDistanceMatrixDstTags_.add(s);
11112                 break;
11113               } // case 82
11114             case 90:
11115               {
11116                 com.google.cloud.optimization.v1.TransitionAttributes m =
11117                     input.readMessage(
11118                         com.google.cloud.optimization.v1.TransitionAttributes.parser(),
11119                         extensionRegistry);
11120                 if (transitionAttributesBuilder_ == null) {
11121                   ensureTransitionAttributesIsMutable();
11122                   transitionAttributes_.add(m);
11123                 } else {
11124                   transitionAttributesBuilder_.addMessage(m);
11125                 }
11126                 break;
11127               } // case 90
11128             case 98:
11129               {
11130                 com.google.cloud.optimization.v1.ShipmentTypeIncompatibility m =
11131                     input.readMessage(
11132                         com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.parser(),
11133                         extensionRegistry);
11134                 if (shipmentTypeIncompatibilitiesBuilder_ == null) {
11135                   ensureShipmentTypeIncompatibilitiesIsMutable();
11136                   shipmentTypeIncompatibilities_.add(m);
11137                 } else {
11138                   shipmentTypeIncompatibilitiesBuilder_.addMessage(m);
11139                 }
11140                 break;
11141               } // case 98
11142             case 106:
11143               {
11144                 com.google.cloud.optimization.v1.ShipmentTypeRequirement m =
11145                     input.readMessage(
11146                         com.google.cloud.optimization.v1.ShipmentTypeRequirement.parser(),
11147                         extensionRegistry);
11148                 if (shipmentTypeRequirementsBuilder_ == null) {
11149                   ensureShipmentTypeRequirementsIsMutable();
11150                   shipmentTypeRequirements_.add(m);
11151                 } else {
11152                   shipmentTypeRequirementsBuilder_.addMessage(m);
11153                 }
11154                 break;
11155               } // case 106
11156             case 114:
11157               {
11158                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule m =
11159                     input.readMessage(
11160                         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.parser(),
11161                         extensionRegistry);
11162                 if (precedenceRulesBuilder_ == null) {
11163                   ensurePrecedenceRulesIsMutable();
11164                   precedenceRules_.add(m);
11165                 } else {
11166                   precedenceRulesBuilder_.addMessage(m);
11167                 }
11168                 break;
11169               } // case 114
11170             case 122:
11171               {
11172                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule m =
11173                     input.readMessage(
11174                         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.parser(),
11175                         extensionRegistry);
11176                 if (breakRulesBuilder_ == null) {
11177                   ensureBreakRulesIsMutable();
11178                   breakRules_.add(m);
11179                 } else {
11180                   breakRulesBuilder_.addMessage(m);
11181                 }
11182                 break;
11183               } // case 122
11184             default:
11185               {
11186                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
11187                   done = true; // was an endgroup tag
11188                 }
11189                 break;
11190               } // default:
11191           } // switch (tag)
11192         } // while (!done)
11193       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
11194         throw e.unwrapIOException();
11195       } finally {
11196         onChanged();
11197       } // finally
11198       return this;
11199     }
11200 
11201     private int bitField0_;
11202 
11203     private java.util.List<com.google.cloud.optimization.v1.Shipment> shipments_ =
11204         java.util.Collections.emptyList();
11205 
ensureShipmentsIsMutable()11206     private void ensureShipmentsIsMutable() {
11207       if (!((bitField0_ & 0x00000001) != 0)) {
11208         shipments_ = new java.util.ArrayList<com.google.cloud.optimization.v1.Shipment>(shipments_);
11209         bitField0_ |= 0x00000001;
11210       }
11211     }
11212 
11213     private com.google.protobuf.RepeatedFieldBuilderV3<
11214             com.google.cloud.optimization.v1.Shipment,
11215             com.google.cloud.optimization.v1.Shipment.Builder,
11216             com.google.cloud.optimization.v1.ShipmentOrBuilder>
11217         shipmentsBuilder_;
11218 
11219     /**
11220      *
11221      *
11222      * <pre>
11223      * Set of shipments which must be performed in the model.
11224      * </pre>
11225      *
11226      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11227      */
getShipmentsList()11228     public java.util.List<com.google.cloud.optimization.v1.Shipment> getShipmentsList() {
11229       if (shipmentsBuilder_ == null) {
11230         return java.util.Collections.unmodifiableList(shipments_);
11231       } else {
11232         return shipmentsBuilder_.getMessageList();
11233       }
11234     }
11235     /**
11236      *
11237      *
11238      * <pre>
11239      * Set of shipments which must be performed in the model.
11240      * </pre>
11241      *
11242      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11243      */
getShipmentsCount()11244     public int getShipmentsCount() {
11245       if (shipmentsBuilder_ == null) {
11246         return shipments_.size();
11247       } else {
11248         return shipmentsBuilder_.getCount();
11249       }
11250     }
11251     /**
11252      *
11253      *
11254      * <pre>
11255      * Set of shipments which must be performed in the model.
11256      * </pre>
11257      *
11258      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11259      */
getShipments(int index)11260     public com.google.cloud.optimization.v1.Shipment getShipments(int index) {
11261       if (shipmentsBuilder_ == null) {
11262         return shipments_.get(index);
11263       } else {
11264         return shipmentsBuilder_.getMessage(index);
11265       }
11266     }
11267     /**
11268      *
11269      *
11270      * <pre>
11271      * Set of shipments which must be performed in the model.
11272      * </pre>
11273      *
11274      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11275      */
setShipments(int index, com.google.cloud.optimization.v1.Shipment value)11276     public Builder setShipments(int index, com.google.cloud.optimization.v1.Shipment value) {
11277       if (shipmentsBuilder_ == null) {
11278         if (value == null) {
11279           throw new NullPointerException();
11280         }
11281         ensureShipmentsIsMutable();
11282         shipments_.set(index, value);
11283         onChanged();
11284       } else {
11285         shipmentsBuilder_.setMessage(index, value);
11286       }
11287       return this;
11288     }
11289     /**
11290      *
11291      *
11292      * <pre>
11293      * Set of shipments which must be performed in the model.
11294      * </pre>
11295      *
11296      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11297      */
setShipments( int index, com.google.cloud.optimization.v1.Shipment.Builder builderForValue)11298     public Builder setShipments(
11299         int index, com.google.cloud.optimization.v1.Shipment.Builder builderForValue) {
11300       if (shipmentsBuilder_ == null) {
11301         ensureShipmentsIsMutable();
11302         shipments_.set(index, builderForValue.build());
11303         onChanged();
11304       } else {
11305         shipmentsBuilder_.setMessage(index, builderForValue.build());
11306       }
11307       return this;
11308     }
11309     /**
11310      *
11311      *
11312      * <pre>
11313      * Set of shipments which must be performed in the model.
11314      * </pre>
11315      *
11316      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11317      */
addShipments(com.google.cloud.optimization.v1.Shipment value)11318     public Builder addShipments(com.google.cloud.optimization.v1.Shipment value) {
11319       if (shipmentsBuilder_ == null) {
11320         if (value == null) {
11321           throw new NullPointerException();
11322         }
11323         ensureShipmentsIsMutable();
11324         shipments_.add(value);
11325         onChanged();
11326       } else {
11327         shipmentsBuilder_.addMessage(value);
11328       }
11329       return this;
11330     }
11331     /**
11332      *
11333      *
11334      * <pre>
11335      * Set of shipments which must be performed in the model.
11336      * </pre>
11337      *
11338      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11339      */
addShipments(int index, com.google.cloud.optimization.v1.Shipment value)11340     public Builder addShipments(int index, com.google.cloud.optimization.v1.Shipment value) {
11341       if (shipmentsBuilder_ == null) {
11342         if (value == null) {
11343           throw new NullPointerException();
11344         }
11345         ensureShipmentsIsMutable();
11346         shipments_.add(index, value);
11347         onChanged();
11348       } else {
11349         shipmentsBuilder_.addMessage(index, value);
11350       }
11351       return this;
11352     }
11353     /**
11354      *
11355      *
11356      * <pre>
11357      * Set of shipments which must be performed in the model.
11358      * </pre>
11359      *
11360      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11361      */
addShipments(com.google.cloud.optimization.v1.Shipment.Builder builderForValue)11362     public Builder addShipments(com.google.cloud.optimization.v1.Shipment.Builder builderForValue) {
11363       if (shipmentsBuilder_ == null) {
11364         ensureShipmentsIsMutable();
11365         shipments_.add(builderForValue.build());
11366         onChanged();
11367       } else {
11368         shipmentsBuilder_.addMessage(builderForValue.build());
11369       }
11370       return this;
11371     }
11372     /**
11373      *
11374      *
11375      * <pre>
11376      * Set of shipments which must be performed in the model.
11377      * </pre>
11378      *
11379      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11380      */
addShipments( int index, com.google.cloud.optimization.v1.Shipment.Builder builderForValue)11381     public Builder addShipments(
11382         int index, com.google.cloud.optimization.v1.Shipment.Builder builderForValue) {
11383       if (shipmentsBuilder_ == null) {
11384         ensureShipmentsIsMutable();
11385         shipments_.add(index, builderForValue.build());
11386         onChanged();
11387       } else {
11388         shipmentsBuilder_.addMessage(index, builderForValue.build());
11389       }
11390       return this;
11391     }
11392     /**
11393      *
11394      *
11395      * <pre>
11396      * Set of shipments which must be performed in the model.
11397      * </pre>
11398      *
11399      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11400      */
addAllShipments( java.lang.Iterable<? extends com.google.cloud.optimization.v1.Shipment> values)11401     public Builder addAllShipments(
11402         java.lang.Iterable<? extends com.google.cloud.optimization.v1.Shipment> values) {
11403       if (shipmentsBuilder_ == null) {
11404         ensureShipmentsIsMutable();
11405         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shipments_);
11406         onChanged();
11407       } else {
11408         shipmentsBuilder_.addAllMessages(values);
11409       }
11410       return this;
11411     }
11412     /**
11413      *
11414      *
11415      * <pre>
11416      * Set of shipments which must be performed in the model.
11417      * </pre>
11418      *
11419      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11420      */
clearShipments()11421     public Builder clearShipments() {
11422       if (shipmentsBuilder_ == null) {
11423         shipments_ = java.util.Collections.emptyList();
11424         bitField0_ = (bitField0_ & ~0x00000001);
11425         onChanged();
11426       } else {
11427         shipmentsBuilder_.clear();
11428       }
11429       return this;
11430     }
11431     /**
11432      *
11433      *
11434      * <pre>
11435      * Set of shipments which must be performed in the model.
11436      * </pre>
11437      *
11438      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11439      */
removeShipments(int index)11440     public Builder removeShipments(int index) {
11441       if (shipmentsBuilder_ == null) {
11442         ensureShipmentsIsMutable();
11443         shipments_.remove(index);
11444         onChanged();
11445       } else {
11446         shipmentsBuilder_.remove(index);
11447       }
11448       return this;
11449     }
11450     /**
11451      *
11452      *
11453      * <pre>
11454      * Set of shipments which must be performed in the model.
11455      * </pre>
11456      *
11457      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11458      */
getShipmentsBuilder(int index)11459     public com.google.cloud.optimization.v1.Shipment.Builder getShipmentsBuilder(int index) {
11460       return getShipmentsFieldBuilder().getBuilder(index);
11461     }
11462     /**
11463      *
11464      *
11465      * <pre>
11466      * Set of shipments which must be performed in the model.
11467      * </pre>
11468      *
11469      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11470      */
getShipmentsOrBuilder(int index)11471     public com.google.cloud.optimization.v1.ShipmentOrBuilder getShipmentsOrBuilder(int index) {
11472       if (shipmentsBuilder_ == null) {
11473         return shipments_.get(index);
11474       } else {
11475         return shipmentsBuilder_.getMessageOrBuilder(index);
11476       }
11477     }
11478     /**
11479      *
11480      *
11481      * <pre>
11482      * Set of shipments which must be performed in the model.
11483      * </pre>
11484      *
11485      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11486      */
11487     public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentOrBuilder>
getShipmentsOrBuilderList()11488         getShipmentsOrBuilderList() {
11489       if (shipmentsBuilder_ != null) {
11490         return shipmentsBuilder_.getMessageOrBuilderList();
11491       } else {
11492         return java.util.Collections.unmodifiableList(shipments_);
11493       }
11494     }
11495     /**
11496      *
11497      *
11498      * <pre>
11499      * Set of shipments which must be performed in the model.
11500      * </pre>
11501      *
11502      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11503      */
addShipmentsBuilder()11504     public com.google.cloud.optimization.v1.Shipment.Builder addShipmentsBuilder() {
11505       return getShipmentsFieldBuilder()
11506           .addBuilder(com.google.cloud.optimization.v1.Shipment.getDefaultInstance());
11507     }
11508     /**
11509      *
11510      *
11511      * <pre>
11512      * Set of shipments which must be performed in the model.
11513      * </pre>
11514      *
11515      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11516      */
addShipmentsBuilder(int index)11517     public com.google.cloud.optimization.v1.Shipment.Builder addShipmentsBuilder(int index) {
11518       return getShipmentsFieldBuilder()
11519           .addBuilder(index, com.google.cloud.optimization.v1.Shipment.getDefaultInstance());
11520     }
11521     /**
11522      *
11523      *
11524      * <pre>
11525      * Set of shipments which must be performed in the model.
11526      * </pre>
11527      *
11528      * <code>repeated .google.cloud.optimization.v1.Shipment shipments = 1;</code>
11529      */
11530     public java.util.List<com.google.cloud.optimization.v1.Shipment.Builder>
getShipmentsBuilderList()11531         getShipmentsBuilderList() {
11532       return getShipmentsFieldBuilder().getBuilderList();
11533     }
11534 
11535     private com.google.protobuf.RepeatedFieldBuilderV3<
11536             com.google.cloud.optimization.v1.Shipment,
11537             com.google.cloud.optimization.v1.Shipment.Builder,
11538             com.google.cloud.optimization.v1.ShipmentOrBuilder>
getShipmentsFieldBuilder()11539         getShipmentsFieldBuilder() {
11540       if (shipmentsBuilder_ == null) {
11541         shipmentsBuilder_ =
11542             new com.google.protobuf.RepeatedFieldBuilderV3<
11543                 com.google.cloud.optimization.v1.Shipment,
11544                 com.google.cloud.optimization.v1.Shipment.Builder,
11545                 com.google.cloud.optimization.v1.ShipmentOrBuilder>(
11546                 shipments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
11547         shipments_ = null;
11548       }
11549       return shipmentsBuilder_;
11550     }
11551 
11552     private java.util.List<com.google.cloud.optimization.v1.Vehicle> vehicles_ =
11553         java.util.Collections.emptyList();
11554 
ensureVehiclesIsMutable()11555     private void ensureVehiclesIsMutable() {
11556       if (!((bitField0_ & 0x00000002) != 0)) {
11557         vehicles_ = new java.util.ArrayList<com.google.cloud.optimization.v1.Vehicle>(vehicles_);
11558         bitField0_ |= 0x00000002;
11559       }
11560     }
11561 
11562     private com.google.protobuf.RepeatedFieldBuilderV3<
11563             com.google.cloud.optimization.v1.Vehicle,
11564             com.google.cloud.optimization.v1.Vehicle.Builder,
11565             com.google.cloud.optimization.v1.VehicleOrBuilder>
11566         vehiclesBuilder_;
11567 
11568     /**
11569      *
11570      *
11571      * <pre>
11572      * Set of vehicles which can be used to perform visits.
11573      * </pre>
11574      *
11575      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11576      */
getVehiclesList()11577     public java.util.List<com.google.cloud.optimization.v1.Vehicle> getVehiclesList() {
11578       if (vehiclesBuilder_ == null) {
11579         return java.util.Collections.unmodifiableList(vehicles_);
11580       } else {
11581         return vehiclesBuilder_.getMessageList();
11582       }
11583     }
11584     /**
11585      *
11586      *
11587      * <pre>
11588      * Set of vehicles which can be used to perform visits.
11589      * </pre>
11590      *
11591      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11592      */
getVehiclesCount()11593     public int getVehiclesCount() {
11594       if (vehiclesBuilder_ == null) {
11595         return vehicles_.size();
11596       } else {
11597         return vehiclesBuilder_.getCount();
11598       }
11599     }
11600     /**
11601      *
11602      *
11603      * <pre>
11604      * Set of vehicles which can be used to perform visits.
11605      * </pre>
11606      *
11607      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11608      */
getVehicles(int index)11609     public com.google.cloud.optimization.v1.Vehicle getVehicles(int index) {
11610       if (vehiclesBuilder_ == null) {
11611         return vehicles_.get(index);
11612       } else {
11613         return vehiclesBuilder_.getMessage(index);
11614       }
11615     }
11616     /**
11617      *
11618      *
11619      * <pre>
11620      * Set of vehicles which can be used to perform visits.
11621      * </pre>
11622      *
11623      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11624      */
setVehicles(int index, com.google.cloud.optimization.v1.Vehicle value)11625     public Builder setVehicles(int index, com.google.cloud.optimization.v1.Vehicle value) {
11626       if (vehiclesBuilder_ == null) {
11627         if (value == null) {
11628           throw new NullPointerException();
11629         }
11630         ensureVehiclesIsMutable();
11631         vehicles_.set(index, value);
11632         onChanged();
11633       } else {
11634         vehiclesBuilder_.setMessage(index, value);
11635       }
11636       return this;
11637     }
11638     /**
11639      *
11640      *
11641      * <pre>
11642      * Set of vehicles which can be used to perform visits.
11643      * </pre>
11644      *
11645      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11646      */
setVehicles( int index, com.google.cloud.optimization.v1.Vehicle.Builder builderForValue)11647     public Builder setVehicles(
11648         int index, com.google.cloud.optimization.v1.Vehicle.Builder builderForValue) {
11649       if (vehiclesBuilder_ == null) {
11650         ensureVehiclesIsMutable();
11651         vehicles_.set(index, builderForValue.build());
11652         onChanged();
11653       } else {
11654         vehiclesBuilder_.setMessage(index, builderForValue.build());
11655       }
11656       return this;
11657     }
11658     /**
11659      *
11660      *
11661      * <pre>
11662      * Set of vehicles which can be used to perform visits.
11663      * </pre>
11664      *
11665      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11666      */
addVehicles(com.google.cloud.optimization.v1.Vehicle value)11667     public Builder addVehicles(com.google.cloud.optimization.v1.Vehicle value) {
11668       if (vehiclesBuilder_ == null) {
11669         if (value == null) {
11670           throw new NullPointerException();
11671         }
11672         ensureVehiclesIsMutable();
11673         vehicles_.add(value);
11674         onChanged();
11675       } else {
11676         vehiclesBuilder_.addMessage(value);
11677       }
11678       return this;
11679     }
11680     /**
11681      *
11682      *
11683      * <pre>
11684      * Set of vehicles which can be used to perform visits.
11685      * </pre>
11686      *
11687      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11688      */
addVehicles(int index, com.google.cloud.optimization.v1.Vehicle value)11689     public Builder addVehicles(int index, com.google.cloud.optimization.v1.Vehicle value) {
11690       if (vehiclesBuilder_ == null) {
11691         if (value == null) {
11692           throw new NullPointerException();
11693         }
11694         ensureVehiclesIsMutable();
11695         vehicles_.add(index, value);
11696         onChanged();
11697       } else {
11698         vehiclesBuilder_.addMessage(index, value);
11699       }
11700       return this;
11701     }
11702     /**
11703      *
11704      *
11705      * <pre>
11706      * Set of vehicles which can be used to perform visits.
11707      * </pre>
11708      *
11709      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11710      */
addVehicles(com.google.cloud.optimization.v1.Vehicle.Builder builderForValue)11711     public Builder addVehicles(com.google.cloud.optimization.v1.Vehicle.Builder builderForValue) {
11712       if (vehiclesBuilder_ == null) {
11713         ensureVehiclesIsMutable();
11714         vehicles_.add(builderForValue.build());
11715         onChanged();
11716       } else {
11717         vehiclesBuilder_.addMessage(builderForValue.build());
11718       }
11719       return this;
11720     }
11721     /**
11722      *
11723      *
11724      * <pre>
11725      * Set of vehicles which can be used to perform visits.
11726      * </pre>
11727      *
11728      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11729      */
addVehicles( int index, com.google.cloud.optimization.v1.Vehicle.Builder builderForValue)11730     public Builder addVehicles(
11731         int index, com.google.cloud.optimization.v1.Vehicle.Builder builderForValue) {
11732       if (vehiclesBuilder_ == null) {
11733         ensureVehiclesIsMutable();
11734         vehicles_.add(index, builderForValue.build());
11735         onChanged();
11736       } else {
11737         vehiclesBuilder_.addMessage(index, builderForValue.build());
11738       }
11739       return this;
11740     }
11741     /**
11742      *
11743      *
11744      * <pre>
11745      * Set of vehicles which can be used to perform visits.
11746      * </pre>
11747      *
11748      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11749      */
addAllVehicles( java.lang.Iterable<? extends com.google.cloud.optimization.v1.Vehicle> values)11750     public Builder addAllVehicles(
11751         java.lang.Iterable<? extends com.google.cloud.optimization.v1.Vehicle> values) {
11752       if (vehiclesBuilder_ == null) {
11753         ensureVehiclesIsMutable();
11754         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vehicles_);
11755         onChanged();
11756       } else {
11757         vehiclesBuilder_.addAllMessages(values);
11758       }
11759       return this;
11760     }
11761     /**
11762      *
11763      *
11764      * <pre>
11765      * Set of vehicles which can be used to perform visits.
11766      * </pre>
11767      *
11768      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11769      */
clearVehicles()11770     public Builder clearVehicles() {
11771       if (vehiclesBuilder_ == null) {
11772         vehicles_ = java.util.Collections.emptyList();
11773         bitField0_ = (bitField0_ & ~0x00000002);
11774         onChanged();
11775       } else {
11776         vehiclesBuilder_.clear();
11777       }
11778       return this;
11779     }
11780     /**
11781      *
11782      *
11783      * <pre>
11784      * Set of vehicles which can be used to perform visits.
11785      * </pre>
11786      *
11787      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11788      */
removeVehicles(int index)11789     public Builder removeVehicles(int index) {
11790       if (vehiclesBuilder_ == null) {
11791         ensureVehiclesIsMutable();
11792         vehicles_.remove(index);
11793         onChanged();
11794       } else {
11795         vehiclesBuilder_.remove(index);
11796       }
11797       return this;
11798     }
11799     /**
11800      *
11801      *
11802      * <pre>
11803      * Set of vehicles which can be used to perform visits.
11804      * </pre>
11805      *
11806      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11807      */
getVehiclesBuilder(int index)11808     public com.google.cloud.optimization.v1.Vehicle.Builder getVehiclesBuilder(int index) {
11809       return getVehiclesFieldBuilder().getBuilder(index);
11810     }
11811     /**
11812      *
11813      *
11814      * <pre>
11815      * Set of vehicles which can be used to perform visits.
11816      * </pre>
11817      *
11818      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11819      */
getVehiclesOrBuilder(int index)11820     public com.google.cloud.optimization.v1.VehicleOrBuilder getVehiclesOrBuilder(int index) {
11821       if (vehiclesBuilder_ == null) {
11822         return vehicles_.get(index);
11823       } else {
11824         return vehiclesBuilder_.getMessageOrBuilder(index);
11825       }
11826     }
11827     /**
11828      *
11829      *
11830      * <pre>
11831      * Set of vehicles which can be used to perform visits.
11832      * </pre>
11833      *
11834      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11835      */
11836     public java.util.List<? extends com.google.cloud.optimization.v1.VehicleOrBuilder>
getVehiclesOrBuilderList()11837         getVehiclesOrBuilderList() {
11838       if (vehiclesBuilder_ != null) {
11839         return vehiclesBuilder_.getMessageOrBuilderList();
11840       } else {
11841         return java.util.Collections.unmodifiableList(vehicles_);
11842       }
11843     }
11844     /**
11845      *
11846      *
11847      * <pre>
11848      * Set of vehicles which can be used to perform visits.
11849      * </pre>
11850      *
11851      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11852      */
addVehiclesBuilder()11853     public com.google.cloud.optimization.v1.Vehicle.Builder addVehiclesBuilder() {
11854       return getVehiclesFieldBuilder()
11855           .addBuilder(com.google.cloud.optimization.v1.Vehicle.getDefaultInstance());
11856     }
11857     /**
11858      *
11859      *
11860      * <pre>
11861      * Set of vehicles which can be used to perform visits.
11862      * </pre>
11863      *
11864      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11865      */
addVehiclesBuilder(int index)11866     public com.google.cloud.optimization.v1.Vehicle.Builder addVehiclesBuilder(int index) {
11867       return getVehiclesFieldBuilder()
11868           .addBuilder(index, com.google.cloud.optimization.v1.Vehicle.getDefaultInstance());
11869     }
11870     /**
11871      *
11872      *
11873      * <pre>
11874      * Set of vehicles which can be used to perform visits.
11875      * </pre>
11876      *
11877      * <code>repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;</code>
11878      */
11879     public java.util.List<com.google.cloud.optimization.v1.Vehicle.Builder>
getVehiclesBuilderList()11880         getVehiclesBuilderList() {
11881       return getVehiclesFieldBuilder().getBuilderList();
11882     }
11883 
11884     private com.google.protobuf.RepeatedFieldBuilderV3<
11885             com.google.cloud.optimization.v1.Vehicle,
11886             com.google.cloud.optimization.v1.Vehicle.Builder,
11887             com.google.cloud.optimization.v1.VehicleOrBuilder>
getVehiclesFieldBuilder()11888         getVehiclesFieldBuilder() {
11889       if (vehiclesBuilder_ == null) {
11890         vehiclesBuilder_ =
11891             new com.google.protobuf.RepeatedFieldBuilderV3<
11892                 com.google.cloud.optimization.v1.Vehicle,
11893                 com.google.cloud.optimization.v1.Vehicle.Builder,
11894                 com.google.cloud.optimization.v1.VehicleOrBuilder>(
11895                 vehicles_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
11896         vehicles_ = null;
11897       }
11898       return vehiclesBuilder_;
11899     }
11900 
11901     private int maxActiveVehicles_;
11902     /**
11903      *
11904      *
11905      * <pre>
11906      * Constrains the maximum number of active vehicles. A vehicle is active if
11907      * its route performs at least one shipment. This can be used to limit the
11908      * number of routes in the case where there are fewer drivers than
11909      * vehicles and that the fleet of vehicles is heterogeneous. The optimization
11910      * will then select the best subset of vehicles to use.
11911      * Must be strictly positive.
11912      * </pre>
11913      *
11914      * <code>optional int32 max_active_vehicles = 4;</code>
11915      *
11916      * @return Whether the maxActiveVehicles field is set.
11917      */
11918     @java.lang.Override
hasMaxActiveVehicles()11919     public boolean hasMaxActiveVehicles() {
11920       return ((bitField0_ & 0x00000004) != 0);
11921     }
11922     /**
11923      *
11924      *
11925      * <pre>
11926      * Constrains the maximum number of active vehicles. A vehicle is active if
11927      * its route performs at least one shipment. This can be used to limit the
11928      * number of routes in the case where there are fewer drivers than
11929      * vehicles and that the fleet of vehicles is heterogeneous. The optimization
11930      * will then select the best subset of vehicles to use.
11931      * Must be strictly positive.
11932      * </pre>
11933      *
11934      * <code>optional int32 max_active_vehicles = 4;</code>
11935      *
11936      * @return The maxActiveVehicles.
11937      */
11938     @java.lang.Override
getMaxActiveVehicles()11939     public int getMaxActiveVehicles() {
11940       return maxActiveVehicles_;
11941     }
11942     /**
11943      *
11944      *
11945      * <pre>
11946      * Constrains the maximum number of active vehicles. A vehicle is active if
11947      * its route performs at least one shipment. This can be used to limit the
11948      * number of routes in the case where there are fewer drivers than
11949      * vehicles and that the fleet of vehicles is heterogeneous. The optimization
11950      * will then select the best subset of vehicles to use.
11951      * Must be strictly positive.
11952      * </pre>
11953      *
11954      * <code>optional int32 max_active_vehicles = 4;</code>
11955      *
11956      * @param value The maxActiveVehicles to set.
11957      * @return This builder for chaining.
11958      */
setMaxActiveVehicles(int value)11959     public Builder setMaxActiveVehicles(int value) {
11960 
11961       maxActiveVehicles_ = value;
11962       bitField0_ |= 0x00000004;
11963       onChanged();
11964       return this;
11965     }
11966     /**
11967      *
11968      *
11969      * <pre>
11970      * Constrains the maximum number of active vehicles. A vehicle is active if
11971      * its route performs at least one shipment. This can be used to limit the
11972      * number of routes in the case where there are fewer drivers than
11973      * vehicles and that the fleet of vehicles is heterogeneous. The optimization
11974      * will then select the best subset of vehicles to use.
11975      * Must be strictly positive.
11976      * </pre>
11977      *
11978      * <code>optional int32 max_active_vehicles = 4;</code>
11979      *
11980      * @return This builder for chaining.
11981      */
clearMaxActiveVehicles()11982     public Builder clearMaxActiveVehicles() {
11983       bitField0_ = (bitField0_ & ~0x00000004);
11984       maxActiveVehicles_ = 0;
11985       onChanged();
11986       return this;
11987     }
11988 
11989     private com.google.protobuf.Timestamp globalStartTime_;
11990     private com.google.protobuf.SingleFieldBuilderV3<
11991             com.google.protobuf.Timestamp,
11992             com.google.protobuf.Timestamp.Builder,
11993             com.google.protobuf.TimestampOrBuilder>
11994         globalStartTimeBuilder_;
11995     /**
11996      *
11997      *
11998      * <pre>
11999      * Global start and end time of the model: no times outside of this range
12000      * can be considered valid.
12001      * The model's time span must be less than a year, i.e. the `global_end_time`
12002      * and the `global_start_time` must be within 31536000 seconds of each other.
12003      * When using `cost_per_*hour` fields, you might want to set this window to a
12004      * smaller interval to increase performance (eg. if you model a single day,
12005      * you should set the global time limits to that day).
12006      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12007      * as default.
12008      * </pre>
12009      *
12010      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12011      *
12012      * @return Whether the globalStartTime field is set.
12013      */
hasGlobalStartTime()12014     public boolean hasGlobalStartTime() {
12015       return ((bitField0_ & 0x00000008) != 0);
12016     }
12017     /**
12018      *
12019      *
12020      * <pre>
12021      * Global start and end time of the model: no times outside of this range
12022      * can be considered valid.
12023      * The model's time span must be less than a year, i.e. the `global_end_time`
12024      * and the `global_start_time` must be within 31536000 seconds of each other.
12025      * When using `cost_per_*hour` fields, you might want to set this window to a
12026      * smaller interval to increase performance (eg. if you model a single day,
12027      * you should set the global time limits to that day).
12028      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12029      * as default.
12030      * </pre>
12031      *
12032      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12033      *
12034      * @return The globalStartTime.
12035      */
getGlobalStartTime()12036     public com.google.protobuf.Timestamp getGlobalStartTime() {
12037       if (globalStartTimeBuilder_ == null) {
12038         return globalStartTime_ == null
12039             ? com.google.protobuf.Timestamp.getDefaultInstance()
12040             : globalStartTime_;
12041       } else {
12042         return globalStartTimeBuilder_.getMessage();
12043       }
12044     }
12045     /**
12046      *
12047      *
12048      * <pre>
12049      * Global start and end time of the model: no times outside of this range
12050      * can be considered valid.
12051      * The model's time span must be less than a year, i.e. the `global_end_time`
12052      * and the `global_start_time` must be within 31536000 seconds of each other.
12053      * When using `cost_per_*hour` fields, you might want to set this window to a
12054      * smaller interval to increase performance (eg. if you model a single day,
12055      * you should set the global time limits to that day).
12056      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12057      * as default.
12058      * </pre>
12059      *
12060      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12061      */
setGlobalStartTime(com.google.protobuf.Timestamp value)12062     public Builder setGlobalStartTime(com.google.protobuf.Timestamp value) {
12063       if (globalStartTimeBuilder_ == null) {
12064         if (value == null) {
12065           throw new NullPointerException();
12066         }
12067         globalStartTime_ = value;
12068       } else {
12069         globalStartTimeBuilder_.setMessage(value);
12070       }
12071       bitField0_ |= 0x00000008;
12072       onChanged();
12073       return this;
12074     }
12075     /**
12076      *
12077      *
12078      * <pre>
12079      * Global start and end time of the model: no times outside of this range
12080      * can be considered valid.
12081      * The model's time span must be less than a year, i.e. the `global_end_time`
12082      * and the `global_start_time` must be within 31536000 seconds of each other.
12083      * When using `cost_per_*hour` fields, you might want to set this window to a
12084      * smaller interval to increase performance (eg. if you model a single day,
12085      * you should set the global time limits to that day).
12086      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12087      * as default.
12088      * </pre>
12089      *
12090      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12091      */
setGlobalStartTime(com.google.protobuf.Timestamp.Builder builderForValue)12092     public Builder setGlobalStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
12093       if (globalStartTimeBuilder_ == null) {
12094         globalStartTime_ = builderForValue.build();
12095       } else {
12096         globalStartTimeBuilder_.setMessage(builderForValue.build());
12097       }
12098       bitField0_ |= 0x00000008;
12099       onChanged();
12100       return this;
12101     }
12102     /**
12103      *
12104      *
12105      * <pre>
12106      * Global start and end time of the model: no times outside of this range
12107      * can be considered valid.
12108      * The model's time span must be less than a year, i.e. the `global_end_time`
12109      * and the `global_start_time` must be within 31536000 seconds of each other.
12110      * When using `cost_per_*hour` fields, you might want to set this window to a
12111      * smaller interval to increase performance (eg. if you model a single day,
12112      * you should set the global time limits to that day).
12113      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12114      * as default.
12115      * </pre>
12116      *
12117      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12118      */
mergeGlobalStartTime(com.google.protobuf.Timestamp value)12119     public Builder mergeGlobalStartTime(com.google.protobuf.Timestamp value) {
12120       if (globalStartTimeBuilder_ == null) {
12121         if (((bitField0_ & 0x00000008) != 0)
12122             && globalStartTime_ != null
12123             && globalStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
12124           getGlobalStartTimeBuilder().mergeFrom(value);
12125         } else {
12126           globalStartTime_ = value;
12127         }
12128       } else {
12129         globalStartTimeBuilder_.mergeFrom(value);
12130       }
12131       bitField0_ |= 0x00000008;
12132       onChanged();
12133       return this;
12134     }
12135     /**
12136      *
12137      *
12138      * <pre>
12139      * Global start and end time of the model: no times outside of this range
12140      * can be considered valid.
12141      * The model's time span must be less than a year, i.e. the `global_end_time`
12142      * and the `global_start_time` must be within 31536000 seconds of each other.
12143      * When using `cost_per_*hour` fields, you might want to set this window to a
12144      * smaller interval to increase performance (eg. if you model a single day,
12145      * you should set the global time limits to that day).
12146      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12147      * as default.
12148      * </pre>
12149      *
12150      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12151      */
clearGlobalStartTime()12152     public Builder clearGlobalStartTime() {
12153       bitField0_ = (bitField0_ & ~0x00000008);
12154       globalStartTime_ = null;
12155       if (globalStartTimeBuilder_ != null) {
12156         globalStartTimeBuilder_.dispose();
12157         globalStartTimeBuilder_ = null;
12158       }
12159       onChanged();
12160       return this;
12161     }
12162     /**
12163      *
12164      *
12165      * <pre>
12166      * Global start and end time of the model: no times outside of this range
12167      * can be considered valid.
12168      * The model's time span must be less than a year, i.e. the `global_end_time`
12169      * and the `global_start_time` must be within 31536000 seconds of each other.
12170      * When using `cost_per_*hour` fields, you might want to set this window to a
12171      * smaller interval to increase performance (eg. if you model a single day,
12172      * you should set the global time limits to that day).
12173      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12174      * as default.
12175      * </pre>
12176      *
12177      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12178      */
getGlobalStartTimeBuilder()12179     public com.google.protobuf.Timestamp.Builder getGlobalStartTimeBuilder() {
12180       bitField0_ |= 0x00000008;
12181       onChanged();
12182       return getGlobalStartTimeFieldBuilder().getBuilder();
12183     }
12184     /**
12185      *
12186      *
12187      * <pre>
12188      * Global start and end time of the model: no times outside of this range
12189      * can be considered valid.
12190      * The model's time span must be less than a year, i.e. the `global_end_time`
12191      * and the `global_start_time` must be within 31536000 seconds of each other.
12192      * When using `cost_per_*hour` fields, you might want to set this window to a
12193      * smaller interval to increase performance (eg. if you model a single day,
12194      * you should set the global time limits to that day).
12195      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12196      * as default.
12197      * </pre>
12198      *
12199      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12200      */
getGlobalStartTimeOrBuilder()12201     public com.google.protobuf.TimestampOrBuilder getGlobalStartTimeOrBuilder() {
12202       if (globalStartTimeBuilder_ != null) {
12203         return globalStartTimeBuilder_.getMessageOrBuilder();
12204       } else {
12205         return globalStartTime_ == null
12206             ? com.google.protobuf.Timestamp.getDefaultInstance()
12207             : globalStartTime_;
12208       }
12209     }
12210     /**
12211      *
12212      *
12213      * <pre>
12214      * Global start and end time of the model: no times outside of this range
12215      * can be considered valid.
12216      * The model's time span must be less than a year, i.e. the `global_end_time`
12217      * and the `global_start_time` must be within 31536000 seconds of each other.
12218      * When using `cost_per_*hour` fields, you might want to set this window to a
12219      * smaller interval to increase performance (eg. if you model a single day,
12220      * you should set the global time limits to that day).
12221      * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used
12222      * as default.
12223      * </pre>
12224      *
12225      * <code>.google.protobuf.Timestamp global_start_time = 5;</code>
12226      */
12227     private com.google.protobuf.SingleFieldBuilderV3<
12228             com.google.protobuf.Timestamp,
12229             com.google.protobuf.Timestamp.Builder,
12230             com.google.protobuf.TimestampOrBuilder>
getGlobalStartTimeFieldBuilder()12231         getGlobalStartTimeFieldBuilder() {
12232       if (globalStartTimeBuilder_ == null) {
12233         globalStartTimeBuilder_ =
12234             new com.google.protobuf.SingleFieldBuilderV3<
12235                 com.google.protobuf.Timestamp,
12236                 com.google.protobuf.Timestamp.Builder,
12237                 com.google.protobuf.TimestampOrBuilder>(
12238                 getGlobalStartTime(), getParentForChildren(), isClean());
12239         globalStartTime_ = null;
12240       }
12241       return globalStartTimeBuilder_;
12242     }
12243 
12244     private com.google.protobuf.Timestamp globalEndTime_;
12245     private com.google.protobuf.SingleFieldBuilderV3<
12246             com.google.protobuf.Timestamp,
12247             com.google.protobuf.Timestamp.Builder,
12248             com.google.protobuf.TimestampOrBuilder>
12249         globalEndTimeBuilder_;
12250     /**
12251      *
12252      *
12253      * <pre>
12254      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12255      * is used as default.
12256      * </pre>
12257      *
12258      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12259      *
12260      * @return Whether the globalEndTime field is set.
12261      */
hasGlobalEndTime()12262     public boolean hasGlobalEndTime() {
12263       return ((bitField0_ & 0x00000010) != 0);
12264     }
12265     /**
12266      *
12267      *
12268      * <pre>
12269      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12270      * is used as default.
12271      * </pre>
12272      *
12273      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12274      *
12275      * @return The globalEndTime.
12276      */
getGlobalEndTime()12277     public com.google.protobuf.Timestamp getGlobalEndTime() {
12278       if (globalEndTimeBuilder_ == null) {
12279         return globalEndTime_ == null
12280             ? com.google.protobuf.Timestamp.getDefaultInstance()
12281             : globalEndTime_;
12282       } else {
12283         return globalEndTimeBuilder_.getMessage();
12284       }
12285     }
12286     /**
12287      *
12288      *
12289      * <pre>
12290      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12291      * is used as default.
12292      * </pre>
12293      *
12294      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12295      */
setGlobalEndTime(com.google.protobuf.Timestamp value)12296     public Builder setGlobalEndTime(com.google.protobuf.Timestamp value) {
12297       if (globalEndTimeBuilder_ == null) {
12298         if (value == null) {
12299           throw new NullPointerException();
12300         }
12301         globalEndTime_ = value;
12302       } else {
12303         globalEndTimeBuilder_.setMessage(value);
12304       }
12305       bitField0_ |= 0x00000010;
12306       onChanged();
12307       return this;
12308     }
12309     /**
12310      *
12311      *
12312      * <pre>
12313      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12314      * is used as default.
12315      * </pre>
12316      *
12317      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12318      */
setGlobalEndTime(com.google.protobuf.Timestamp.Builder builderForValue)12319     public Builder setGlobalEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
12320       if (globalEndTimeBuilder_ == null) {
12321         globalEndTime_ = builderForValue.build();
12322       } else {
12323         globalEndTimeBuilder_.setMessage(builderForValue.build());
12324       }
12325       bitField0_ |= 0x00000010;
12326       onChanged();
12327       return this;
12328     }
12329     /**
12330      *
12331      *
12332      * <pre>
12333      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12334      * is used as default.
12335      * </pre>
12336      *
12337      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12338      */
mergeGlobalEndTime(com.google.protobuf.Timestamp value)12339     public Builder mergeGlobalEndTime(com.google.protobuf.Timestamp value) {
12340       if (globalEndTimeBuilder_ == null) {
12341         if (((bitField0_ & 0x00000010) != 0)
12342             && globalEndTime_ != null
12343             && globalEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
12344           getGlobalEndTimeBuilder().mergeFrom(value);
12345         } else {
12346           globalEndTime_ = value;
12347         }
12348       } else {
12349         globalEndTimeBuilder_.mergeFrom(value);
12350       }
12351       bitField0_ |= 0x00000010;
12352       onChanged();
12353       return this;
12354     }
12355     /**
12356      *
12357      *
12358      * <pre>
12359      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12360      * is used as default.
12361      * </pre>
12362      *
12363      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12364      */
clearGlobalEndTime()12365     public Builder clearGlobalEndTime() {
12366       bitField0_ = (bitField0_ & ~0x00000010);
12367       globalEndTime_ = null;
12368       if (globalEndTimeBuilder_ != null) {
12369         globalEndTimeBuilder_.dispose();
12370         globalEndTimeBuilder_ = null;
12371       }
12372       onChanged();
12373       return this;
12374     }
12375     /**
12376      *
12377      *
12378      * <pre>
12379      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12380      * is used as default.
12381      * </pre>
12382      *
12383      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12384      */
getGlobalEndTimeBuilder()12385     public com.google.protobuf.Timestamp.Builder getGlobalEndTimeBuilder() {
12386       bitField0_ |= 0x00000010;
12387       onChanged();
12388       return getGlobalEndTimeFieldBuilder().getBuilder();
12389     }
12390     /**
12391      *
12392      *
12393      * <pre>
12394      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12395      * is used as default.
12396      * </pre>
12397      *
12398      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12399      */
getGlobalEndTimeOrBuilder()12400     public com.google.protobuf.TimestampOrBuilder getGlobalEndTimeOrBuilder() {
12401       if (globalEndTimeBuilder_ != null) {
12402         return globalEndTimeBuilder_.getMessageOrBuilder();
12403       } else {
12404         return globalEndTime_ == null
12405             ? com.google.protobuf.Timestamp.getDefaultInstance()
12406             : globalEndTime_;
12407       }
12408     }
12409     /**
12410      *
12411      *
12412      * <pre>
12413      * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0)
12414      * is used as default.
12415      * </pre>
12416      *
12417      * <code>.google.protobuf.Timestamp global_end_time = 6;</code>
12418      */
12419     private com.google.protobuf.SingleFieldBuilderV3<
12420             com.google.protobuf.Timestamp,
12421             com.google.protobuf.Timestamp.Builder,
12422             com.google.protobuf.TimestampOrBuilder>
getGlobalEndTimeFieldBuilder()12423         getGlobalEndTimeFieldBuilder() {
12424       if (globalEndTimeBuilder_ == null) {
12425         globalEndTimeBuilder_ =
12426             new com.google.protobuf.SingleFieldBuilderV3<
12427                 com.google.protobuf.Timestamp,
12428                 com.google.protobuf.Timestamp.Builder,
12429                 com.google.protobuf.TimestampOrBuilder>(
12430                 getGlobalEndTime(), getParentForChildren(), isClean());
12431         globalEndTime_ = null;
12432       }
12433       return globalEndTimeBuilder_;
12434     }
12435 
12436     private double globalDurationCostPerHour_;
12437     /**
12438      *
12439      *
12440      * <pre>
12441      * The "global duration" of the overall plan is the difference between the
12442      * earliest effective start time and the latest effective end time of
12443      * all vehicles. Users can assign a cost per hour to that quantity to try
12444      * and optimize for earliest job completion, for example. This cost must be in
12445      * the same unit as
12446      * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
12447      * </pre>
12448      *
12449      * <code>double global_duration_cost_per_hour = 7;</code>
12450      *
12451      * @return The globalDurationCostPerHour.
12452      */
12453     @java.lang.Override
getGlobalDurationCostPerHour()12454     public double getGlobalDurationCostPerHour() {
12455       return globalDurationCostPerHour_;
12456     }
12457     /**
12458      *
12459      *
12460      * <pre>
12461      * The "global duration" of the overall plan is the difference between the
12462      * earliest effective start time and the latest effective end time of
12463      * all vehicles. Users can assign a cost per hour to that quantity to try
12464      * and optimize for earliest job completion, for example. This cost must be in
12465      * the same unit as
12466      * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
12467      * </pre>
12468      *
12469      * <code>double global_duration_cost_per_hour = 7;</code>
12470      *
12471      * @param value The globalDurationCostPerHour to set.
12472      * @return This builder for chaining.
12473      */
setGlobalDurationCostPerHour(double value)12474     public Builder setGlobalDurationCostPerHour(double value) {
12475 
12476       globalDurationCostPerHour_ = value;
12477       bitField0_ |= 0x00000020;
12478       onChanged();
12479       return this;
12480     }
12481     /**
12482      *
12483      *
12484      * <pre>
12485      * The "global duration" of the overall plan is the difference between the
12486      * earliest effective start time and the latest effective end time of
12487      * all vehicles. Users can assign a cost per hour to that quantity to try
12488      * and optimize for earliest job completion, for example. This cost must be in
12489      * the same unit as
12490      * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost].
12491      * </pre>
12492      *
12493      * <code>double global_duration_cost_per_hour = 7;</code>
12494      *
12495      * @return This builder for chaining.
12496      */
clearGlobalDurationCostPerHour()12497     public Builder clearGlobalDurationCostPerHour() {
12498       bitField0_ = (bitField0_ & ~0x00000020);
12499       globalDurationCostPerHour_ = 0D;
12500       onChanged();
12501       return this;
12502     }
12503 
12504     private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>
12505         durationDistanceMatrices_ = java.util.Collections.emptyList();
12506 
ensureDurationDistanceMatricesIsMutable()12507     private void ensureDurationDistanceMatricesIsMutable() {
12508       if (!((bitField0_ & 0x00000040) != 0)) {
12509         durationDistanceMatrices_ =
12510             new java.util.ArrayList<
12511                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>(
12512                 durationDistanceMatrices_);
12513         bitField0_ |= 0x00000040;
12514       }
12515     }
12516 
12517     private com.google.protobuf.RepeatedFieldBuilderV3<
12518             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix,
12519             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder,
12520             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>
12521         durationDistanceMatricesBuilder_;
12522 
12523     /**
12524      *
12525      *
12526      * <pre>
12527      * Specifies duration and distance matrices used in the model. If this field
12528      * is empty, Google Maps or geodesic distances will be used instead, depending
12529      * on the value of the `use_geodesic_distances` field. If it is not empty,
12530      * `use_geodesic_distances` cannot be true and neither
12531      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
12532      * can be empty.
12533      * Usage examples:
12534      * * There are two locations: locA and locB.
12535      * * 1 vehicle starting its route at locA and ending it at locA.
12536      * * 1 pickup visit request at locB.
12537      * ```
12538      * model {
12539      *   vehicles { start_tags: "locA"  end_tags: "locA" }
12540      *   shipments { pickups { tags: "locB" } }
12541      *   duration_distance_matrix_src_tags: "locA"
12542      *   duration_distance_matrix_src_tags: "locB"
12543      *   duration_distance_matrix_dst_tags: "locA"
12544      *   duration_distance_matrix_dst_tags: "locB"
12545      *   duration_distance_matrices {
12546      *     rows {  # from: locA
12547      *       durations { seconds: 0 }   meters: 0    # to: locA
12548      *       durations { seconds: 100 } meters: 1000 # to: locB
12549      *     }
12550      *     rows {  # from: locB
12551      *       durations { seconds: 102 } meters: 990 # to: locA
12552      *       durations { seconds: 0 }   meters: 0   # to: locB
12553      *     }
12554      *   }
12555      * }
12556      * ```
12557      * * There are three locations: locA, locB and locC.
12558      * * 1 vehicle starting its route at locA and ending it at locB, using
12559      *   matrix "fast".
12560      * * 1 vehicle starting its route at locB and ending it at locB, using
12561      *   matrix "slow".
12562      * * 1 vehicle starting its route at locB and ending it at locB, using
12563      *   matrix "fast".
12564      * * 1 pickup visit request at locC.
12565      * ```
12566      * model {
12567      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
12568      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
12569      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
12570      *   shipments { pickups { tags: "locC" } }
12571      *   duration_distance_matrix_src_tags: "locA"
12572      *   duration_distance_matrix_src_tags: "locB"
12573      *   duration_distance_matrix_src_tags: "locC"
12574      *   duration_distance_matrix_dst_tags: "locB"
12575      *   duration_distance_matrix_dst_tags: "locC"
12576      *   duration_distance_matrices {
12577      *     vehicle_start_tag: "fast"
12578      *     rows {  # from: locA
12579      *       durations { seconds: 1000 } meters: 2000 # to: locB
12580      *       durations { seconds: 600 }  meters: 1000 # to: locC
12581      *     }
12582      *     rows {  # from: locB
12583      *       durations { seconds: 0 }   meters: 0    # to: locB
12584      *       durations { seconds: 700 } meters: 1200 # to: locC
12585      *     }
12586      *     rows {  # from: locC
12587      *       durations { seconds: 702 } meters: 1190 # to: locB
12588      *       durations { seconds: 0 }   meters: 0    # to: locC
12589      *     }
12590      *   }
12591      *   duration_distance_matrices {
12592      *     vehicle_start_tag: "slow"
12593      *     rows {  # from: locA
12594      *       durations { seconds: 1800 } meters: 2001 # to: locB
12595      *       durations { seconds: 900 }  meters: 1002 # to: locC
12596      *     }
12597      *     rows {  # from: locB
12598      *       durations { seconds: 0 }    meters: 0    # to: locB
12599      *       durations { seconds: 1000 } meters: 1202 # to: locC
12600      *     }
12601      *     rows {  # from: locC
12602      *       durations { seconds: 1001 } meters: 1195 # to: locB
12603      *       durations { seconds: 0 }    meters: 0    # to: locC
12604      *     }
12605      *   }
12606      * }
12607      * ```
12608      * </pre>
12609      *
12610      * <code>
12611      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
12612      * </code>
12613      */
12614     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>
getDurationDistanceMatricesList()12615         getDurationDistanceMatricesList() {
12616       if (durationDistanceMatricesBuilder_ == null) {
12617         return java.util.Collections.unmodifiableList(durationDistanceMatrices_);
12618       } else {
12619         return durationDistanceMatricesBuilder_.getMessageList();
12620       }
12621     }
12622     /**
12623      *
12624      *
12625      * <pre>
12626      * Specifies duration and distance matrices used in the model. If this field
12627      * is empty, Google Maps or geodesic distances will be used instead, depending
12628      * on the value of the `use_geodesic_distances` field. If it is not empty,
12629      * `use_geodesic_distances` cannot be true and neither
12630      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
12631      * can be empty.
12632      * Usage examples:
12633      * * There are two locations: locA and locB.
12634      * * 1 vehicle starting its route at locA and ending it at locA.
12635      * * 1 pickup visit request at locB.
12636      * ```
12637      * model {
12638      *   vehicles { start_tags: "locA"  end_tags: "locA" }
12639      *   shipments { pickups { tags: "locB" } }
12640      *   duration_distance_matrix_src_tags: "locA"
12641      *   duration_distance_matrix_src_tags: "locB"
12642      *   duration_distance_matrix_dst_tags: "locA"
12643      *   duration_distance_matrix_dst_tags: "locB"
12644      *   duration_distance_matrices {
12645      *     rows {  # from: locA
12646      *       durations { seconds: 0 }   meters: 0    # to: locA
12647      *       durations { seconds: 100 } meters: 1000 # to: locB
12648      *     }
12649      *     rows {  # from: locB
12650      *       durations { seconds: 102 } meters: 990 # to: locA
12651      *       durations { seconds: 0 }   meters: 0   # to: locB
12652      *     }
12653      *   }
12654      * }
12655      * ```
12656      * * There are three locations: locA, locB and locC.
12657      * * 1 vehicle starting its route at locA and ending it at locB, using
12658      *   matrix "fast".
12659      * * 1 vehicle starting its route at locB and ending it at locB, using
12660      *   matrix "slow".
12661      * * 1 vehicle starting its route at locB and ending it at locB, using
12662      *   matrix "fast".
12663      * * 1 pickup visit request at locC.
12664      * ```
12665      * model {
12666      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
12667      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
12668      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
12669      *   shipments { pickups { tags: "locC" } }
12670      *   duration_distance_matrix_src_tags: "locA"
12671      *   duration_distance_matrix_src_tags: "locB"
12672      *   duration_distance_matrix_src_tags: "locC"
12673      *   duration_distance_matrix_dst_tags: "locB"
12674      *   duration_distance_matrix_dst_tags: "locC"
12675      *   duration_distance_matrices {
12676      *     vehicle_start_tag: "fast"
12677      *     rows {  # from: locA
12678      *       durations { seconds: 1000 } meters: 2000 # to: locB
12679      *       durations { seconds: 600 }  meters: 1000 # to: locC
12680      *     }
12681      *     rows {  # from: locB
12682      *       durations { seconds: 0 }   meters: 0    # to: locB
12683      *       durations { seconds: 700 } meters: 1200 # to: locC
12684      *     }
12685      *     rows {  # from: locC
12686      *       durations { seconds: 702 } meters: 1190 # to: locB
12687      *       durations { seconds: 0 }   meters: 0    # to: locC
12688      *     }
12689      *   }
12690      *   duration_distance_matrices {
12691      *     vehicle_start_tag: "slow"
12692      *     rows {  # from: locA
12693      *       durations { seconds: 1800 } meters: 2001 # to: locB
12694      *       durations { seconds: 900 }  meters: 1002 # to: locC
12695      *     }
12696      *     rows {  # from: locB
12697      *       durations { seconds: 0 }    meters: 0    # to: locB
12698      *       durations { seconds: 1000 } meters: 1202 # to: locC
12699      *     }
12700      *     rows {  # from: locC
12701      *       durations { seconds: 1001 } meters: 1195 # to: locB
12702      *       durations { seconds: 0 }    meters: 0    # to: locC
12703      *     }
12704      *   }
12705      * }
12706      * ```
12707      * </pre>
12708      *
12709      * <code>
12710      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
12711      * </code>
12712      */
getDurationDistanceMatricesCount()12713     public int getDurationDistanceMatricesCount() {
12714       if (durationDistanceMatricesBuilder_ == null) {
12715         return durationDistanceMatrices_.size();
12716       } else {
12717         return durationDistanceMatricesBuilder_.getCount();
12718       }
12719     }
12720     /**
12721      *
12722      *
12723      * <pre>
12724      * Specifies duration and distance matrices used in the model. If this field
12725      * is empty, Google Maps or geodesic distances will be used instead, depending
12726      * on the value of the `use_geodesic_distances` field. If it is not empty,
12727      * `use_geodesic_distances` cannot be true and neither
12728      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
12729      * can be empty.
12730      * Usage examples:
12731      * * There are two locations: locA and locB.
12732      * * 1 vehicle starting its route at locA and ending it at locA.
12733      * * 1 pickup visit request at locB.
12734      * ```
12735      * model {
12736      *   vehicles { start_tags: "locA"  end_tags: "locA" }
12737      *   shipments { pickups { tags: "locB" } }
12738      *   duration_distance_matrix_src_tags: "locA"
12739      *   duration_distance_matrix_src_tags: "locB"
12740      *   duration_distance_matrix_dst_tags: "locA"
12741      *   duration_distance_matrix_dst_tags: "locB"
12742      *   duration_distance_matrices {
12743      *     rows {  # from: locA
12744      *       durations { seconds: 0 }   meters: 0    # to: locA
12745      *       durations { seconds: 100 } meters: 1000 # to: locB
12746      *     }
12747      *     rows {  # from: locB
12748      *       durations { seconds: 102 } meters: 990 # to: locA
12749      *       durations { seconds: 0 }   meters: 0   # to: locB
12750      *     }
12751      *   }
12752      * }
12753      * ```
12754      * * There are three locations: locA, locB and locC.
12755      * * 1 vehicle starting its route at locA and ending it at locB, using
12756      *   matrix "fast".
12757      * * 1 vehicle starting its route at locB and ending it at locB, using
12758      *   matrix "slow".
12759      * * 1 vehicle starting its route at locB and ending it at locB, using
12760      *   matrix "fast".
12761      * * 1 pickup visit request at locC.
12762      * ```
12763      * model {
12764      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
12765      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
12766      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
12767      *   shipments { pickups { tags: "locC" } }
12768      *   duration_distance_matrix_src_tags: "locA"
12769      *   duration_distance_matrix_src_tags: "locB"
12770      *   duration_distance_matrix_src_tags: "locC"
12771      *   duration_distance_matrix_dst_tags: "locB"
12772      *   duration_distance_matrix_dst_tags: "locC"
12773      *   duration_distance_matrices {
12774      *     vehicle_start_tag: "fast"
12775      *     rows {  # from: locA
12776      *       durations { seconds: 1000 } meters: 2000 # to: locB
12777      *       durations { seconds: 600 }  meters: 1000 # to: locC
12778      *     }
12779      *     rows {  # from: locB
12780      *       durations { seconds: 0 }   meters: 0    # to: locB
12781      *       durations { seconds: 700 } meters: 1200 # to: locC
12782      *     }
12783      *     rows {  # from: locC
12784      *       durations { seconds: 702 } meters: 1190 # to: locB
12785      *       durations { seconds: 0 }   meters: 0    # to: locC
12786      *     }
12787      *   }
12788      *   duration_distance_matrices {
12789      *     vehicle_start_tag: "slow"
12790      *     rows {  # from: locA
12791      *       durations { seconds: 1800 } meters: 2001 # to: locB
12792      *       durations { seconds: 900 }  meters: 1002 # to: locC
12793      *     }
12794      *     rows {  # from: locB
12795      *       durations { seconds: 0 }    meters: 0    # to: locB
12796      *       durations { seconds: 1000 } meters: 1202 # to: locC
12797      *     }
12798      *     rows {  # from: locC
12799      *       durations { seconds: 1001 } meters: 1195 # to: locB
12800      *       durations { seconds: 0 }    meters: 0    # to: locC
12801      *     }
12802      *   }
12803      * }
12804      * ```
12805      * </pre>
12806      *
12807      * <code>
12808      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
12809      * </code>
12810      */
12811     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
getDurationDistanceMatrices(int index)12812         getDurationDistanceMatrices(int index) {
12813       if (durationDistanceMatricesBuilder_ == null) {
12814         return durationDistanceMatrices_.get(index);
12815       } else {
12816         return durationDistanceMatricesBuilder_.getMessage(index);
12817       }
12818     }
12819     /**
12820      *
12821      *
12822      * <pre>
12823      * Specifies duration and distance matrices used in the model. If this field
12824      * is empty, Google Maps or geodesic distances will be used instead, depending
12825      * on the value of the `use_geodesic_distances` field. If it is not empty,
12826      * `use_geodesic_distances` cannot be true and neither
12827      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
12828      * can be empty.
12829      * Usage examples:
12830      * * There are two locations: locA and locB.
12831      * * 1 vehicle starting its route at locA and ending it at locA.
12832      * * 1 pickup visit request at locB.
12833      * ```
12834      * model {
12835      *   vehicles { start_tags: "locA"  end_tags: "locA" }
12836      *   shipments { pickups { tags: "locB" } }
12837      *   duration_distance_matrix_src_tags: "locA"
12838      *   duration_distance_matrix_src_tags: "locB"
12839      *   duration_distance_matrix_dst_tags: "locA"
12840      *   duration_distance_matrix_dst_tags: "locB"
12841      *   duration_distance_matrices {
12842      *     rows {  # from: locA
12843      *       durations { seconds: 0 }   meters: 0    # to: locA
12844      *       durations { seconds: 100 } meters: 1000 # to: locB
12845      *     }
12846      *     rows {  # from: locB
12847      *       durations { seconds: 102 } meters: 990 # to: locA
12848      *       durations { seconds: 0 }   meters: 0   # to: locB
12849      *     }
12850      *   }
12851      * }
12852      * ```
12853      * * There are three locations: locA, locB and locC.
12854      * * 1 vehicle starting its route at locA and ending it at locB, using
12855      *   matrix "fast".
12856      * * 1 vehicle starting its route at locB and ending it at locB, using
12857      *   matrix "slow".
12858      * * 1 vehicle starting its route at locB and ending it at locB, using
12859      *   matrix "fast".
12860      * * 1 pickup visit request at locC.
12861      * ```
12862      * model {
12863      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
12864      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
12865      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
12866      *   shipments { pickups { tags: "locC" } }
12867      *   duration_distance_matrix_src_tags: "locA"
12868      *   duration_distance_matrix_src_tags: "locB"
12869      *   duration_distance_matrix_src_tags: "locC"
12870      *   duration_distance_matrix_dst_tags: "locB"
12871      *   duration_distance_matrix_dst_tags: "locC"
12872      *   duration_distance_matrices {
12873      *     vehicle_start_tag: "fast"
12874      *     rows {  # from: locA
12875      *       durations { seconds: 1000 } meters: 2000 # to: locB
12876      *       durations { seconds: 600 }  meters: 1000 # to: locC
12877      *     }
12878      *     rows {  # from: locB
12879      *       durations { seconds: 0 }   meters: 0    # to: locB
12880      *       durations { seconds: 700 } meters: 1200 # to: locC
12881      *     }
12882      *     rows {  # from: locC
12883      *       durations { seconds: 702 } meters: 1190 # to: locB
12884      *       durations { seconds: 0 }   meters: 0    # to: locC
12885      *     }
12886      *   }
12887      *   duration_distance_matrices {
12888      *     vehicle_start_tag: "slow"
12889      *     rows {  # from: locA
12890      *       durations { seconds: 1800 } meters: 2001 # to: locB
12891      *       durations { seconds: 900 }  meters: 1002 # to: locC
12892      *     }
12893      *     rows {  # from: locB
12894      *       durations { seconds: 0 }    meters: 0    # to: locB
12895      *       durations { seconds: 1000 } meters: 1202 # to: locC
12896      *     }
12897      *     rows {  # from: locC
12898      *       durations { seconds: 1001 } meters: 1195 # to: locB
12899      *       durations { seconds: 0 }    meters: 0    # to: locC
12900      *     }
12901      *   }
12902      * }
12903      * ```
12904      * </pre>
12905      *
12906      * <code>
12907      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
12908      * </code>
12909      */
setDurationDistanceMatrices( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value)12910     public Builder setDurationDistanceMatrices(
12911         int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value) {
12912       if (durationDistanceMatricesBuilder_ == null) {
12913         if (value == null) {
12914           throw new NullPointerException();
12915         }
12916         ensureDurationDistanceMatricesIsMutable();
12917         durationDistanceMatrices_.set(index, value);
12918         onChanged();
12919       } else {
12920         durationDistanceMatricesBuilder_.setMessage(index, value);
12921       }
12922       return this;
12923     }
12924     /**
12925      *
12926      *
12927      * <pre>
12928      * Specifies duration and distance matrices used in the model. If this field
12929      * is empty, Google Maps or geodesic distances will be used instead, depending
12930      * on the value of the `use_geodesic_distances` field. If it is not empty,
12931      * `use_geodesic_distances` cannot be true and neither
12932      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
12933      * can be empty.
12934      * Usage examples:
12935      * * There are two locations: locA and locB.
12936      * * 1 vehicle starting its route at locA and ending it at locA.
12937      * * 1 pickup visit request at locB.
12938      * ```
12939      * model {
12940      *   vehicles { start_tags: "locA"  end_tags: "locA" }
12941      *   shipments { pickups { tags: "locB" } }
12942      *   duration_distance_matrix_src_tags: "locA"
12943      *   duration_distance_matrix_src_tags: "locB"
12944      *   duration_distance_matrix_dst_tags: "locA"
12945      *   duration_distance_matrix_dst_tags: "locB"
12946      *   duration_distance_matrices {
12947      *     rows {  # from: locA
12948      *       durations { seconds: 0 }   meters: 0    # to: locA
12949      *       durations { seconds: 100 } meters: 1000 # to: locB
12950      *     }
12951      *     rows {  # from: locB
12952      *       durations { seconds: 102 } meters: 990 # to: locA
12953      *       durations { seconds: 0 }   meters: 0   # to: locB
12954      *     }
12955      *   }
12956      * }
12957      * ```
12958      * * There are three locations: locA, locB and locC.
12959      * * 1 vehicle starting its route at locA and ending it at locB, using
12960      *   matrix "fast".
12961      * * 1 vehicle starting its route at locB and ending it at locB, using
12962      *   matrix "slow".
12963      * * 1 vehicle starting its route at locB and ending it at locB, using
12964      *   matrix "fast".
12965      * * 1 pickup visit request at locC.
12966      * ```
12967      * model {
12968      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
12969      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
12970      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
12971      *   shipments { pickups { tags: "locC" } }
12972      *   duration_distance_matrix_src_tags: "locA"
12973      *   duration_distance_matrix_src_tags: "locB"
12974      *   duration_distance_matrix_src_tags: "locC"
12975      *   duration_distance_matrix_dst_tags: "locB"
12976      *   duration_distance_matrix_dst_tags: "locC"
12977      *   duration_distance_matrices {
12978      *     vehicle_start_tag: "fast"
12979      *     rows {  # from: locA
12980      *       durations { seconds: 1000 } meters: 2000 # to: locB
12981      *       durations { seconds: 600 }  meters: 1000 # to: locC
12982      *     }
12983      *     rows {  # from: locB
12984      *       durations { seconds: 0 }   meters: 0    # to: locB
12985      *       durations { seconds: 700 } meters: 1200 # to: locC
12986      *     }
12987      *     rows {  # from: locC
12988      *       durations { seconds: 702 } meters: 1190 # to: locB
12989      *       durations { seconds: 0 }   meters: 0    # to: locC
12990      *     }
12991      *   }
12992      *   duration_distance_matrices {
12993      *     vehicle_start_tag: "slow"
12994      *     rows {  # from: locA
12995      *       durations { seconds: 1800 } meters: 2001 # to: locB
12996      *       durations { seconds: 900 }  meters: 1002 # to: locC
12997      *     }
12998      *     rows {  # from: locB
12999      *       durations { seconds: 0 }    meters: 0    # to: locB
13000      *       durations { seconds: 1000 } meters: 1202 # to: locC
13001      *     }
13002      *     rows {  # from: locC
13003      *       durations { seconds: 1001 } meters: 1195 # to: locB
13004      *       durations { seconds: 0 }    meters: 0    # to: locC
13005      *     }
13006      *   }
13007      * }
13008      * ```
13009      * </pre>
13010      *
13011      * <code>
13012      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13013      * </code>
13014      */
setDurationDistanceMatrices( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder builderForValue)13015     public Builder setDurationDistanceMatrices(
13016         int index,
13017         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
13018             builderForValue) {
13019       if (durationDistanceMatricesBuilder_ == null) {
13020         ensureDurationDistanceMatricesIsMutable();
13021         durationDistanceMatrices_.set(index, builderForValue.build());
13022         onChanged();
13023       } else {
13024         durationDistanceMatricesBuilder_.setMessage(index, builderForValue.build());
13025       }
13026       return this;
13027     }
13028     /**
13029      *
13030      *
13031      * <pre>
13032      * Specifies duration and distance matrices used in the model. If this field
13033      * is empty, Google Maps or geodesic distances will be used instead, depending
13034      * on the value of the `use_geodesic_distances` field. If it is not empty,
13035      * `use_geodesic_distances` cannot be true and neither
13036      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13037      * can be empty.
13038      * Usage examples:
13039      * * There are two locations: locA and locB.
13040      * * 1 vehicle starting its route at locA and ending it at locA.
13041      * * 1 pickup visit request at locB.
13042      * ```
13043      * model {
13044      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13045      *   shipments { pickups { tags: "locB" } }
13046      *   duration_distance_matrix_src_tags: "locA"
13047      *   duration_distance_matrix_src_tags: "locB"
13048      *   duration_distance_matrix_dst_tags: "locA"
13049      *   duration_distance_matrix_dst_tags: "locB"
13050      *   duration_distance_matrices {
13051      *     rows {  # from: locA
13052      *       durations { seconds: 0 }   meters: 0    # to: locA
13053      *       durations { seconds: 100 } meters: 1000 # to: locB
13054      *     }
13055      *     rows {  # from: locB
13056      *       durations { seconds: 102 } meters: 990 # to: locA
13057      *       durations { seconds: 0 }   meters: 0   # to: locB
13058      *     }
13059      *   }
13060      * }
13061      * ```
13062      * * There are three locations: locA, locB and locC.
13063      * * 1 vehicle starting its route at locA and ending it at locB, using
13064      *   matrix "fast".
13065      * * 1 vehicle starting its route at locB and ending it at locB, using
13066      *   matrix "slow".
13067      * * 1 vehicle starting its route at locB and ending it at locB, using
13068      *   matrix "fast".
13069      * * 1 pickup visit request at locC.
13070      * ```
13071      * model {
13072      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13073      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13074      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13075      *   shipments { pickups { tags: "locC" } }
13076      *   duration_distance_matrix_src_tags: "locA"
13077      *   duration_distance_matrix_src_tags: "locB"
13078      *   duration_distance_matrix_src_tags: "locC"
13079      *   duration_distance_matrix_dst_tags: "locB"
13080      *   duration_distance_matrix_dst_tags: "locC"
13081      *   duration_distance_matrices {
13082      *     vehicle_start_tag: "fast"
13083      *     rows {  # from: locA
13084      *       durations { seconds: 1000 } meters: 2000 # to: locB
13085      *       durations { seconds: 600 }  meters: 1000 # to: locC
13086      *     }
13087      *     rows {  # from: locB
13088      *       durations { seconds: 0 }   meters: 0    # to: locB
13089      *       durations { seconds: 700 } meters: 1200 # to: locC
13090      *     }
13091      *     rows {  # from: locC
13092      *       durations { seconds: 702 } meters: 1190 # to: locB
13093      *       durations { seconds: 0 }   meters: 0    # to: locC
13094      *     }
13095      *   }
13096      *   duration_distance_matrices {
13097      *     vehicle_start_tag: "slow"
13098      *     rows {  # from: locA
13099      *       durations { seconds: 1800 } meters: 2001 # to: locB
13100      *       durations { seconds: 900 }  meters: 1002 # to: locC
13101      *     }
13102      *     rows {  # from: locB
13103      *       durations { seconds: 0 }    meters: 0    # to: locB
13104      *       durations { seconds: 1000 } meters: 1202 # to: locC
13105      *     }
13106      *     rows {  # from: locC
13107      *       durations { seconds: 1001 } meters: 1195 # to: locB
13108      *       durations { seconds: 0 }    meters: 0    # to: locC
13109      *     }
13110      *   }
13111      * }
13112      * ```
13113      * </pre>
13114      *
13115      * <code>
13116      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13117      * </code>
13118      */
addDurationDistanceMatrices( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value)13119     public Builder addDurationDistanceMatrices(
13120         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value) {
13121       if (durationDistanceMatricesBuilder_ == null) {
13122         if (value == null) {
13123           throw new NullPointerException();
13124         }
13125         ensureDurationDistanceMatricesIsMutable();
13126         durationDistanceMatrices_.add(value);
13127         onChanged();
13128       } else {
13129         durationDistanceMatricesBuilder_.addMessage(value);
13130       }
13131       return this;
13132     }
13133     /**
13134      *
13135      *
13136      * <pre>
13137      * Specifies duration and distance matrices used in the model. If this field
13138      * is empty, Google Maps or geodesic distances will be used instead, depending
13139      * on the value of the `use_geodesic_distances` field. If it is not empty,
13140      * `use_geodesic_distances` cannot be true and neither
13141      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13142      * can be empty.
13143      * Usage examples:
13144      * * There are two locations: locA and locB.
13145      * * 1 vehicle starting its route at locA and ending it at locA.
13146      * * 1 pickup visit request at locB.
13147      * ```
13148      * model {
13149      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13150      *   shipments { pickups { tags: "locB" } }
13151      *   duration_distance_matrix_src_tags: "locA"
13152      *   duration_distance_matrix_src_tags: "locB"
13153      *   duration_distance_matrix_dst_tags: "locA"
13154      *   duration_distance_matrix_dst_tags: "locB"
13155      *   duration_distance_matrices {
13156      *     rows {  # from: locA
13157      *       durations { seconds: 0 }   meters: 0    # to: locA
13158      *       durations { seconds: 100 } meters: 1000 # to: locB
13159      *     }
13160      *     rows {  # from: locB
13161      *       durations { seconds: 102 } meters: 990 # to: locA
13162      *       durations { seconds: 0 }   meters: 0   # to: locB
13163      *     }
13164      *   }
13165      * }
13166      * ```
13167      * * There are three locations: locA, locB and locC.
13168      * * 1 vehicle starting its route at locA and ending it at locB, using
13169      *   matrix "fast".
13170      * * 1 vehicle starting its route at locB and ending it at locB, using
13171      *   matrix "slow".
13172      * * 1 vehicle starting its route at locB and ending it at locB, using
13173      *   matrix "fast".
13174      * * 1 pickup visit request at locC.
13175      * ```
13176      * model {
13177      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13178      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13179      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13180      *   shipments { pickups { tags: "locC" } }
13181      *   duration_distance_matrix_src_tags: "locA"
13182      *   duration_distance_matrix_src_tags: "locB"
13183      *   duration_distance_matrix_src_tags: "locC"
13184      *   duration_distance_matrix_dst_tags: "locB"
13185      *   duration_distance_matrix_dst_tags: "locC"
13186      *   duration_distance_matrices {
13187      *     vehicle_start_tag: "fast"
13188      *     rows {  # from: locA
13189      *       durations { seconds: 1000 } meters: 2000 # to: locB
13190      *       durations { seconds: 600 }  meters: 1000 # to: locC
13191      *     }
13192      *     rows {  # from: locB
13193      *       durations { seconds: 0 }   meters: 0    # to: locB
13194      *       durations { seconds: 700 } meters: 1200 # to: locC
13195      *     }
13196      *     rows {  # from: locC
13197      *       durations { seconds: 702 } meters: 1190 # to: locB
13198      *       durations { seconds: 0 }   meters: 0    # to: locC
13199      *     }
13200      *   }
13201      *   duration_distance_matrices {
13202      *     vehicle_start_tag: "slow"
13203      *     rows {  # from: locA
13204      *       durations { seconds: 1800 } meters: 2001 # to: locB
13205      *       durations { seconds: 900 }  meters: 1002 # to: locC
13206      *     }
13207      *     rows {  # from: locB
13208      *       durations { seconds: 0 }    meters: 0    # to: locB
13209      *       durations { seconds: 1000 } meters: 1202 # to: locC
13210      *     }
13211      *     rows {  # from: locC
13212      *       durations { seconds: 1001 } meters: 1195 # to: locB
13213      *       durations { seconds: 0 }    meters: 0    # to: locC
13214      *     }
13215      *   }
13216      * }
13217      * ```
13218      * </pre>
13219      *
13220      * <code>
13221      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13222      * </code>
13223      */
addDurationDistanceMatrices( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value)13224     public Builder addDurationDistanceMatrices(
13225         int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix value) {
13226       if (durationDistanceMatricesBuilder_ == null) {
13227         if (value == null) {
13228           throw new NullPointerException();
13229         }
13230         ensureDurationDistanceMatricesIsMutable();
13231         durationDistanceMatrices_.add(index, value);
13232         onChanged();
13233       } else {
13234         durationDistanceMatricesBuilder_.addMessage(index, value);
13235       }
13236       return this;
13237     }
13238     /**
13239      *
13240      *
13241      * <pre>
13242      * Specifies duration and distance matrices used in the model. If this field
13243      * is empty, Google Maps or geodesic distances will be used instead, depending
13244      * on the value of the `use_geodesic_distances` field. If it is not empty,
13245      * `use_geodesic_distances` cannot be true and neither
13246      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13247      * can be empty.
13248      * Usage examples:
13249      * * There are two locations: locA and locB.
13250      * * 1 vehicle starting its route at locA and ending it at locA.
13251      * * 1 pickup visit request at locB.
13252      * ```
13253      * model {
13254      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13255      *   shipments { pickups { tags: "locB" } }
13256      *   duration_distance_matrix_src_tags: "locA"
13257      *   duration_distance_matrix_src_tags: "locB"
13258      *   duration_distance_matrix_dst_tags: "locA"
13259      *   duration_distance_matrix_dst_tags: "locB"
13260      *   duration_distance_matrices {
13261      *     rows {  # from: locA
13262      *       durations { seconds: 0 }   meters: 0    # to: locA
13263      *       durations { seconds: 100 } meters: 1000 # to: locB
13264      *     }
13265      *     rows {  # from: locB
13266      *       durations { seconds: 102 } meters: 990 # to: locA
13267      *       durations { seconds: 0 }   meters: 0   # to: locB
13268      *     }
13269      *   }
13270      * }
13271      * ```
13272      * * There are three locations: locA, locB and locC.
13273      * * 1 vehicle starting its route at locA and ending it at locB, using
13274      *   matrix "fast".
13275      * * 1 vehicle starting its route at locB and ending it at locB, using
13276      *   matrix "slow".
13277      * * 1 vehicle starting its route at locB and ending it at locB, using
13278      *   matrix "fast".
13279      * * 1 pickup visit request at locC.
13280      * ```
13281      * model {
13282      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13283      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13284      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13285      *   shipments { pickups { tags: "locC" } }
13286      *   duration_distance_matrix_src_tags: "locA"
13287      *   duration_distance_matrix_src_tags: "locB"
13288      *   duration_distance_matrix_src_tags: "locC"
13289      *   duration_distance_matrix_dst_tags: "locB"
13290      *   duration_distance_matrix_dst_tags: "locC"
13291      *   duration_distance_matrices {
13292      *     vehicle_start_tag: "fast"
13293      *     rows {  # from: locA
13294      *       durations { seconds: 1000 } meters: 2000 # to: locB
13295      *       durations { seconds: 600 }  meters: 1000 # to: locC
13296      *     }
13297      *     rows {  # from: locB
13298      *       durations { seconds: 0 }   meters: 0    # to: locB
13299      *       durations { seconds: 700 } meters: 1200 # to: locC
13300      *     }
13301      *     rows {  # from: locC
13302      *       durations { seconds: 702 } meters: 1190 # to: locB
13303      *       durations { seconds: 0 }   meters: 0    # to: locC
13304      *     }
13305      *   }
13306      *   duration_distance_matrices {
13307      *     vehicle_start_tag: "slow"
13308      *     rows {  # from: locA
13309      *       durations { seconds: 1800 } meters: 2001 # to: locB
13310      *       durations { seconds: 900 }  meters: 1002 # to: locC
13311      *     }
13312      *     rows {  # from: locB
13313      *       durations { seconds: 0 }    meters: 0    # to: locB
13314      *       durations { seconds: 1000 } meters: 1202 # to: locC
13315      *     }
13316      *     rows {  # from: locC
13317      *       durations { seconds: 1001 } meters: 1195 # to: locB
13318      *       durations { seconds: 0 }    meters: 0    # to: locC
13319      *     }
13320      *   }
13321      * }
13322      * ```
13323      * </pre>
13324      *
13325      * <code>
13326      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13327      * </code>
13328      */
addDurationDistanceMatrices( com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder builderForValue)13329     public Builder addDurationDistanceMatrices(
13330         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
13331             builderForValue) {
13332       if (durationDistanceMatricesBuilder_ == null) {
13333         ensureDurationDistanceMatricesIsMutable();
13334         durationDistanceMatrices_.add(builderForValue.build());
13335         onChanged();
13336       } else {
13337         durationDistanceMatricesBuilder_.addMessage(builderForValue.build());
13338       }
13339       return this;
13340     }
13341     /**
13342      *
13343      *
13344      * <pre>
13345      * Specifies duration and distance matrices used in the model. If this field
13346      * is empty, Google Maps or geodesic distances will be used instead, depending
13347      * on the value of the `use_geodesic_distances` field. If it is not empty,
13348      * `use_geodesic_distances` cannot be true and neither
13349      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13350      * can be empty.
13351      * Usage examples:
13352      * * There are two locations: locA and locB.
13353      * * 1 vehicle starting its route at locA and ending it at locA.
13354      * * 1 pickup visit request at locB.
13355      * ```
13356      * model {
13357      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13358      *   shipments { pickups { tags: "locB" } }
13359      *   duration_distance_matrix_src_tags: "locA"
13360      *   duration_distance_matrix_src_tags: "locB"
13361      *   duration_distance_matrix_dst_tags: "locA"
13362      *   duration_distance_matrix_dst_tags: "locB"
13363      *   duration_distance_matrices {
13364      *     rows {  # from: locA
13365      *       durations { seconds: 0 }   meters: 0    # to: locA
13366      *       durations { seconds: 100 } meters: 1000 # to: locB
13367      *     }
13368      *     rows {  # from: locB
13369      *       durations { seconds: 102 } meters: 990 # to: locA
13370      *       durations { seconds: 0 }   meters: 0   # to: locB
13371      *     }
13372      *   }
13373      * }
13374      * ```
13375      * * There are three locations: locA, locB and locC.
13376      * * 1 vehicle starting its route at locA and ending it at locB, using
13377      *   matrix "fast".
13378      * * 1 vehicle starting its route at locB and ending it at locB, using
13379      *   matrix "slow".
13380      * * 1 vehicle starting its route at locB and ending it at locB, using
13381      *   matrix "fast".
13382      * * 1 pickup visit request at locC.
13383      * ```
13384      * model {
13385      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13386      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13387      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13388      *   shipments { pickups { tags: "locC" } }
13389      *   duration_distance_matrix_src_tags: "locA"
13390      *   duration_distance_matrix_src_tags: "locB"
13391      *   duration_distance_matrix_src_tags: "locC"
13392      *   duration_distance_matrix_dst_tags: "locB"
13393      *   duration_distance_matrix_dst_tags: "locC"
13394      *   duration_distance_matrices {
13395      *     vehicle_start_tag: "fast"
13396      *     rows {  # from: locA
13397      *       durations { seconds: 1000 } meters: 2000 # to: locB
13398      *       durations { seconds: 600 }  meters: 1000 # to: locC
13399      *     }
13400      *     rows {  # from: locB
13401      *       durations { seconds: 0 }   meters: 0    # to: locB
13402      *       durations { seconds: 700 } meters: 1200 # to: locC
13403      *     }
13404      *     rows {  # from: locC
13405      *       durations { seconds: 702 } meters: 1190 # to: locB
13406      *       durations { seconds: 0 }   meters: 0    # to: locC
13407      *     }
13408      *   }
13409      *   duration_distance_matrices {
13410      *     vehicle_start_tag: "slow"
13411      *     rows {  # from: locA
13412      *       durations { seconds: 1800 } meters: 2001 # to: locB
13413      *       durations { seconds: 900 }  meters: 1002 # to: locC
13414      *     }
13415      *     rows {  # from: locB
13416      *       durations { seconds: 0 }    meters: 0    # to: locB
13417      *       durations { seconds: 1000 } meters: 1202 # to: locC
13418      *     }
13419      *     rows {  # from: locC
13420      *       durations { seconds: 1001 } meters: 1195 # to: locB
13421      *       durations { seconds: 0 }    meters: 0    # to: locC
13422      *     }
13423      *   }
13424      * }
13425      * ```
13426      * </pre>
13427      *
13428      * <code>
13429      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13430      * </code>
13431      */
addDurationDistanceMatrices( int index, com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder builderForValue)13432     public Builder addDurationDistanceMatrices(
13433         int index,
13434         com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
13435             builderForValue) {
13436       if (durationDistanceMatricesBuilder_ == null) {
13437         ensureDurationDistanceMatricesIsMutable();
13438         durationDistanceMatrices_.add(index, builderForValue.build());
13439         onChanged();
13440       } else {
13441         durationDistanceMatricesBuilder_.addMessage(index, builderForValue.build());
13442       }
13443       return this;
13444     }
13445     /**
13446      *
13447      *
13448      * <pre>
13449      * Specifies duration and distance matrices used in the model. If this field
13450      * is empty, Google Maps or geodesic distances will be used instead, depending
13451      * on the value of the `use_geodesic_distances` field. If it is not empty,
13452      * `use_geodesic_distances` cannot be true and neither
13453      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13454      * can be empty.
13455      * Usage examples:
13456      * * There are two locations: locA and locB.
13457      * * 1 vehicle starting its route at locA and ending it at locA.
13458      * * 1 pickup visit request at locB.
13459      * ```
13460      * model {
13461      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13462      *   shipments { pickups { tags: "locB" } }
13463      *   duration_distance_matrix_src_tags: "locA"
13464      *   duration_distance_matrix_src_tags: "locB"
13465      *   duration_distance_matrix_dst_tags: "locA"
13466      *   duration_distance_matrix_dst_tags: "locB"
13467      *   duration_distance_matrices {
13468      *     rows {  # from: locA
13469      *       durations { seconds: 0 }   meters: 0    # to: locA
13470      *       durations { seconds: 100 } meters: 1000 # to: locB
13471      *     }
13472      *     rows {  # from: locB
13473      *       durations { seconds: 102 } meters: 990 # to: locA
13474      *       durations { seconds: 0 }   meters: 0   # to: locB
13475      *     }
13476      *   }
13477      * }
13478      * ```
13479      * * There are three locations: locA, locB and locC.
13480      * * 1 vehicle starting its route at locA and ending it at locB, using
13481      *   matrix "fast".
13482      * * 1 vehicle starting its route at locB and ending it at locB, using
13483      *   matrix "slow".
13484      * * 1 vehicle starting its route at locB and ending it at locB, using
13485      *   matrix "fast".
13486      * * 1 pickup visit request at locC.
13487      * ```
13488      * model {
13489      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13490      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13491      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13492      *   shipments { pickups { tags: "locC" } }
13493      *   duration_distance_matrix_src_tags: "locA"
13494      *   duration_distance_matrix_src_tags: "locB"
13495      *   duration_distance_matrix_src_tags: "locC"
13496      *   duration_distance_matrix_dst_tags: "locB"
13497      *   duration_distance_matrix_dst_tags: "locC"
13498      *   duration_distance_matrices {
13499      *     vehicle_start_tag: "fast"
13500      *     rows {  # from: locA
13501      *       durations { seconds: 1000 } meters: 2000 # to: locB
13502      *       durations { seconds: 600 }  meters: 1000 # to: locC
13503      *     }
13504      *     rows {  # from: locB
13505      *       durations { seconds: 0 }   meters: 0    # to: locB
13506      *       durations { seconds: 700 } meters: 1200 # to: locC
13507      *     }
13508      *     rows {  # from: locC
13509      *       durations { seconds: 702 } meters: 1190 # to: locB
13510      *       durations { seconds: 0 }   meters: 0    # to: locC
13511      *     }
13512      *   }
13513      *   duration_distance_matrices {
13514      *     vehicle_start_tag: "slow"
13515      *     rows {  # from: locA
13516      *       durations { seconds: 1800 } meters: 2001 # to: locB
13517      *       durations { seconds: 900 }  meters: 1002 # to: locC
13518      *     }
13519      *     rows {  # from: locB
13520      *       durations { seconds: 0 }    meters: 0    # to: locB
13521      *       durations { seconds: 1000 } meters: 1202 # to: locC
13522      *     }
13523      *     rows {  # from: locC
13524      *       durations { seconds: 1001 } meters: 1195 # to: locB
13525      *       durations { seconds: 0 }    meters: 0    # to: locC
13526      *     }
13527      *   }
13528      * }
13529      * ```
13530      * </pre>
13531      *
13532      * <code>
13533      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13534      * </code>
13535      */
addAllDurationDistanceMatrices( java.lang.Iterable< ? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix> values)13536     public Builder addAllDurationDistanceMatrices(
13537         java.lang.Iterable<
13538                 ? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix>
13539             values) {
13540       if (durationDistanceMatricesBuilder_ == null) {
13541         ensureDurationDistanceMatricesIsMutable();
13542         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, durationDistanceMatrices_);
13543         onChanged();
13544       } else {
13545         durationDistanceMatricesBuilder_.addAllMessages(values);
13546       }
13547       return this;
13548     }
13549     /**
13550      *
13551      *
13552      * <pre>
13553      * Specifies duration and distance matrices used in the model. If this field
13554      * is empty, Google Maps or geodesic distances will be used instead, depending
13555      * on the value of the `use_geodesic_distances` field. If it is not empty,
13556      * `use_geodesic_distances` cannot be true and neither
13557      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13558      * can be empty.
13559      * Usage examples:
13560      * * There are two locations: locA and locB.
13561      * * 1 vehicle starting its route at locA and ending it at locA.
13562      * * 1 pickup visit request at locB.
13563      * ```
13564      * model {
13565      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13566      *   shipments { pickups { tags: "locB" } }
13567      *   duration_distance_matrix_src_tags: "locA"
13568      *   duration_distance_matrix_src_tags: "locB"
13569      *   duration_distance_matrix_dst_tags: "locA"
13570      *   duration_distance_matrix_dst_tags: "locB"
13571      *   duration_distance_matrices {
13572      *     rows {  # from: locA
13573      *       durations { seconds: 0 }   meters: 0    # to: locA
13574      *       durations { seconds: 100 } meters: 1000 # to: locB
13575      *     }
13576      *     rows {  # from: locB
13577      *       durations { seconds: 102 } meters: 990 # to: locA
13578      *       durations { seconds: 0 }   meters: 0   # to: locB
13579      *     }
13580      *   }
13581      * }
13582      * ```
13583      * * There are three locations: locA, locB and locC.
13584      * * 1 vehicle starting its route at locA and ending it at locB, using
13585      *   matrix "fast".
13586      * * 1 vehicle starting its route at locB and ending it at locB, using
13587      *   matrix "slow".
13588      * * 1 vehicle starting its route at locB and ending it at locB, using
13589      *   matrix "fast".
13590      * * 1 pickup visit request at locC.
13591      * ```
13592      * model {
13593      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13594      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13595      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13596      *   shipments { pickups { tags: "locC" } }
13597      *   duration_distance_matrix_src_tags: "locA"
13598      *   duration_distance_matrix_src_tags: "locB"
13599      *   duration_distance_matrix_src_tags: "locC"
13600      *   duration_distance_matrix_dst_tags: "locB"
13601      *   duration_distance_matrix_dst_tags: "locC"
13602      *   duration_distance_matrices {
13603      *     vehicle_start_tag: "fast"
13604      *     rows {  # from: locA
13605      *       durations { seconds: 1000 } meters: 2000 # to: locB
13606      *       durations { seconds: 600 }  meters: 1000 # to: locC
13607      *     }
13608      *     rows {  # from: locB
13609      *       durations { seconds: 0 }   meters: 0    # to: locB
13610      *       durations { seconds: 700 } meters: 1200 # to: locC
13611      *     }
13612      *     rows {  # from: locC
13613      *       durations { seconds: 702 } meters: 1190 # to: locB
13614      *       durations { seconds: 0 }   meters: 0    # to: locC
13615      *     }
13616      *   }
13617      *   duration_distance_matrices {
13618      *     vehicle_start_tag: "slow"
13619      *     rows {  # from: locA
13620      *       durations { seconds: 1800 } meters: 2001 # to: locB
13621      *       durations { seconds: 900 }  meters: 1002 # to: locC
13622      *     }
13623      *     rows {  # from: locB
13624      *       durations { seconds: 0 }    meters: 0    # to: locB
13625      *       durations { seconds: 1000 } meters: 1202 # to: locC
13626      *     }
13627      *     rows {  # from: locC
13628      *       durations { seconds: 1001 } meters: 1195 # to: locB
13629      *       durations { seconds: 0 }    meters: 0    # to: locC
13630      *     }
13631      *   }
13632      * }
13633      * ```
13634      * </pre>
13635      *
13636      * <code>
13637      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13638      * </code>
13639      */
clearDurationDistanceMatrices()13640     public Builder clearDurationDistanceMatrices() {
13641       if (durationDistanceMatricesBuilder_ == null) {
13642         durationDistanceMatrices_ = java.util.Collections.emptyList();
13643         bitField0_ = (bitField0_ & ~0x00000040);
13644         onChanged();
13645       } else {
13646         durationDistanceMatricesBuilder_.clear();
13647       }
13648       return this;
13649     }
13650     /**
13651      *
13652      *
13653      * <pre>
13654      * Specifies duration and distance matrices used in the model. If this field
13655      * is empty, Google Maps or geodesic distances will be used instead, depending
13656      * on the value of the `use_geodesic_distances` field. If it is not empty,
13657      * `use_geodesic_distances` cannot be true and neither
13658      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13659      * can be empty.
13660      * Usage examples:
13661      * * There are two locations: locA and locB.
13662      * * 1 vehicle starting its route at locA and ending it at locA.
13663      * * 1 pickup visit request at locB.
13664      * ```
13665      * model {
13666      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13667      *   shipments { pickups { tags: "locB" } }
13668      *   duration_distance_matrix_src_tags: "locA"
13669      *   duration_distance_matrix_src_tags: "locB"
13670      *   duration_distance_matrix_dst_tags: "locA"
13671      *   duration_distance_matrix_dst_tags: "locB"
13672      *   duration_distance_matrices {
13673      *     rows {  # from: locA
13674      *       durations { seconds: 0 }   meters: 0    # to: locA
13675      *       durations { seconds: 100 } meters: 1000 # to: locB
13676      *     }
13677      *     rows {  # from: locB
13678      *       durations { seconds: 102 } meters: 990 # to: locA
13679      *       durations { seconds: 0 }   meters: 0   # to: locB
13680      *     }
13681      *   }
13682      * }
13683      * ```
13684      * * There are three locations: locA, locB and locC.
13685      * * 1 vehicle starting its route at locA and ending it at locB, using
13686      *   matrix "fast".
13687      * * 1 vehicle starting its route at locB and ending it at locB, using
13688      *   matrix "slow".
13689      * * 1 vehicle starting its route at locB and ending it at locB, using
13690      *   matrix "fast".
13691      * * 1 pickup visit request at locC.
13692      * ```
13693      * model {
13694      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13695      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13696      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13697      *   shipments { pickups { tags: "locC" } }
13698      *   duration_distance_matrix_src_tags: "locA"
13699      *   duration_distance_matrix_src_tags: "locB"
13700      *   duration_distance_matrix_src_tags: "locC"
13701      *   duration_distance_matrix_dst_tags: "locB"
13702      *   duration_distance_matrix_dst_tags: "locC"
13703      *   duration_distance_matrices {
13704      *     vehicle_start_tag: "fast"
13705      *     rows {  # from: locA
13706      *       durations { seconds: 1000 } meters: 2000 # to: locB
13707      *       durations { seconds: 600 }  meters: 1000 # to: locC
13708      *     }
13709      *     rows {  # from: locB
13710      *       durations { seconds: 0 }   meters: 0    # to: locB
13711      *       durations { seconds: 700 } meters: 1200 # to: locC
13712      *     }
13713      *     rows {  # from: locC
13714      *       durations { seconds: 702 } meters: 1190 # to: locB
13715      *       durations { seconds: 0 }   meters: 0    # to: locC
13716      *     }
13717      *   }
13718      *   duration_distance_matrices {
13719      *     vehicle_start_tag: "slow"
13720      *     rows {  # from: locA
13721      *       durations { seconds: 1800 } meters: 2001 # to: locB
13722      *       durations { seconds: 900 }  meters: 1002 # to: locC
13723      *     }
13724      *     rows {  # from: locB
13725      *       durations { seconds: 0 }    meters: 0    # to: locB
13726      *       durations { seconds: 1000 } meters: 1202 # to: locC
13727      *     }
13728      *     rows {  # from: locC
13729      *       durations { seconds: 1001 } meters: 1195 # to: locB
13730      *       durations { seconds: 0 }    meters: 0    # to: locC
13731      *     }
13732      *   }
13733      * }
13734      * ```
13735      * </pre>
13736      *
13737      * <code>
13738      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13739      * </code>
13740      */
removeDurationDistanceMatrices(int index)13741     public Builder removeDurationDistanceMatrices(int index) {
13742       if (durationDistanceMatricesBuilder_ == null) {
13743         ensureDurationDistanceMatricesIsMutable();
13744         durationDistanceMatrices_.remove(index);
13745         onChanged();
13746       } else {
13747         durationDistanceMatricesBuilder_.remove(index);
13748       }
13749       return this;
13750     }
13751     /**
13752      *
13753      *
13754      * <pre>
13755      * Specifies duration and distance matrices used in the model. If this field
13756      * is empty, Google Maps or geodesic distances will be used instead, depending
13757      * on the value of the `use_geodesic_distances` field. If it is not empty,
13758      * `use_geodesic_distances` cannot be true and neither
13759      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13760      * can be empty.
13761      * Usage examples:
13762      * * There are two locations: locA and locB.
13763      * * 1 vehicle starting its route at locA and ending it at locA.
13764      * * 1 pickup visit request at locB.
13765      * ```
13766      * model {
13767      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13768      *   shipments { pickups { tags: "locB" } }
13769      *   duration_distance_matrix_src_tags: "locA"
13770      *   duration_distance_matrix_src_tags: "locB"
13771      *   duration_distance_matrix_dst_tags: "locA"
13772      *   duration_distance_matrix_dst_tags: "locB"
13773      *   duration_distance_matrices {
13774      *     rows {  # from: locA
13775      *       durations { seconds: 0 }   meters: 0    # to: locA
13776      *       durations { seconds: 100 } meters: 1000 # to: locB
13777      *     }
13778      *     rows {  # from: locB
13779      *       durations { seconds: 102 } meters: 990 # to: locA
13780      *       durations { seconds: 0 }   meters: 0   # to: locB
13781      *     }
13782      *   }
13783      * }
13784      * ```
13785      * * There are three locations: locA, locB and locC.
13786      * * 1 vehicle starting its route at locA and ending it at locB, using
13787      *   matrix "fast".
13788      * * 1 vehicle starting its route at locB and ending it at locB, using
13789      *   matrix "slow".
13790      * * 1 vehicle starting its route at locB and ending it at locB, using
13791      *   matrix "fast".
13792      * * 1 pickup visit request at locC.
13793      * ```
13794      * model {
13795      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13796      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13797      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13798      *   shipments { pickups { tags: "locC" } }
13799      *   duration_distance_matrix_src_tags: "locA"
13800      *   duration_distance_matrix_src_tags: "locB"
13801      *   duration_distance_matrix_src_tags: "locC"
13802      *   duration_distance_matrix_dst_tags: "locB"
13803      *   duration_distance_matrix_dst_tags: "locC"
13804      *   duration_distance_matrices {
13805      *     vehicle_start_tag: "fast"
13806      *     rows {  # from: locA
13807      *       durations { seconds: 1000 } meters: 2000 # to: locB
13808      *       durations { seconds: 600 }  meters: 1000 # to: locC
13809      *     }
13810      *     rows {  # from: locB
13811      *       durations { seconds: 0 }   meters: 0    # to: locB
13812      *       durations { seconds: 700 } meters: 1200 # to: locC
13813      *     }
13814      *     rows {  # from: locC
13815      *       durations { seconds: 702 } meters: 1190 # to: locB
13816      *       durations { seconds: 0 }   meters: 0    # to: locC
13817      *     }
13818      *   }
13819      *   duration_distance_matrices {
13820      *     vehicle_start_tag: "slow"
13821      *     rows {  # from: locA
13822      *       durations { seconds: 1800 } meters: 2001 # to: locB
13823      *       durations { seconds: 900 }  meters: 1002 # to: locC
13824      *     }
13825      *     rows {  # from: locB
13826      *       durations { seconds: 0 }    meters: 0    # to: locB
13827      *       durations { seconds: 1000 } meters: 1202 # to: locC
13828      *     }
13829      *     rows {  # from: locC
13830      *       durations { seconds: 1001 } meters: 1195 # to: locB
13831      *       durations { seconds: 0 }    meters: 0    # to: locC
13832      *     }
13833      *   }
13834      * }
13835      * ```
13836      * </pre>
13837      *
13838      * <code>
13839      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13840      * </code>
13841      */
13842     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
getDurationDistanceMatricesBuilder(int index)13843         getDurationDistanceMatricesBuilder(int index) {
13844       return getDurationDistanceMatricesFieldBuilder().getBuilder(index);
13845     }
13846     /**
13847      *
13848      *
13849      * <pre>
13850      * Specifies duration and distance matrices used in the model. If this field
13851      * is empty, Google Maps or geodesic distances will be used instead, depending
13852      * on the value of the `use_geodesic_distances` field. If it is not empty,
13853      * `use_geodesic_distances` cannot be true and neither
13854      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13855      * can be empty.
13856      * Usage examples:
13857      * * There are two locations: locA and locB.
13858      * * 1 vehicle starting its route at locA and ending it at locA.
13859      * * 1 pickup visit request at locB.
13860      * ```
13861      * model {
13862      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13863      *   shipments { pickups { tags: "locB" } }
13864      *   duration_distance_matrix_src_tags: "locA"
13865      *   duration_distance_matrix_src_tags: "locB"
13866      *   duration_distance_matrix_dst_tags: "locA"
13867      *   duration_distance_matrix_dst_tags: "locB"
13868      *   duration_distance_matrices {
13869      *     rows {  # from: locA
13870      *       durations { seconds: 0 }   meters: 0    # to: locA
13871      *       durations { seconds: 100 } meters: 1000 # to: locB
13872      *     }
13873      *     rows {  # from: locB
13874      *       durations { seconds: 102 } meters: 990 # to: locA
13875      *       durations { seconds: 0 }   meters: 0   # to: locB
13876      *     }
13877      *   }
13878      * }
13879      * ```
13880      * * There are three locations: locA, locB and locC.
13881      * * 1 vehicle starting its route at locA and ending it at locB, using
13882      *   matrix "fast".
13883      * * 1 vehicle starting its route at locB and ending it at locB, using
13884      *   matrix "slow".
13885      * * 1 vehicle starting its route at locB and ending it at locB, using
13886      *   matrix "fast".
13887      * * 1 pickup visit request at locC.
13888      * ```
13889      * model {
13890      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13891      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13892      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13893      *   shipments { pickups { tags: "locC" } }
13894      *   duration_distance_matrix_src_tags: "locA"
13895      *   duration_distance_matrix_src_tags: "locB"
13896      *   duration_distance_matrix_src_tags: "locC"
13897      *   duration_distance_matrix_dst_tags: "locB"
13898      *   duration_distance_matrix_dst_tags: "locC"
13899      *   duration_distance_matrices {
13900      *     vehicle_start_tag: "fast"
13901      *     rows {  # from: locA
13902      *       durations { seconds: 1000 } meters: 2000 # to: locB
13903      *       durations { seconds: 600 }  meters: 1000 # to: locC
13904      *     }
13905      *     rows {  # from: locB
13906      *       durations { seconds: 0 }   meters: 0    # to: locB
13907      *       durations { seconds: 700 } meters: 1200 # to: locC
13908      *     }
13909      *     rows {  # from: locC
13910      *       durations { seconds: 702 } meters: 1190 # to: locB
13911      *       durations { seconds: 0 }   meters: 0    # to: locC
13912      *     }
13913      *   }
13914      *   duration_distance_matrices {
13915      *     vehicle_start_tag: "slow"
13916      *     rows {  # from: locA
13917      *       durations { seconds: 1800 } meters: 2001 # to: locB
13918      *       durations { seconds: 900 }  meters: 1002 # to: locC
13919      *     }
13920      *     rows {  # from: locB
13921      *       durations { seconds: 0 }    meters: 0    # to: locB
13922      *       durations { seconds: 1000 } meters: 1202 # to: locC
13923      *     }
13924      *     rows {  # from: locC
13925      *       durations { seconds: 1001 } meters: 1195 # to: locB
13926      *       durations { seconds: 0 }    meters: 0    # to: locC
13927      *     }
13928      *   }
13929      * }
13930      * ```
13931      * </pre>
13932      *
13933      * <code>
13934      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
13935      * </code>
13936      */
13937     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder
getDurationDistanceMatricesOrBuilder(int index)13938         getDurationDistanceMatricesOrBuilder(int index) {
13939       if (durationDistanceMatricesBuilder_ == null) {
13940         return durationDistanceMatrices_.get(index);
13941       } else {
13942         return durationDistanceMatricesBuilder_.getMessageOrBuilder(index);
13943       }
13944     }
13945     /**
13946      *
13947      *
13948      * <pre>
13949      * Specifies duration and distance matrices used in the model. If this field
13950      * is empty, Google Maps or geodesic distances will be used instead, depending
13951      * on the value of the `use_geodesic_distances` field. If it is not empty,
13952      * `use_geodesic_distances` cannot be true and neither
13953      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
13954      * can be empty.
13955      * Usage examples:
13956      * * There are two locations: locA and locB.
13957      * * 1 vehicle starting its route at locA and ending it at locA.
13958      * * 1 pickup visit request at locB.
13959      * ```
13960      * model {
13961      *   vehicles { start_tags: "locA"  end_tags: "locA" }
13962      *   shipments { pickups { tags: "locB" } }
13963      *   duration_distance_matrix_src_tags: "locA"
13964      *   duration_distance_matrix_src_tags: "locB"
13965      *   duration_distance_matrix_dst_tags: "locA"
13966      *   duration_distance_matrix_dst_tags: "locB"
13967      *   duration_distance_matrices {
13968      *     rows {  # from: locA
13969      *       durations { seconds: 0 }   meters: 0    # to: locA
13970      *       durations { seconds: 100 } meters: 1000 # to: locB
13971      *     }
13972      *     rows {  # from: locB
13973      *       durations { seconds: 102 } meters: 990 # to: locA
13974      *       durations { seconds: 0 }   meters: 0   # to: locB
13975      *     }
13976      *   }
13977      * }
13978      * ```
13979      * * There are three locations: locA, locB and locC.
13980      * * 1 vehicle starting its route at locA and ending it at locB, using
13981      *   matrix "fast".
13982      * * 1 vehicle starting its route at locB and ending it at locB, using
13983      *   matrix "slow".
13984      * * 1 vehicle starting its route at locB and ending it at locB, using
13985      *   matrix "fast".
13986      * * 1 pickup visit request at locC.
13987      * ```
13988      * model {
13989      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
13990      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
13991      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
13992      *   shipments { pickups { tags: "locC" } }
13993      *   duration_distance_matrix_src_tags: "locA"
13994      *   duration_distance_matrix_src_tags: "locB"
13995      *   duration_distance_matrix_src_tags: "locC"
13996      *   duration_distance_matrix_dst_tags: "locB"
13997      *   duration_distance_matrix_dst_tags: "locC"
13998      *   duration_distance_matrices {
13999      *     vehicle_start_tag: "fast"
14000      *     rows {  # from: locA
14001      *       durations { seconds: 1000 } meters: 2000 # to: locB
14002      *       durations { seconds: 600 }  meters: 1000 # to: locC
14003      *     }
14004      *     rows {  # from: locB
14005      *       durations { seconds: 0 }   meters: 0    # to: locB
14006      *       durations { seconds: 700 } meters: 1200 # to: locC
14007      *     }
14008      *     rows {  # from: locC
14009      *       durations { seconds: 702 } meters: 1190 # to: locB
14010      *       durations { seconds: 0 }   meters: 0    # to: locC
14011      *     }
14012      *   }
14013      *   duration_distance_matrices {
14014      *     vehicle_start_tag: "slow"
14015      *     rows {  # from: locA
14016      *       durations { seconds: 1800 } meters: 2001 # to: locB
14017      *       durations { seconds: 900 }  meters: 1002 # to: locC
14018      *     }
14019      *     rows {  # from: locB
14020      *       durations { seconds: 0 }    meters: 0    # to: locB
14021      *       durations { seconds: 1000 } meters: 1202 # to: locC
14022      *     }
14023      *     rows {  # from: locC
14024      *       durations { seconds: 1001 } meters: 1195 # to: locB
14025      *       durations { seconds: 0 }    meters: 0    # to: locC
14026      *     }
14027      *   }
14028      * }
14029      * ```
14030      * </pre>
14031      *
14032      * <code>
14033      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
14034      * </code>
14035      */
14036     public java.util.List<
14037             ? extends
14038                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>
getDurationDistanceMatricesOrBuilderList()14039         getDurationDistanceMatricesOrBuilderList() {
14040       if (durationDistanceMatricesBuilder_ != null) {
14041         return durationDistanceMatricesBuilder_.getMessageOrBuilderList();
14042       } else {
14043         return java.util.Collections.unmodifiableList(durationDistanceMatrices_);
14044       }
14045     }
14046     /**
14047      *
14048      *
14049      * <pre>
14050      * Specifies duration and distance matrices used in the model. If this field
14051      * is empty, Google Maps or geodesic distances will be used instead, depending
14052      * on the value of the `use_geodesic_distances` field. If it is not empty,
14053      * `use_geodesic_distances` cannot be true and neither
14054      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
14055      * can be empty.
14056      * Usage examples:
14057      * * There are two locations: locA and locB.
14058      * * 1 vehicle starting its route at locA and ending it at locA.
14059      * * 1 pickup visit request at locB.
14060      * ```
14061      * model {
14062      *   vehicles { start_tags: "locA"  end_tags: "locA" }
14063      *   shipments { pickups { tags: "locB" } }
14064      *   duration_distance_matrix_src_tags: "locA"
14065      *   duration_distance_matrix_src_tags: "locB"
14066      *   duration_distance_matrix_dst_tags: "locA"
14067      *   duration_distance_matrix_dst_tags: "locB"
14068      *   duration_distance_matrices {
14069      *     rows {  # from: locA
14070      *       durations { seconds: 0 }   meters: 0    # to: locA
14071      *       durations { seconds: 100 } meters: 1000 # to: locB
14072      *     }
14073      *     rows {  # from: locB
14074      *       durations { seconds: 102 } meters: 990 # to: locA
14075      *       durations { seconds: 0 }   meters: 0   # to: locB
14076      *     }
14077      *   }
14078      * }
14079      * ```
14080      * * There are three locations: locA, locB and locC.
14081      * * 1 vehicle starting its route at locA and ending it at locB, using
14082      *   matrix "fast".
14083      * * 1 vehicle starting its route at locB and ending it at locB, using
14084      *   matrix "slow".
14085      * * 1 vehicle starting its route at locB and ending it at locB, using
14086      *   matrix "fast".
14087      * * 1 pickup visit request at locC.
14088      * ```
14089      * model {
14090      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
14091      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
14092      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
14093      *   shipments { pickups { tags: "locC" } }
14094      *   duration_distance_matrix_src_tags: "locA"
14095      *   duration_distance_matrix_src_tags: "locB"
14096      *   duration_distance_matrix_src_tags: "locC"
14097      *   duration_distance_matrix_dst_tags: "locB"
14098      *   duration_distance_matrix_dst_tags: "locC"
14099      *   duration_distance_matrices {
14100      *     vehicle_start_tag: "fast"
14101      *     rows {  # from: locA
14102      *       durations { seconds: 1000 } meters: 2000 # to: locB
14103      *       durations { seconds: 600 }  meters: 1000 # to: locC
14104      *     }
14105      *     rows {  # from: locB
14106      *       durations { seconds: 0 }   meters: 0    # to: locB
14107      *       durations { seconds: 700 } meters: 1200 # to: locC
14108      *     }
14109      *     rows {  # from: locC
14110      *       durations { seconds: 702 } meters: 1190 # to: locB
14111      *       durations { seconds: 0 }   meters: 0    # to: locC
14112      *     }
14113      *   }
14114      *   duration_distance_matrices {
14115      *     vehicle_start_tag: "slow"
14116      *     rows {  # from: locA
14117      *       durations { seconds: 1800 } meters: 2001 # to: locB
14118      *       durations { seconds: 900 }  meters: 1002 # to: locC
14119      *     }
14120      *     rows {  # from: locB
14121      *       durations { seconds: 0 }    meters: 0    # to: locB
14122      *       durations { seconds: 1000 } meters: 1202 # to: locC
14123      *     }
14124      *     rows {  # from: locC
14125      *       durations { seconds: 1001 } meters: 1195 # to: locB
14126      *       durations { seconds: 0 }    meters: 0    # to: locC
14127      *     }
14128      *   }
14129      * }
14130      * ```
14131      * </pre>
14132      *
14133      * <code>
14134      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
14135      * </code>
14136      */
14137     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
addDurationDistanceMatricesBuilder()14138         addDurationDistanceMatricesBuilder() {
14139       return getDurationDistanceMatricesFieldBuilder()
14140           .addBuilder(
14141               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
14142                   .getDefaultInstance());
14143     }
14144     /**
14145      *
14146      *
14147      * <pre>
14148      * Specifies duration and distance matrices used in the model. If this field
14149      * is empty, Google Maps or geodesic distances will be used instead, depending
14150      * on the value of the `use_geodesic_distances` field. If it is not empty,
14151      * `use_geodesic_distances` cannot be true and neither
14152      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
14153      * can be empty.
14154      * Usage examples:
14155      * * There are two locations: locA and locB.
14156      * * 1 vehicle starting its route at locA and ending it at locA.
14157      * * 1 pickup visit request at locB.
14158      * ```
14159      * model {
14160      *   vehicles { start_tags: "locA"  end_tags: "locA" }
14161      *   shipments { pickups { tags: "locB" } }
14162      *   duration_distance_matrix_src_tags: "locA"
14163      *   duration_distance_matrix_src_tags: "locB"
14164      *   duration_distance_matrix_dst_tags: "locA"
14165      *   duration_distance_matrix_dst_tags: "locB"
14166      *   duration_distance_matrices {
14167      *     rows {  # from: locA
14168      *       durations { seconds: 0 }   meters: 0    # to: locA
14169      *       durations { seconds: 100 } meters: 1000 # to: locB
14170      *     }
14171      *     rows {  # from: locB
14172      *       durations { seconds: 102 } meters: 990 # to: locA
14173      *       durations { seconds: 0 }   meters: 0   # to: locB
14174      *     }
14175      *   }
14176      * }
14177      * ```
14178      * * There are three locations: locA, locB and locC.
14179      * * 1 vehicle starting its route at locA and ending it at locB, using
14180      *   matrix "fast".
14181      * * 1 vehicle starting its route at locB and ending it at locB, using
14182      *   matrix "slow".
14183      * * 1 vehicle starting its route at locB and ending it at locB, using
14184      *   matrix "fast".
14185      * * 1 pickup visit request at locC.
14186      * ```
14187      * model {
14188      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
14189      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
14190      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
14191      *   shipments { pickups { tags: "locC" } }
14192      *   duration_distance_matrix_src_tags: "locA"
14193      *   duration_distance_matrix_src_tags: "locB"
14194      *   duration_distance_matrix_src_tags: "locC"
14195      *   duration_distance_matrix_dst_tags: "locB"
14196      *   duration_distance_matrix_dst_tags: "locC"
14197      *   duration_distance_matrices {
14198      *     vehicle_start_tag: "fast"
14199      *     rows {  # from: locA
14200      *       durations { seconds: 1000 } meters: 2000 # to: locB
14201      *       durations { seconds: 600 }  meters: 1000 # to: locC
14202      *     }
14203      *     rows {  # from: locB
14204      *       durations { seconds: 0 }   meters: 0    # to: locB
14205      *       durations { seconds: 700 } meters: 1200 # to: locC
14206      *     }
14207      *     rows {  # from: locC
14208      *       durations { seconds: 702 } meters: 1190 # to: locB
14209      *       durations { seconds: 0 }   meters: 0    # to: locC
14210      *     }
14211      *   }
14212      *   duration_distance_matrices {
14213      *     vehicle_start_tag: "slow"
14214      *     rows {  # from: locA
14215      *       durations { seconds: 1800 } meters: 2001 # to: locB
14216      *       durations { seconds: 900 }  meters: 1002 # to: locC
14217      *     }
14218      *     rows {  # from: locB
14219      *       durations { seconds: 0 }    meters: 0    # to: locB
14220      *       durations { seconds: 1000 } meters: 1202 # to: locC
14221      *     }
14222      *     rows {  # from: locC
14223      *       durations { seconds: 1001 } meters: 1195 # to: locB
14224      *       durations { seconds: 0 }    meters: 0    # to: locC
14225      *     }
14226      *   }
14227      * }
14228      * ```
14229      * </pre>
14230      *
14231      * <code>
14232      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
14233      * </code>
14234      */
14235     public com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder
addDurationDistanceMatricesBuilder(int index)14236         addDurationDistanceMatricesBuilder(int index) {
14237       return getDurationDistanceMatricesFieldBuilder()
14238           .addBuilder(
14239               index,
14240               com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix
14241                   .getDefaultInstance());
14242     }
14243     /**
14244      *
14245      *
14246      * <pre>
14247      * Specifies duration and distance matrices used in the model. If this field
14248      * is empty, Google Maps or geodesic distances will be used instead, depending
14249      * on the value of the `use_geodesic_distances` field. If it is not empty,
14250      * `use_geodesic_distances` cannot be true and neither
14251      * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags`
14252      * can be empty.
14253      * Usage examples:
14254      * * There are two locations: locA and locB.
14255      * * 1 vehicle starting its route at locA and ending it at locA.
14256      * * 1 pickup visit request at locB.
14257      * ```
14258      * model {
14259      *   vehicles { start_tags: "locA"  end_tags: "locA" }
14260      *   shipments { pickups { tags: "locB" } }
14261      *   duration_distance_matrix_src_tags: "locA"
14262      *   duration_distance_matrix_src_tags: "locB"
14263      *   duration_distance_matrix_dst_tags: "locA"
14264      *   duration_distance_matrix_dst_tags: "locB"
14265      *   duration_distance_matrices {
14266      *     rows {  # from: locA
14267      *       durations { seconds: 0 }   meters: 0    # to: locA
14268      *       durations { seconds: 100 } meters: 1000 # to: locB
14269      *     }
14270      *     rows {  # from: locB
14271      *       durations { seconds: 102 } meters: 990 # to: locA
14272      *       durations { seconds: 0 }   meters: 0   # to: locB
14273      *     }
14274      *   }
14275      * }
14276      * ```
14277      * * There are three locations: locA, locB and locC.
14278      * * 1 vehicle starting its route at locA and ending it at locB, using
14279      *   matrix "fast".
14280      * * 1 vehicle starting its route at locB and ending it at locB, using
14281      *   matrix "slow".
14282      * * 1 vehicle starting its route at locB and ending it at locB, using
14283      *   matrix "fast".
14284      * * 1 pickup visit request at locC.
14285      * ```
14286      * model {
14287      *   vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" }
14288      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" }
14289      *   vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" }
14290      *   shipments { pickups { tags: "locC" } }
14291      *   duration_distance_matrix_src_tags: "locA"
14292      *   duration_distance_matrix_src_tags: "locB"
14293      *   duration_distance_matrix_src_tags: "locC"
14294      *   duration_distance_matrix_dst_tags: "locB"
14295      *   duration_distance_matrix_dst_tags: "locC"
14296      *   duration_distance_matrices {
14297      *     vehicle_start_tag: "fast"
14298      *     rows {  # from: locA
14299      *       durations { seconds: 1000 } meters: 2000 # to: locB
14300      *       durations { seconds: 600 }  meters: 1000 # to: locC
14301      *     }
14302      *     rows {  # from: locB
14303      *       durations { seconds: 0 }   meters: 0    # to: locB
14304      *       durations { seconds: 700 } meters: 1200 # to: locC
14305      *     }
14306      *     rows {  # from: locC
14307      *       durations { seconds: 702 } meters: 1190 # to: locB
14308      *       durations { seconds: 0 }   meters: 0    # to: locC
14309      *     }
14310      *   }
14311      *   duration_distance_matrices {
14312      *     vehicle_start_tag: "slow"
14313      *     rows {  # from: locA
14314      *       durations { seconds: 1800 } meters: 2001 # to: locB
14315      *       durations { seconds: 900 }  meters: 1002 # to: locC
14316      *     }
14317      *     rows {  # from: locB
14318      *       durations { seconds: 0 }    meters: 0    # to: locB
14319      *       durations { seconds: 1000 } meters: 1202 # to: locC
14320      *     }
14321      *     rows {  # from: locC
14322      *       durations { seconds: 1001 } meters: 1195 # to: locB
14323      *       durations { seconds: 0 }    meters: 0    # to: locC
14324      *     }
14325      *   }
14326      * }
14327      * ```
14328      * </pre>
14329      *
14330      * <code>
14331      * repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;
14332      * </code>
14333      */
14334     public java.util.List<
14335             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder>
getDurationDistanceMatricesBuilderList()14336         getDurationDistanceMatricesBuilderList() {
14337       return getDurationDistanceMatricesFieldBuilder().getBuilderList();
14338     }
14339 
14340     private com.google.protobuf.RepeatedFieldBuilderV3<
14341             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix,
14342             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder,
14343             com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>
getDurationDistanceMatricesFieldBuilder()14344         getDurationDistanceMatricesFieldBuilder() {
14345       if (durationDistanceMatricesBuilder_ == null) {
14346         durationDistanceMatricesBuilder_ =
14347             new com.google.protobuf.RepeatedFieldBuilderV3<
14348                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix,
14349                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Builder,
14350                 com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>(
14351                 durationDistanceMatrices_,
14352                 ((bitField0_ & 0x00000040) != 0),
14353                 getParentForChildren(),
14354                 isClean());
14355         durationDistanceMatrices_ = null;
14356       }
14357       return durationDistanceMatricesBuilder_;
14358     }
14359 
14360     private com.google.protobuf.LazyStringList durationDistanceMatrixSrcTags_ =
14361         com.google.protobuf.LazyStringArrayList.EMPTY;
14362 
ensureDurationDistanceMatrixSrcTagsIsMutable()14363     private void ensureDurationDistanceMatrixSrcTagsIsMutable() {
14364       if (!((bitField0_ & 0x00000080) != 0)) {
14365         durationDistanceMatrixSrcTags_ =
14366             new com.google.protobuf.LazyStringArrayList(durationDistanceMatrixSrcTags_);
14367         bitField0_ |= 0x00000080;
14368       }
14369     }
14370     /**
14371      *
14372      *
14373      * <pre>
14374      * Tags defining the sources of the duration and distance matrices;
14375      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14376      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14377      * in matrix i.
14378      * Tags correspond to
14379      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14380      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14381      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14382      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14383      * the same; similarly a `VisitRequest`'s source and destination tags may be
14384      * the same. All tags must be different and cannot be empty strings. If this
14385      * field is not empty, then `duration_distance_matrices` must not be empty.
14386      * </pre>
14387      *
14388      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14389      *
14390      * @return A list containing the durationDistanceMatrixSrcTags.
14391      */
getDurationDistanceMatrixSrcTagsList()14392     public com.google.protobuf.ProtocolStringList getDurationDistanceMatrixSrcTagsList() {
14393       return durationDistanceMatrixSrcTags_.getUnmodifiableView();
14394     }
14395     /**
14396      *
14397      *
14398      * <pre>
14399      * Tags defining the sources of the duration and distance matrices;
14400      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14401      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14402      * in matrix i.
14403      * Tags correspond to
14404      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14405      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14406      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14407      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14408      * the same; similarly a `VisitRequest`'s source and destination tags may be
14409      * the same. All tags must be different and cannot be empty strings. If this
14410      * field is not empty, then `duration_distance_matrices` must not be empty.
14411      * </pre>
14412      *
14413      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14414      *
14415      * @return The count of durationDistanceMatrixSrcTags.
14416      */
getDurationDistanceMatrixSrcTagsCount()14417     public int getDurationDistanceMatrixSrcTagsCount() {
14418       return durationDistanceMatrixSrcTags_.size();
14419     }
14420     /**
14421      *
14422      *
14423      * <pre>
14424      * Tags defining the sources of the duration and distance matrices;
14425      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14426      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14427      * in matrix i.
14428      * Tags correspond to
14429      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14430      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14431      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14432      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14433      * the same; similarly a `VisitRequest`'s source and destination tags may be
14434      * the same. All tags must be different and cannot be empty strings. If this
14435      * field is not empty, then `duration_distance_matrices` must not be empty.
14436      * </pre>
14437      *
14438      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14439      *
14440      * @param index The index of the element to return.
14441      * @return The durationDistanceMatrixSrcTags at the given index.
14442      */
getDurationDistanceMatrixSrcTags(int index)14443     public java.lang.String getDurationDistanceMatrixSrcTags(int index) {
14444       return durationDistanceMatrixSrcTags_.get(index);
14445     }
14446     /**
14447      *
14448      *
14449      * <pre>
14450      * Tags defining the sources of the duration and distance matrices;
14451      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14452      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14453      * in matrix i.
14454      * Tags correspond to
14455      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14456      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14457      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14458      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14459      * the same; similarly a `VisitRequest`'s source and destination tags may be
14460      * the same. All tags must be different and cannot be empty strings. If this
14461      * field is not empty, then `duration_distance_matrices` must not be empty.
14462      * </pre>
14463      *
14464      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14465      *
14466      * @param index The index of the value to return.
14467      * @return The bytes of the durationDistanceMatrixSrcTags at the given index.
14468      */
getDurationDistanceMatrixSrcTagsBytes(int index)14469     public com.google.protobuf.ByteString getDurationDistanceMatrixSrcTagsBytes(int index) {
14470       return durationDistanceMatrixSrcTags_.getByteString(index);
14471     }
14472     /**
14473      *
14474      *
14475      * <pre>
14476      * Tags defining the sources of the duration and distance matrices;
14477      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14478      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14479      * in matrix i.
14480      * Tags correspond to
14481      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14482      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14483      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14484      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14485      * the same; similarly a `VisitRequest`'s source and destination tags may be
14486      * the same. All tags must be different and cannot be empty strings. If this
14487      * field is not empty, then `duration_distance_matrices` must not be empty.
14488      * </pre>
14489      *
14490      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14491      *
14492      * @param index The index to set the value at.
14493      * @param value The durationDistanceMatrixSrcTags to set.
14494      * @return This builder for chaining.
14495      */
setDurationDistanceMatrixSrcTags(int index, java.lang.String value)14496     public Builder setDurationDistanceMatrixSrcTags(int index, java.lang.String value) {
14497       if (value == null) {
14498         throw new NullPointerException();
14499       }
14500       ensureDurationDistanceMatrixSrcTagsIsMutable();
14501       durationDistanceMatrixSrcTags_.set(index, value);
14502       onChanged();
14503       return this;
14504     }
14505     /**
14506      *
14507      *
14508      * <pre>
14509      * Tags defining the sources of the duration and distance matrices;
14510      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14511      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14512      * in matrix i.
14513      * Tags correspond to
14514      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14515      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14516      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14517      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14518      * the same; similarly a `VisitRequest`'s source and destination tags may be
14519      * the same. All tags must be different and cannot be empty strings. If this
14520      * field is not empty, then `duration_distance_matrices` must not be empty.
14521      * </pre>
14522      *
14523      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14524      *
14525      * @param value The durationDistanceMatrixSrcTags to add.
14526      * @return This builder for chaining.
14527      */
addDurationDistanceMatrixSrcTags(java.lang.String value)14528     public Builder addDurationDistanceMatrixSrcTags(java.lang.String value) {
14529       if (value == null) {
14530         throw new NullPointerException();
14531       }
14532       ensureDurationDistanceMatrixSrcTagsIsMutable();
14533       durationDistanceMatrixSrcTags_.add(value);
14534       onChanged();
14535       return this;
14536     }
14537     /**
14538      *
14539      *
14540      * <pre>
14541      * Tags defining the sources of the duration and distance matrices;
14542      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14543      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14544      * in matrix i.
14545      * Tags correspond to
14546      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14547      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14548      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14549      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14550      * the same; similarly a `VisitRequest`'s source and destination tags may be
14551      * the same. All tags must be different and cannot be empty strings. If this
14552      * field is not empty, then `duration_distance_matrices` must not be empty.
14553      * </pre>
14554      *
14555      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14556      *
14557      * @param values The durationDistanceMatrixSrcTags to add.
14558      * @return This builder for chaining.
14559      */
addAllDurationDistanceMatrixSrcTags( java.lang.Iterable<java.lang.String> values)14560     public Builder addAllDurationDistanceMatrixSrcTags(
14561         java.lang.Iterable<java.lang.String> values) {
14562       ensureDurationDistanceMatrixSrcTagsIsMutable();
14563       com.google.protobuf.AbstractMessageLite.Builder.addAll(
14564           values, durationDistanceMatrixSrcTags_);
14565       onChanged();
14566       return this;
14567     }
14568     /**
14569      *
14570      *
14571      * <pre>
14572      * Tags defining the sources of the duration and distance matrices;
14573      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14574      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14575      * in matrix i.
14576      * Tags correspond to
14577      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14578      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14579      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14580      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14581      * the same; similarly a `VisitRequest`'s source and destination tags may be
14582      * the same. All tags must be different and cannot be empty strings. If this
14583      * field is not empty, then `duration_distance_matrices` must not be empty.
14584      * </pre>
14585      *
14586      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14587      *
14588      * @return This builder for chaining.
14589      */
clearDurationDistanceMatrixSrcTags()14590     public Builder clearDurationDistanceMatrixSrcTags() {
14591       durationDistanceMatrixSrcTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
14592       bitField0_ = (bitField0_ & ~0x00000080);
14593       onChanged();
14594       return this;
14595     }
14596     /**
14597      *
14598      *
14599      * <pre>
14600      * Tags defining the sources of the duration and distance matrices;
14601      * `duration_distance_matrices(i).rows(j)` defines durations and distances
14602      * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits
14603      * in matrix i.
14604      * Tags correspond to
14605      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14606      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14607      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14608      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14609      * the same; similarly a `VisitRequest`'s source and destination tags may be
14610      * the same. All tags must be different and cannot be empty strings. If this
14611      * field is not empty, then `duration_distance_matrices` must not be empty.
14612      * </pre>
14613      *
14614      * <code>repeated string duration_distance_matrix_src_tags = 9;</code>
14615      *
14616      * @param value The bytes of the durationDistanceMatrixSrcTags to add.
14617      * @return This builder for chaining.
14618      */
addDurationDistanceMatrixSrcTagsBytes(com.google.protobuf.ByteString value)14619     public Builder addDurationDistanceMatrixSrcTagsBytes(com.google.protobuf.ByteString value) {
14620       if (value == null) {
14621         throw new NullPointerException();
14622       }
14623       checkByteStringIsUtf8(value);
14624       ensureDurationDistanceMatrixSrcTagsIsMutable();
14625       durationDistanceMatrixSrcTags_.add(value);
14626       onChanged();
14627       return this;
14628     }
14629 
14630     private com.google.protobuf.LazyStringList durationDistanceMatrixDstTags_ =
14631         com.google.protobuf.LazyStringArrayList.EMPTY;
14632 
ensureDurationDistanceMatrixDstTagsIsMutable()14633     private void ensureDurationDistanceMatrixDstTagsIsMutable() {
14634       if (!((bitField0_ & 0x00000100) != 0)) {
14635         durationDistanceMatrixDstTags_ =
14636             new com.google.protobuf.LazyStringArrayList(durationDistanceMatrixDstTags_);
14637         bitField0_ |= 0x00000100;
14638       }
14639     }
14640     /**
14641      *
14642      *
14643      * <pre>
14644      * Tags defining the destinations of the duration and distance matrices;
14645      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14646      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14647      * (resp. the distance) of the travel from visits with tag
14648      * `duration_distance_matrix_src_tags(j)` to visits with tag
14649      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14650      * Tags correspond to
14651      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14652      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14653      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14654      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14655      * the same; similarly a `VisitRequest`'s source and destination tags may be
14656      * the same. All tags must be different and cannot be empty strings. If this
14657      * field is not empty, then `duration_distance_matrices` must not be empty.
14658      * </pre>
14659      *
14660      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14661      *
14662      * @return A list containing the durationDistanceMatrixDstTags.
14663      */
getDurationDistanceMatrixDstTagsList()14664     public com.google.protobuf.ProtocolStringList getDurationDistanceMatrixDstTagsList() {
14665       return durationDistanceMatrixDstTags_.getUnmodifiableView();
14666     }
14667     /**
14668      *
14669      *
14670      * <pre>
14671      * Tags defining the destinations of the duration and distance matrices;
14672      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14673      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14674      * (resp. the distance) of the travel from visits with tag
14675      * `duration_distance_matrix_src_tags(j)` to visits with tag
14676      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14677      * Tags correspond to
14678      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14679      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14680      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14681      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14682      * the same; similarly a `VisitRequest`'s source and destination tags may be
14683      * the same. All tags must be different and cannot be empty strings. If this
14684      * field is not empty, then `duration_distance_matrices` must not be empty.
14685      * </pre>
14686      *
14687      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14688      *
14689      * @return The count of durationDistanceMatrixDstTags.
14690      */
getDurationDistanceMatrixDstTagsCount()14691     public int getDurationDistanceMatrixDstTagsCount() {
14692       return durationDistanceMatrixDstTags_.size();
14693     }
14694     /**
14695      *
14696      *
14697      * <pre>
14698      * Tags defining the destinations of the duration and distance matrices;
14699      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14700      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14701      * (resp. the distance) of the travel from visits with tag
14702      * `duration_distance_matrix_src_tags(j)` to visits with tag
14703      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14704      * Tags correspond to
14705      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14706      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14707      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14708      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14709      * the same; similarly a `VisitRequest`'s source and destination tags may be
14710      * the same. All tags must be different and cannot be empty strings. If this
14711      * field is not empty, then `duration_distance_matrices` must not be empty.
14712      * </pre>
14713      *
14714      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14715      *
14716      * @param index The index of the element to return.
14717      * @return The durationDistanceMatrixDstTags at the given index.
14718      */
getDurationDistanceMatrixDstTags(int index)14719     public java.lang.String getDurationDistanceMatrixDstTags(int index) {
14720       return durationDistanceMatrixDstTags_.get(index);
14721     }
14722     /**
14723      *
14724      *
14725      * <pre>
14726      * Tags defining the destinations of the duration and distance matrices;
14727      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14728      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14729      * (resp. the distance) of the travel from visits with tag
14730      * `duration_distance_matrix_src_tags(j)` to visits with tag
14731      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14732      * Tags correspond to
14733      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14734      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14735      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14736      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14737      * the same; similarly a `VisitRequest`'s source and destination tags may be
14738      * the same. All tags must be different and cannot be empty strings. If this
14739      * field is not empty, then `duration_distance_matrices` must not be empty.
14740      * </pre>
14741      *
14742      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14743      *
14744      * @param index The index of the value to return.
14745      * @return The bytes of the durationDistanceMatrixDstTags at the given index.
14746      */
getDurationDistanceMatrixDstTagsBytes(int index)14747     public com.google.protobuf.ByteString getDurationDistanceMatrixDstTagsBytes(int index) {
14748       return durationDistanceMatrixDstTags_.getByteString(index);
14749     }
14750     /**
14751      *
14752      *
14753      * <pre>
14754      * Tags defining the destinations of the duration and distance matrices;
14755      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14756      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14757      * (resp. the distance) of the travel from visits with tag
14758      * `duration_distance_matrix_src_tags(j)` to visits with tag
14759      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14760      * Tags correspond to
14761      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14762      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14763      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14764      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14765      * the same; similarly a `VisitRequest`'s source and destination tags may be
14766      * the same. All tags must be different and cannot be empty strings. If this
14767      * field is not empty, then `duration_distance_matrices` must not be empty.
14768      * </pre>
14769      *
14770      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14771      *
14772      * @param index The index to set the value at.
14773      * @param value The durationDistanceMatrixDstTags to set.
14774      * @return This builder for chaining.
14775      */
setDurationDistanceMatrixDstTags(int index, java.lang.String value)14776     public Builder setDurationDistanceMatrixDstTags(int index, java.lang.String value) {
14777       if (value == null) {
14778         throw new NullPointerException();
14779       }
14780       ensureDurationDistanceMatrixDstTagsIsMutable();
14781       durationDistanceMatrixDstTags_.set(index, value);
14782       onChanged();
14783       return this;
14784     }
14785     /**
14786      *
14787      *
14788      * <pre>
14789      * Tags defining the destinations of the duration and distance matrices;
14790      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14791      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14792      * (resp. the distance) of the travel from visits with tag
14793      * `duration_distance_matrix_src_tags(j)` to visits with tag
14794      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14795      * Tags correspond to
14796      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14797      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14798      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14799      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14800      * the same; similarly a `VisitRequest`'s source and destination tags may be
14801      * the same. All tags must be different and cannot be empty strings. If this
14802      * field is not empty, then `duration_distance_matrices` must not be empty.
14803      * </pre>
14804      *
14805      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14806      *
14807      * @param value The durationDistanceMatrixDstTags to add.
14808      * @return This builder for chaining.
14809      */
addDurationDistanceMatrixDstTags(java.lang.String value)14810     public Builder addDurationDistanceMatrixDstTags(java.lang.String value) {
14811       if (value == null) {
14812         throw new NullPointerException();
14813       }
14814       ensureDurationDistanceMatrixDstTagsIsMutable();
14815       durationDistanceMatrixDstTags_.add(value);
14816       onChanged();
14817       return this;
14818     }
14819     /**
14820      *
14821      *
14822      * <pre>
14823      * Tags defining the destinations of the duration and distance matrices;
14824      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14825      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14826      * (resp. the distance) of the travel from visits with tag
14827      * `duration_distance_matrix_src_tags(j)` to visits with tag
14828      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14829      * Tags correspond to
14830      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14831      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14832      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14833      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14834      * the same; similarly a `VisitRequest`'s source and destination tags may be
14835      * the same. All tags must be different and cannot be empty strings. If this
14836      * field is not empty, then `duration_distance_matrices` must not be empty.
14837      * </pre>
14838      *
14839      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14840      *
14841      * @param values The durationDistanceMatrixDstTags to add.
14842      * @return This builder for chaining.
14843      */
addAllDurationDistanceMatrixDstTags( java.lang.Iterable<java.lang.String> values)14844     public Builder addAllDurationDistanceMatrixDstTags(
14845         java.lang.Iterable<java.lang.String> values) {
14846       ensureDurationDistanceMatrixDstTagsIsMutable();
14847       com.google.protobuf.AbstractMessageLite.Builder.addAll(
14848           values, durationDistanceMatrixDstTags_);
14849       onChanged();
14850       return this;
14851     }
14852     /**
14853      *
14854      *
14855      * <pre>
14856      * Tags defining the destinations of the duration and distance matrices;
14857      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14858      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14859      * (resp. the distance) of the travel from visits with tag
14860      * `duration_distance_matrix_src_tags(j)` to visits with tag
14861      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14862      * Tags correspond to
14863      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14864      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14865      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14866      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14867      * the same; similarly a `VisitRequest`'s source and destination tags may be
14868      * the same. All tags must be different and cannot be empty strings. If this
14869      * field is not empty, then `duration_distance_matrices` must not be empty.
14870      * </pre>
14871      *
14872      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14873      *
14874      * @return This builder for chaining.
14875      */
clearDurationDistanceMatrixDstTags()14876     public Builder clearDurationDistanceMatrixDstTags() {
14877       durationDistanceMatrixDstTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
14878       bitField0_ = (bitField0_ & ~0x00000100);
14879       onChanged();
14880       return this;
14881     }
14882     /**
14883      *
14884      *
14885      * <pre>
14886      * Tags defining the destinations of the duration and distance matrices;
14887      * `duration_distance_matrices(i).rows(j).durations(k)` (resp.
14888      * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration
14889      * (resp. the distance) of the travel from visits with tag
14890      * `duration_distance_matrix_src_tags(j)` to visits with tag
14891      * `duration_distance_matrix_dst_tags(k)` in matrix i.
14892      * Tags correspond to
14893      * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
14894      * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags].
14895      * A given `VisitRequest` or `Vehicle` must match exactly one tag in this
14896      * field. Note that a `Vehicle`'s source, destination and matrix tags may be
14897      * the same; similarly a `VisitRequest`'s source and destination tags may be
14898      * the same. All tags must be different and cannot be empty strings. If this
14899      * field is not empty, then `duration_distance_matrices` must not be empty.
14900      * </pre>
14901      *
14902      * <code>repeated string duration_distance_matrix_dst_tags = 10;</code>
14903      *
14904      * @param value The bytes of the durationDistanceMatrixDstTags to add.
14905      * @return This builder for chaining.
14906      */
addDurationDistanceMatrixDstTagsBytes(com.google.protobuf.ByteString value)14907     public Builder addDurationDistanceMatrixDstTagsBytes(com.google.protobuf.ByteString value) {
14908       if (value == null) {
14909         throw new NullPointerException();
14910       }
14911       checkByteStringIsUtf8(value);
14912       ensureDurationDistanceMatrixDstTagsIsMutable();
14913       durationDistanceMatrixDstTags_.add(value);
14914       onChanged();
14915       return this;
14916     }
14917 
14918     private java.util.List<com.google.cloud.optimization.v1.TransitionAttributes>
14919         transitionAttributes_ = java.util.Collections.emptyList();
14920 
ensureTransitionAttributesIsMutable()14921     private void ensureTransitionAttributesIsMutable() {
14922       if (!((bitField0_ & 0x00000200) != 0)) {
14923         transitionAttributes_ =
14924             new java.util.ArrayList<com.google.cloud.optimization.v1.TransitionAttributes>(
14925                 transitionAttributes_);
14926         bitField0_ |= 0x00000200;
14927       }
14928     }
14929 
14930     private com.google.protobuf.RepeatedFieldBuilderV3<
14931             com.google.cloud.optimization.v1.TransitionAttributes,
14932             com.google.cloud.optimization.v1.TransitionAttributes.Builder,
14933             com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>
14934         transitionAttributesBuilder_;
14935 
14936     /**
14937      *
14938      *
14939      * <pre>
14940      * Transition attributes added to the model.
14941      * </pre>
14942      *
14943      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
14944      * </code>
14945      */
14946     public java.util.List<com.google.cloud.optimization.v1.TransitionAttributes>
getTransitionAttributesList()14947         getTransitionAttributesList() {
14948       if (transitionAttributesBuilder_ == null) {
14949         return java.util.Collections.unmodifiableList(transitionAttributes_);
14950       } else {
14951         return transitionAttributesBuilder_.getMessageList();
14952       }
14953     }
14954     /**
14955      *
14956      *
14957      * <pre>
14958      * Transition attributes added to the model.
14959      * </pre>
14960      *
14961      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
14962      * </code>
14963      */
getTransitionAttributesCount()14964     public int getTransitionAttributesCount() {
14965       if (transitionAttributesBuilder_ == null) {
14966         return transitionAttributes_.size();
14967       } else {
14968         return transitionAttributesBuilder_.getCount();
14969       }
14970     }
14971     /**
14972      *
14973      *
14974      * <pre>
14975      * Transition attributes added to the model.
14976      * </pre>
14977      *
14978      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
14979      * </code>
14980      */
getTransitionAttributes( int index)14981     public com.google.cloud.optimization.v1.TransitionAttributes getTransitionAttributes(
14982         int index) {
14983       if (transitionAttributesBuilder_ == null) {
14984         return transitionAttributes_.get(index);
14985       } else {
14986         return transitionAttributesBuilder_.getMessage(index);
14987       }
14988     }
14989     /**
14990      *
14991      *
14992      * <pre>
14993      * Transition attributes added to the model.
14994      * </pre>
14995      *
14996      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
14997      * </code>
14998      */
setTransitionAttributes( int index, com.google.cloud.optimization.v1.TransitionAttributes value)14999     public Builder setTransitionAttributes(
15000         int index, com.google.cloud.optimization.v1.TransitionAttributes value) {
15001       if (transitionAttributesBuilder_ == null) {
15002         if (value == null) {
15003           throw new NullPointerException();
15004         }
15005         ensureTransitionAttributesIsMutable();
15006         transitionAttributes_.set(index, value);
15007         onChanged();
15008       } else {
15009         transitionAttributesBuilder_.setMessage(index, value);
15010       }
15011       return this;
15012     }
15013     /**
15014      *
15015      *
15016      * <pre>
15017      * Transition attributes added to the model.
15018      * </pre>
15019      *
15020      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15021      * </code>
15022      */
setTransitionAttributes( int index, com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue)15023     public Builder setTransitionAttributes(
15024         int index, com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue) {
15025       if (transitionAttributesBuilder_ == null) {
15026         ensureTransitionAttributesIsMutable();
15027         transitionAttributes_.set(index, builderForValue.build());
15028         onChanged();
15029       } else {
15030         transitionAttributesBuilder_.setMessage(index, builderForValue.build());
15031       }
15032       return this;
15033     }
15034     /**
15035      *
15036      *
15037      * <pre>
15038      * Transition attributes added to the model.
15039      * </pre>
15040      *
15041      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15042      * </code>
15043      */
addTransitionAttributes( com.google.cloud.optimization.v1.TransitionAttributes value)15044     public Builder addTransitionAttributes(
15045         com.google.cloud.optimization.v1.TransitionAttributes value) {
15046       if (transitionAttributesBuilder_ == null) {
15047         if (value == null) {
15048           throw new NullPointerException();
15049         }
15050         ensureTransitionAttributesIsMutable();
15051         transitionAttributes_.add(value);
15052         onChanged();
15053       } else {
15054         transitionAttributesBuilder_.addMessage(value);
15055       }
15056       return this;
15057     }
15058     /**
15059      *
15060      *
15061      * <pre>
15062      * Transition attributes added to the model.
15063      * </pre>
15064      *
15065      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15066      * </code>
15067      */
addTransitionAttributes( int index, com.google.cloud.optimization.v1.TransitionAttributes value)15068     public Builder addTransitionAttributes(
15069         int index, com.google.cloud.optimization.v1.TransitionAttributes value) {
15070       if (transitionAttributesBuilder_ == null) {
15071         if (value == null) {
15072           throw new NullPointerException();
15073         }
15074         ensureTransitionAttributesIsMutable();
15075         transitionAttributes_.add(index, value);
15076         onChanged();
15077       } else {
15078         transitionAttributesBuilder_.addMessage(index, value);
15079       }
15080       return this;
15081     }
15082     /**
15083      *
15084      *
15085      * <pre>
15086      * Transition attributes added to the model.
15087      * </pre>
15088      *
15089      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15090      * </code>
15091      */
addTransitionAttributes( com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue)15092     public Builder addTransitionAttributes(
15093         com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue) {
15094       if (transitionAttributesBuilder_ == null) {
15095         ensureTransitionAttributesIsMutable();
15096         transitionAttributes_.add(builderForValue.build());
15097         onChanged();
15098       } else {
15099         transitionAttributesBuilder_.addMessage(builderForValue.build());
15100       }
15101       return this;
15102     }
15103     /**
15104      *
15105      *
15106      * <pre>
15107      * Transition attributes added to the model.
15108      * </pre>
15109      *
15110      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15111      * </code>
15112      */
addTransitionAttributes( int index, com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue)15113     public Builder addTransitionAttributes(
15114         int index, com.google.cloud.optimization.v1.TransitionAttributes.Builder builderForValue) {
15115       if (transitionAttributesBuilder_ == null) {
15116         ensureTransitionAttributesIsMutable();
15117         transitionAttributes_.add(index, builderForValue.build());
15118         onChanged();
15119       } else {
15120         transitionAttributesBuilder_.addMessage(index, builderForValue.build());
15121       }
15122       return this;
15123     }
15124     /**
15125      *
15126      *
15127      * <pre>
15128      * Transition attributes added to the model.
15129      * </pre>
15130      *
15131      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15132      * </code>
15133      */
addAllTransitionAttributes( java.lang.Iterable<? extends com.google.cloud.optimization.v1.TransitionAttributes> values)15134     public Builder addAllTransitionAttributes(
15135         java.lang.Iterable<? extends com.google.cloud.optimization.v1.TransitionAttributes>
15136             values) {
15137       if (transitionAttributesBuilder_ == null) {
15138         ensureTransitionAttributesIsMutable();
15139         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionAttributes_);
15140         onChanged();
15141       } else {
15142         transitionAttributesBuilder_.addAllMessages(values);
15143       }
15144       return this;
15145     }
15146     /**
15147      *
15148      *
15149      * <pre>
15150      * Transition attributes added to the model.
15151      * </pre>
15152      *
15153      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15154      * </code>
15155      */
clearTransitionAttributes()15156     public Builder clearTransitionAttributes() {
15157       if (transitionAttributesBuilder_ == null) {
15158         transitionAttributes_ = java.util.Collections.emptyList();
15159         bitField0_ = (bitField0_ & ~0x00000200);
15160         onChanged();
15161       } else {
15162         transitionAttributesBuilder_.clear();
15163       }
15164       return this;
15165     }
15166     /**
15167      *
15168      *
15169      * <pre>
15170      * Transition attributes added to the model.
15171      * </pre>
15172      *
15173      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15174      * </code>
15175      */
removeTransitionAttributes(int index)15176     public Builder removeTransitionAttributes(int index) {
15177       if (transitionAttributesBuilder_ == null) {
15178         ensureTransitionAttributesIsMutable();
15179         transitionAttributes_.remove(index);
15180         onChanged();
15181       } else {
15182         transitionAttributesBuilder_.remove(index);
15183       }
15184       return this;
15185     }
15186     /**
15187      *
15188      *
15189      * <pre>
15190      * Transition attributes added to the model.
15191      * </pre>
15192      *
15193      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15194      * </code>
15195      */
15196     public com.google.cloud.optimization.v1.TransitionAttributes.Builder
getTransitionAttributesBuilder(int index)15197         getTransitionAttributesBuilder(int index) {
15198       return getTransitionAttributesFieldBuilder().getBuilder(index);
15199     }
15200     /**
15201      *
15202      *
15203      * <pre>
15204      * Transition attributes added to the model.
15205      * </pre>
15206      *
15207      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15208      * </code>
15209      */
15210     public com.google.cloud.optimization.v1.TransitionAttributesOrBuilder
getTransitionAttributesOrBuilder(int index)15211         getTransitionAttributesOrBuilder(int index) {
15212       if (transitionAttributesBuilder_ == null) {
15213         return transitionAttributes_.get(index);
15214       } else {
15215         return transitionAttributesBuilder_.getMessageOrBuilder(index);
15216       }
15217     }
15218     /**
15219      *
15220      *
15221      * <pre>
15222      * Transition attributes added to the model.
15223      * </pre>
15224      *
15225      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15226      * </code>
15227      */
15228     public java.util.List<? extends com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>
getTransitionAttributesOrBuilderList()15229         getTransitionAttributesOrBuilderList() {
15230       if (transitionAttributesBuilder_ != null) {
15231         return transitionAttributesBuilder_.getMessageOrBuilderList();
15232       } else {
15233         return java.util.Collections.unmodifiableList(transitionAttributes_);
15234       }
15235     }
15236     /**
15237      *
15238      *
15239      * <pre>
15240      * Transition attributes added to the model.
15241      * </pre>
15242      *
15243      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15244      * </code>
15245      */
15246     public com.google.cloud.optimization.v1.TransitionAttributes.Builder
addTransitionAttributesBuilder()15247         addTransitionAttributesBuilder() {
15248       return getTransitionAttributesFieldBuilder()
15249           .addBuilder(com.google.cloud.optimization.v1.TransitionAttributes.getDefaultInstance());
15250     }
15251     /**
15252      *
15253      *
15254      * <pre>
15255      * Transition attributes added to the model.
15256      * </pre>
15257      *
15258      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15259      * </code>
15260      */
15261     public com.google.cloud.optimization.v1.TransitionAttributes.Builder
addTransitionAttributesBuilder(int index)15262         addTransitionAttributesBuilder(int index) {
15263       return getTransitionAttributesFieldBuilder()
15264           .addBuilder(
15265               index, com.google.cloud.optimization.v1.TransitionAttributes.getDefaultInstance());
15266     }
15267     /**
15268      *
15269      *
15270      * <pre>
15271      * Transition attributes added to the model.
15272      * </pre>
15273      *
15274      * <code>repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
15275      * </code>
15276      */
15277     public java.util.List<com.google.cloud.optimization.v1.TransitionAttributes.Builder>
getTransitionAttributesBuilderList()15278         getTransitionAttributesBuilderList() {
15279       return getTransitionAttributesFieldBuilder().getBuilderList();
15280     }
15281 
15282     private com.google.protobuf.RepeatedFieldBuilderV3<
15283             com.google.cloud.optimization.v1.TransitionAttributes,
15284             com.google.cloud.optimization.v1.TransitionAttributes.Builder,
15285             com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>
getTransitionAttributesFieldBuilder()15286         getTransitionAttributesFieldBuilder() {
15287       if (transitionAttributesBuilder_ == null) {
15288         transitionAttributesBuilder_ =
15289             new com.google.protobuf.RepeatedFieldBuilderV3<
15290                 com.google.cloud.optimization.v1.TransitionAttributes,
15291                 com.google.cloud.optimization.v1.TransitionAttributes.Builder,
15292                 com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>(
15293                 transitionAttributes_,
15294                 ((bitField0_ & 0x00000200) != 0),
15295                 getParentForChildren(),
15296                 isClean());
15297         transitionAttributes_ = null;
15298       }
15299       return transitionAttributesBuilder_;
15300     }
15301 
15302     private java.util.List<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>
15303         shipmentTypeIncompatibilities_ = java.util.Collections.emptyList();
15304 
ensureShipmentTypeIncompatibilitiesIsMutable()15305     private void ensureShipmentTypeIncompatibilitiesIsMutable() {
15306       if (!((bitField0_ & 0x00000400) != 0)) {
15307         shipmentTypeIncompatibilities_ =
15308             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>(
15309                 shipmentTypeIncompatibilities_);
15310         bitField0_ |= 0x00000400;
15311       }
15312     }
15313 
15314     private com.google.protobuf.RepeatedFieldBuilderV3<
15315             com.google.cloud.optimization.v1.ShipmentTypeIncompatibility,
15316             com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder,
15317             com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>
15318         shipmentTypeIncompatibilitiesBuilder_;
15319 
15320     /**
15321      *
15322      *
15323      * <pre>
15324      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15325      * </pre>
15326      *
15327      * <code>
15328      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15329      * </code>
15330      */
15331     public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>
getShipmentTypeIncompatibilitiesList()15332         getShipmentTypeIncompatibilitiesList() {
15333       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15334         return java.util.Collections.unmodifiableList(shipmentTypeIncompatibilities_);
15335       } else {
15336         return shipmentTypeIncompatibilitiesBuilder_.getMessageList();
15337       }
15338     }
15339     /**
15340      *
15341      *
15342      * <pre>
15343      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15344      * </pre>
15345      *
15346      * <code>
15347      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15348      * </code>
15349      */
getShipmentTypeIncompatibilitiesCount()15350     public int getShipmentTypeIncompatibilitiesCount() {
15351       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15352         return shipmentTypeIncompatibilities_.size();
15353       } else {
15354         return shipmentTypeIncompatibilitiesBuilder_.getCount();
15355       }
15356     }
15357     /**
15358      *
15359      *
15360      * <pre>
15361      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15362      * </pre>
15363      *
15364      * <code>
15365      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15366      * </code>
15367      */
15368     public com.google.cloud.optimization.v1.ShipmentTypeIncompatibility
getShipmentTypeIncompatibilities(int index)15369         getShipmentTypeIncompatibilities(int index) {
15370       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15371         return shipmentTypeIncompatibilities_.get(index);
15372       } else {
15373         return shipmentTypeIncompatibilitiesBuilder_.getMessage(index);
15374       }
15375     }
15376     /**
15377      *
15378      *
15379      * <pre>
15380      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15381      * </pre>
15382      *
15383      * <code>
15384      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15385      * </code>
15386      */
setShipmentTypeIncompatibilities( int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value)15387     public Builder setShipmentTypeIncompatibilities(
15388         int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value) {
15389       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15390         if (value == null) {
15391           throw new NullPointerException();
15392         }
15393         ensureShipmentTypeIncompatibilitiesIsMutable();
15394         shipmentTypeIncompatibilities_.set(index, value);
15395         onChanged();
15396       } else {
15397         shipmentTypeIncompatibilitiesBuilder_.setMessage(index, value);
15398       }
15399       return this;
15400     }
15401     /**
15402      *
15403      *
15404      * <pre>
15405      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15406      * </pre>
15407      *
15408      * <code>
15409      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15410      * </code>
15411      */
setShipmentTypeIncompatibilities( int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue)15412     public Builder setShipmentTypeIncompatibilities(
15413         int index,
15414         com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue) {
15415       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15416         ensureShipmentTypeIncompatibilitiesIsMutable();
15417         shipmentTypeIncompatibilities_.set(index, builderForValue.build());
15418         onChanged();
15419       } else {
15420         shipmentTypeIncompatibilitiesBuilder_.setMessage(index, builderForValue.build());
15421       }
15422       return this;
15423     }
15424     /**
15425      *
15426      *
15427      * <pre>
15428      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15429      * </pre>
15430      *
15431      * <code>
15432      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15433      * </code>
15434      */
addShipmentTypeIncompatibilities( com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value)15435     public Builder addShipmentTypeIncompatibilities(
15436         com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value) {
15437       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15438         if (value == null) {
15439           throw new NullPointerException();
15440         }
15441         ensureShipmentTypeIncompatibilitiesIsMutable();
15442         shipmentTypeIncompatibilities_.add(value);
15443         onChanged();
15444       } else {
15445         shipmentTypeIncompatibilitiesBuilder_.addMessage(value);
15446       }
15447       return this;
15448     }
15449     /**
15450      *
15451      *
15452      * <pre>
15453      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15454      * </pre>
15455      *
15456      * <code>
15457      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15458      * </code>
15459      */
addShipmentTypeIncompatibilities( int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value)15460     public Builder addShipmentTypeIncompatibilities(
15461         int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility value) {
15462       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15463         if (value == null) {
15464           throw new NullPointerException();
15465         }
15466         ensureShipmentTypeIncompatibilitiesIsMutable();
15467         shipmentTypeIncompatibilities_.add(index, value);
15468         onChanged();
15469       } else {
15470         shipmentTypeIncompatibilitiesBuilder_.addMessage(index, value);
15471       }
15472       return this;
15473     }
15474     /**
15475      *
15476      *
15477      * <pre>
15478      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15479      * </pre>
15480      *
15481      * <code>
15482      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15483      * </code>
15484      */
addShipmentTypeIncompatibilities( com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue)15485     public Builder addShipmentTypeIncompatibilities(
15486         com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue) {
15487       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15488         ensureShipmentTypeIncompatibilitiesIsMutable();
15489         shipmentTypeIncompatibilities_.add(builderForValue.build());
15490         onChanged();
15491       } else {
15492         shipmentTypeIncompatibilitiesBuilder_.addMessage(builderForValue.build());
15493       }
15494       return this;
15495     }
15496     /**
15497      *
15498      *
15499      * <pre>
15500      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15501      * </pre>
15502      *
15503      * <code>
15504      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15505      * </code>
15506      */
addShipmentTypeIncompatibilities( int index, com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue)15507     public Builder addShipmentTypeIncompatibilities(
15508         int index,
15509         com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder builderForValue) {
15510       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15511         ensureShipmentTypeIncompatibilitiesIsMutable();
15512         shipmentTypeIncompatibilities_.add(index, builderForValue.build());
15513         onChanged();
15514       } else {
15515         shipmentTypeIncompatibilitiesBuilder_.addMessage(index, builderForValue.build());
15516       }
15517       return this;
15518     }
15519     /**
15520      *
15521      *
15522      * <pre>
15523      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15524      * </pre>
15525      *
15526      * <code>
15527      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15528      * </code>
15529      */
addAllShipmentTypeIncompatibilities( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibility> values)15530     public Builder addAllShipmentTypeIncompatibilities(
15531         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibility>
15532             values) {
15533       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15534         ensureShipmentTypeIncompatibilitiesIsMutable();
15535         com.google.protobuf.AbstractMessageLite.Builder.addAll(
15536             values, shipmentTypeIncompatibilities_);
15537         onChanged();
15538       } else {
15539         shipmentTypeIncompatibilitiesBuilder_.addAllMessages(values);
15540       }
15541       return this;
15542     }
15543     /**
15544      *
15545      *
15546      * <pre>
15547      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15548      * </pre>
15549      *
15550      * <code>
15551      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15552      * </code>
15553      */
clearShipmentTypeIncompatibilities()15554     public Builder clearShipmentTypeIncompatibilities() {
15555       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15556         shipmentTypeIncompatibilities_ = java.util.Collections.emptyList();
15557         bitField0_ = (bitField0_ & ~0x00000400);
15558         onChanged();
15559       } else {
15560         shipmentTypeIncompatibilitiesBuilder_.clear();
15561       }
15562       return this;
15563     }
15564     /**
15565      *
15566      *
15567      * <pre>
15568      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15569      * </pre>
15570      *
15571      * <code>
15572      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15573      * </code>
15574      */
removeShipmentTypeIncompatibilities(int index)15575     public Builder removeShipmentTypeIncompatibilities(int index) {
15576       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15577         ensureShipmentTypeIncompatibilitiesIsMutable();
15578         shipmentTypeIncompatibilities_.remove(index);
15579         onChanged();
15580       } else {
15581         shipmentTypeIncompatibilitiesBuilder_.remove(index);
15582       }
15583       return this;
15584     }
15585     /**
15586      *
15587      *
15588      * <pre>
15589      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15590      * </pre>
15591      *
15592      * <code>
15593      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15594      * </code>
15595      */
15596     public com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder
getShipmentTypeIncompatibilitiesBuilder(int index)15597         getShipmentTypeIncompatibilitiesBuilder(int index) {
15598       return getShipmentTypeIncompatibilitiesFieldBuilder().getBuilder(index);
15599     }
15600     /**
15601      *
15602      *
15603      * <pre>
15604      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15605      * </pre>
15606      *
15607      * <code>
15608      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15609      * </code>
15610      */
15611     public com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder
getShipmentTypeIncompatibilitiesOrBuilder(int index)15612         getShipmentTypeIncompatibilitiesOrBuilder(int index) {
15613       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15614         return shipmentTypeIncompatibilities_.get(index);
15615       } else {
15616         return shipmentTypeIncompatibilitiesBuilder_.getMessageOrBuilder(index);
15617       }
15618     }
15619     /**
15620      *
15621      *
15622      * <pre>
15623      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15624      * </pre>
15625      *
15626      * <code>
15627      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15628      * </code>
15629      */
15630     public java.util.List<
15631             ? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>
getShipmentTypeIncompatibilitiesOrBuilderList()15632         getShipmentTypeIncompatibilitiesOrBuilderList() {
15633       if (shipmentTypeIncompatibilitiesBuilder_ != null) {
15634         return shipmentTypeIncompatibilitiesBuilder_.getMessageOrBuilderList();
15635       } else {
15636         return java.util.Collections.unmodifiableList(shipmentTypeIncompatibilities_);
15637       }
15638     }
15639     /**
15640      *
15641      *
15642      * <pre>
15643      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15644      * </pre>
15645      *
15646      * <code>
15647      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15648      * </code>
15649      */
15650     public com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder
addShipmentTypeIncompatibilitiesBuilder()15651         addShipmentTypeIncompatibilitiesBuilder() {
15652       return getShipmentTypeIncompatibilitiesFieldBuilder()
15653           .addBuilder(
15654               com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.getDefaultInstance());
15655     }
15656     /**
15657      *
15658      *
15659      * <pre>
15660      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15661      * </pre>
15662      *
15663      * <code>
15664      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15665      * </code>
15666      */
15667     public com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder
addShipmentTypeIncompatibilitiesBuilder(int index)15668         addShipmentTypeIncompatibilitiesBuilder(int index) {
15669       return getShipmentTypeIncompatibilitiesFieldBuilder()
15670           .addBuilder(
15671               index,
15672               com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.getDefaultInstance());
15673     }
15674     /**
15675      *
15676      *
15677      * <pre>
15678      * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`).
15679      * </pre>
15680      *
15681      * <code>
15682      * repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
15683      * </code>
15684      */
15685     public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder>
getShipmentTypeIncompatibilitiesBuilderList()15686         getShipmentTypeIncompatibilitiesBuilderList() {
15687       return getShipmentTypeIncompatibilitiesFieldBuilder().getBuilderList();
15688     }
15689 
15690     private com.google.protobuf.RepeatedFieldBuilderV3<
15691             com.google.cloud.optimization.v1.ShipmentTypeIncompatibility,
15692             com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder,
15693             com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>
getShipmentTypeIncompatibilitiesFieldBuilder()15694         getShipmentTypeIncompatibilitiesFieldBuilder() {
15695       if (shipmentTypeIncompatibilitiesBuilder_ == null) {
15696         shipmentTypeIncompatibilitiesBuilder_ =
15697             new com.google.protobuf.RepeatedFieldBuilderV3<
15698                 com.google.cloud.optimization.v1.ShipmentTypeIncompatibility,
15699                 com.google.cloud.optimization.v1.ShipmentTypeIncompatibility.Builder,
15700                 com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>(
15701                 shipmentTypeIncompatibilities_,
15702                 ((bitField0_ & 0x00000400) != 0),
15703                 getParentForChildren(),
15704                 isClean());
15705         shipmentTypeIncompatibilities_ = null;
15706       }
15707       return shipmentTypeIncompatibilitiesBuilder_;
15708     }
15709 
15710     private java.util.List<com.google.cloud.optimization.v1.ShipmentTypeRequirement>
15711         shipmentTypeRequirements_ = java.util.Collections.emptyList();
15712 
ensureShipmentTypeRequirementsIsMutable()15713     private void ensureShipmentTypeRequirementsIsMutable() {
15714       if (!((bitField0_ & 0x00000800) != 0)) {
15715         shipmentTypeRequirements_ =
15716             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentTypeRequirement>(
15717                 shipmentTypeRequirements_);
15718         bitField0_ |= 0x00000800;
15719       }
15720     }
15721 
15722     private com.google.protobuf.RepeatedFieldBuilderV3<
15723             com.google.cloud.optimization.v1.ShipmentTypeRequirement,
15724             com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder,
15725             com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>
15726         shipmentTypeRequirementsBuilder_;
15727 
15728     /**
15729      *
15730      *
15731      * <pre>
15732      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15733      * </pre>
15734      *
15735      * <code>
15736      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15737      * </code>
15738      */
15739     public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeRequirement>
getShipmentTypeRequirementsList()15740         getShipmentTypeRequirementsList() {
15741       if (shipmentTypeRequirementsBuilder_ == null) {
15742         return java.util.Collections.unmodifiableList(shipmentTypeRequirements_);
15743       } else {
15744         return shipmentTypeRequirementsBuilder_.getMessageList();
15745       }
15746     }
15747     /**
15748      *
15749      *
15750      * <pre>
15751      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15752      * </pre>
15753      *
15754      * <code>
15755      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15756      * </code>
15757      */
getShipmentTypeRequirementsCount()15758     public int getShipmentTypeRequirementsCount() {
15759       if (shipmentTypeRequirementsBuilder_ == null) {
15760         return shipmentTypeRequirements_.size();
15761       } else {
15762         return shipmentTypeRequirementsBuilder_.getCount();
15763       }
15764     }
15765     /**
15766      *
15767      *
15768      * <pre>
15769      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15770      * </pre>
15771      *
15772      * <code>
15773      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15774      * </code>
15775      */
getShipmentTypeRequirements( int index)15776     public com.google.cloud.optimization.v1.ShipmentTypeRequirement getShipmentTypeRequirements(
15777         int index) {
15778       if (shipmentTypeRequirementsBuilder_ == null) {
15779         return shipmentTypeRequirements_.get(index);
15780       } else {
15781         return shipmentTypeRequirementsBuilder_.getMessage(index);
15782       }
15783     }
15784     /**
15785      *
15786      *
15787      * <pre>
15788      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15789      * </pre>
15790      *
15791      * <code>
15792      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15793      * </code>
15794      */
setShipmentTypeRequirements( int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement value)15795     public Builder setShipmentTypeRequirements(
15796         int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement value) {
15797       if (shipmentTypeRequirementsBuilder_ == null) {
15798         if (value == null) {
15799           throw new NullPointerException();
15800         }
15801         ensureShipmentTypeRequirementsIsMutable();
15802         shipmentTypeRequirements_.set(index, value);
15803         onChanged();
15804       } else {
15805         shipmentTypeRequirementsBuilder_.setMessage(index, value);
15806       }
15807       return this;
15808     }
15809     /**
15810      *
15811      *
15812      * <pre>
15813      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15814      * </pre>
15815      *
15816      * <code>
15817      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15818      * </code>
15819      */
setShipmentTypeRequirements( int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue)15820     public Builder setShipmentTypeRequirements(
15821         int index,
15822         com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue) {
15823       if (shipmentTypeRequirementsBuilder_ == null) {
15824         ensureShipmentTypeRequirementsIsMutable();
15825         shipmentTypeRequirements_.set(index, builderForValue.build());
15826         onChanged();
15827       } else {
15828         shipmentTypeRequirementsBuilder_.setMessage(index, builderForValue.build());
15829       }
15830       return this;
15831     }
15832     /**
15833      *
15834      *
15835      * <pre>
15836      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15837      * </pre>
15838      *
15839      * <code>
15840      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15841      * </code>
15842      */
addShipmentTypeRequirements( com.google.cloud.optimization.v1.ShipmentTypeRequirement value)15843     public Builder addShipmentTypeRequirements(
15844         com.google.cloud.optimization.v1.ShipmentTypeRequirement value) {
15845       if (shipmentTypeRequirementsBuilder_ == null) {
15846         if (value == null) {
15847           throw new NullPointerException();
15848         }
15849         ensureShipmentTypeRequirementsIsMutable();
15850         shipmentTypeRequirements_.add(value);
15851         onChanged();
15852       } else {
15853         shipmentTypeRequirementsBuilder_.addMessage(value);
15854       }
15855       return this;
15856     }
15857     /**
15858      *
15859      *
15860      * <pre>
15861      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15862      * </pre>
15863      *
15864      * <code>
15865      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15866      * </code>
15867      */
addShipmentTypeRequirements( int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement value)15868     public Builder addShipmentTypeRequirements(
15869         int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement value) {
15870       if (shipmentTypeRequirementsBuilder_ == null) {
15871         if (value == null) {
15872           throw new NullPointerException();
15873         }
15874         ensureShipmentTypeRequirementsIsMutable();
15875         shipmentTypeRequirements_.add(index, value);
15876         onChanged();
15877       } else {
15878         shipmentTypeRequirementsBuilder_.addMessage(index, value);
15879       }
15880       return this;
15881     }
15882     /**
15883      *
15884      *
15885      * <pre>
15886      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15887      * </pre>
15888      *
15889      * <code>
15890      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15891      * </code>
15892      */
addShipmentTypeRequirements( com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue)15893     public Builder addShipmentTypeRequirements(
15894         com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue) {
15895       if (shipmentTypeRequirementsBuilder_ == null) {
15896         ensureShipmentTypeRequirementsIsMutable();
15897         shipmentTypeRequirements_.add(builderForValue.build());
15898         onChanged();
15899       } else {
15900         shipmentTypeRequirementsBuilder_.addMessage(builderForValue.build());
15901       }
15902       return this;
15903     }
15904     /**
15905      *
15906      *
15907      * <pre>
15908      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15909      * </pre>
15910      *
15911      * <code>
15912      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15913      * </code>
15914      */
addShipmentTypeRequirements( int index, com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue)15915     public Builder addShipmentTypeRequirements(
15916         int index,
15917         com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder builderForValue) {
15918       if (shipmentTypeRequirementsBuilder_ == null) {
15919         ensureShipmentTypeRequirementsIsMutable();
15920         shipmentTypeRequirements_.add(index, builderForValue.build());
15921         onChanged();
15922       } else {
15923         shipmentTypeRequirementsBuilder_.addMessage(index, builderForValue.build());
15924       }
15925       return this;
15926     }
15927     /**
15928      *
15929      *
15930      * <pre>
15931      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15932      * </pre>
15933      *
15934      * <code>
15935      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15936      * </code>
15937      */
addAllShipmentTypeRequirements( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentTypeRequirement> values)15938     public Builder addAllShipmentTypeRequirements(
15939         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentTypeRequirement>
15940             values) {
15941       if (shipmentTypeRequirementsBuilder_ == null) {
15942         ensureShipmentTypeRequirementsIsMutable();
15943         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shipmentTypeRequirements_);
15944         onChanged();
15945       } else {
15946         shipmentTypeRequirementsBuilder_.addAllMessages(values);
15947       }
15948       return this;
15949     }
15950     /**
15951      *
15952      *
15953      * <pre>
15954      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15955      * </pre>
15956      *
15957      * <code>
15958      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15959      * </code>
15960      */
clearShipmentTypeRequirements()15961     public Builder clearShipmentTypeRequirements() {
15962       if (shipmentTypeRequirementsBuilder_ == null) {
15963         shipmentTypeRequirements_ = java.util.Collections.emptyList();
15964         bitField0_ = (bitField0_ & ~0x00000800);
15965         onChanged();
15966       } else {
15967         shipmentTypeRequirementsBuilder_.clear();
15968       }
15969       return this;
15970     }
15971     /**
15972      *
15973      *
15974      * <pre>
15975      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15976      * </pre>
15977      *
15978      * <code>
15979      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
15980      * </code>
15981      */
removeShipmentTypeRequirements(int index)15982     public Builder removeShipmentTypeRequirements(int index) {
15983       if (shipmentTypeRequirementsBuilder_ == null) {
15984         ensureShipmentTypeRequirementsIsMutable();
15985         shipmentTypeRequirements_.remove(index);
15986         onChanged();
15987       } else {
15988         shipmentTypeRequirementsBuilder_.remove(index);
15989       }
15990       return this;
15991     }
15992     /**
15993      *
15994      *
15995      * <pre>
15996      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
15997      * </pre>
15998      *
15999      * <code>
16000      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16001      * </code>
16002      */
16003     public com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder
getShipmentTypeRequirementsBuilder(int index)16004         getShipmentTypeRequirementsBuilder(int index) {
16005       return getShipmentTypeRequirementsFieldBuilder().getBuilder(index);
16006     }
16007     /**
16008      *
16009      *
16010      * <pre>
16011      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
16012      * </pre>
16013      *
16014      * <code>
16015      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16016      * </code>
16017      */
16018     public com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder
getShipmentTypeRequirementsOrBuilder(int index)16019         getShipmentTypeRequirementsOrBuilder(int index) {
16020       if (shipmentTypeRequirementsBuilder_ == null) {
16021         return shipmentTypeRequirements_.get(index);
16022       } else {
16023         return shipmentTypeRequirementsBuilder_.getMessageOrBuilder(index);
16024       }
16025     }
16026     /**
16027      *
16028      *
16029      * <pre>
16030      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
16031      * </pre>
16032      *
16033      * <code>
16034      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16035      * </code>
16036      */
16037     public java.util.List<
16038             ? extends com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>
getShipmentTypeRequirementsOrBuilderList()16039         getShipmentTypeRequirementsOrBuilderList() {
16040       if (shipmentTypeRequirementsBuilder_ != null) {
16041         return shipmentTypeRequirementsBuilder_.getMessageOrBuilderList();
16042       } else {
16043         return java.util.Collections.unmodifiableList(shipmentTypeRequirements_);
16044       }
16045     }
16046     /**
16047      *
16048      *
16049      * <pre>
16050      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
16051      * </pre>
16052      *
16053      * <code>
16054      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16055      * </code>
16056      */
16057     public com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder
addShipmentTypeRequirementsBuilder()16058         addShipmentTypeRequirementsBuilder() {
16059       return getShipmentTypeRequirementsFieldBuilder()
16060           .addBuilder(
16061               com.google.cloud.optimization.v1.ShipmentTypeRequirement.getDefaultInstance());
16062     }
16063     /**
16064      *
16065      *
16066      * <pre>
16067      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
16068      * </pre>
16069      *
16070      * <code>
16071      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16072      * </code>
16073      */
16074     public com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder
addShipmentTypeRequirementsBuilder(int index)16075         addShipmentTypeRequirementsBuilder(int index) {
16076       return getShipmentTypeRequirementsFieldBuilder()
16077           .addBuilder(
16078               index, com.google.cloud.optimization.v1.ShipmentTypeRequirement.getDefaultInstance());
16079     }
16080     /**
16081      *
16082      *
16083      * <pre>
16084      * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`).
16085      * </pre>
16086      *
16087      * <code>
16088      * repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
16089      * </code>
16090      */
16091     public java.util.List<com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder>
getShipmentTypeRequirementsBuilderList()16092         getShipmentTypeRequirementsBuilderList() {
16093       return getShipmentTypeRequirementsFieldBuilder().getBuilderList();
16094     }
16095 
16096     private com.google.protobuf.RepeatedFieldBuilderV3<
16097             com.google.cloud.optimization.v1.ShipmentTypeRequirement,
16098             com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder,
16099             com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>
getShipmentTypeRequirementsFieldBuilder()16100         getShipmentTypeRequirementsFieldBuilder() {
16101       if (shipmentTypeRequirementsBuilder_ == null) {
16102         shipmentTypeRequirementsBuilder_ =
16103             new com.google.protobuf.RepeatedFieldBuilderV3<
16104                 com.google.cloud.optimization.v1.ShipmentTypeRequirement,
16105                 com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder,
16106                 com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>(
16107                 shipmentTypeRequirements_,
16108                 ((bitField0_ & 0x00000800) != 0),
16109                 getParentForChildren(),
16110                 isClean());
16111         shipmentTypeRequirements_ = null;
16112       }
16113       return shipmentTypeRequirementsBuilder_;
16114     }
16115 
16116     private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>
16117         precedenceRules_ = java.util.Collections.emptyList();
16118 
ensurePrecedenceRulesIsMutable()16119     private void ensurePrecedenceRulesIsMutable() {
16120       if (!((bitField0_ & 0x00001000) != 0)) {
16121         precedenceRules_ =
16122             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>(
16123                 precedenceRules_);
16124         bitField0_ |= 0x00001000;
16125       }
16126     }
16127 
16128     private com.google.protobuf.RepeatedFieldBuilderV3<
16129             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule,
16130             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder,
16131             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>
16132         precedenceRulesBuilder_;
16133 
16134     /**
16135      *
16136      *
16137      * <pre>
16138      * Set of precedence rules which must be enforced in the model.
16139      * </pre>
16140      *
16141      * <code>
16142      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16143      * </code>
16144      */
16145     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>
getPrecedenceRulesList()16146         getPrecedenceRulesList() {
16147       if (precedenceRulesBuilder_ == null) {
16148         return java.util.Collections.unmodifiableList(precedenceRules_);
16149       } else {
16150         return precedenceRulesBuilder_.getMessageList();
16151       }
16152     }
16153     /**
16154      *
16155      *
16156      * <pre>
16157      * Set of precedence rules which must be enforced in the model.
16158      * </pre>
16159      *
16160      * <code>
16161      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16162      * </code>
16163      */
getPrecedenceRulesCount()16164     public int getPrecedenceRulesCount() {
16165       if (precedenceRulesBuilder_ == null) {
16166         return precedenceRules_.size();
16167       } else {
16168         return precedenceRulesBuilder_.getCount();
16169       }
16170     }
16171     /**
16172      *
16173      *
16174      * <pre>
16175      * Set of precedence rules which must be enforced in the model.
16176      * </pre>
16177      *
16178      * <code>
16179      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16180      * </code>
16181      */
getPrecedenceRules( int index)16182     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule getPrecedenceRules(
16183         int index) {
16184       if (precedenceRulesBuilder_ == null) {
16185         return precedenceRules_.get(index);
16186       } else {
16187         return precedenceRulesBuilder_.getMessage(index);
16188       }
16189     }
16190     /**
16191      *
16192      *
16193      * <pre>
16194      * Set of precedence rules which must be enforced in the model.
16195      * </pre>
16196      *
16197      * <code>
16198      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16199      * </code>
16200      */
setPrecedenceRules( int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value)16201     public Builder setPrecedenceRules(
16202         int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value) {
16203       if (precedenceRulesBuilder_ == null) {
16204         if (value == null) {
16205           throw new NullPointerException();
16206         }
16207         ensurePrecedenceRulesIsMutable();
16208         precedenceRules_.set(index, value);
16209         onChanged();
16210       } else {
16211         precedenceRulesBuilder_.setMessage(index, value);
16212       }
16213       return this;
16214     }
16215     /**
16216      *
16217      *
16218      * <pre>
16219      * Set of precedence rules which must be enforced in the model.
16220      * </pre>
16221      *
16222      * <code>
16223      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16224      * </code>
16225      */
setPrecedenceRules( int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue)16226     public Builder setPrecedenceRules(
16227         int index,
16228         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue) {
16229       if (precedenceRulesBuilder_ == null) {
16230         ensurePrecedenceRulesIsMutable();
16231         precedenceRules_.set(index, builderForValue.build());
16232         onChanged();
16233       } else {
16234         precedenceRulesBuilder_.setMessage(index, builderForValue.build());
16235       }
16236       return this;
16237     }
16238     /**
16239      *
16240      *
16241      * <pre>
16242      * Set of precedence rules which must be enforced in the model.
16243      * </pre>
16244      *
16245      * <code>
16246      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16247      * </code>
16248      */
addPrecedenceRules( com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value)16249     public Builder addPrecedenceRules(
16250         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value) {
16251       if (precedenceRulesBuilder_ == null) {
16252         if (value == null) {
16253           throw new NullPointerException();
16254         }
16255         ensurePrecedenceRulesIsMutable();
16256         precedenceRules_.add(value);
16257         onChanged();
16258       } else {
16259         precedenceRulesBuilder_.addMessage(value);
16260       }
16261       return this;
16262     }
16263     /**
16264      *
16265      *
16266      * <pre>
16267      * Set of precedence rules which must be enforced in the model.
16268      * </pre>
16269      *
16270      * <code>
16271      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16272      * </code>
16273      */
addPrecedenceRules( int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value)16274     public Builder addPrecedenceRules(
16275         int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule value) {
16276       if (precedenceRulesBuilder_ == null) {
16277         if (value == null) {
16278           throw new NullPointerException();
16279         }
16280         ensurePrecedenceRulesIsMutable();
16281         precedenceRules_.add(index, value);
16282         onChanged();
16283       } else {
16284         precedenceRulesBuilder_.addMessage(index, value);
16285       }
16286       return this;
16287     }
16288     /**
16289      *
16290      *
16291      * <pre>
16292      * Set of precedence rules which must be enforced in the model.
16293      * </pre>
16294      *
16295      * <code>
16296      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16297      * </code>
16298      */
addPrecedenceRules( com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue)16299     public Builder addPrecedenceRules(
16300         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue) {
16301       if (precedenceRulesBuilder_ == null) {
16302         ensurePrecedenceRulesIsMutable();
16303         precedenceRules_.add(builderForValue.build());
16304         onChanged();
16305       } else {
16306         precedenceRulesBuilder_.addMessage(builderForValue.build());
16307       }
16308       return this;
16309     }
16310     /**
16311      *
16312      *
16313      * <pre>
16314      * Set of precedence rules which must be enforced in the model.
16315      * </pre>
16316      *
16317      * <code>
16318      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16319      * </code>
16320      */
addPrecedenceRules( int index, com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue)16321     public Builder addPrecedenceRules(
16322         int index,
16323         com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder builderForValue) {
16324       if (precedenceRulesBuilder_ == null) {
16325         ensurePrecedenceRulesIsMutable();
16326         precedenceRules_.add(index, builderForValue.build());
16327         onChanged();
16328       } else {
16329         precedenceRulesBuilder_.addMessage(index, builderForValue.build());
16330       }
16331       return this;
16332     }
16333     /**
16334      *
16335      *
16336      * <pre>
16337      * Set of precedence rules which must be enforced in the model.
16338      * </pre>
16339      *
16340      * <code>
16341      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16342      * </code>
16343      */
addAllPrecedenceRules( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule> values)16344     public Builder addAllPrecedenceRules(
16345         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule>
16346             values) {
16347       if (precedenceRulesBuilder_ == null) {
16348         ensurePrecedenceRulesIsMutable();
16349         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, precedenceRules_);
16350         onChanged();
16351       } else {
16352         precedenceRulesBuilder_.addAllMessages(values);
16353       }
16354       return this;
16355     }
16356     /**
16357      *
16358      *
16359      * <pre>
16360      * Set of precedence rules which must be enforced in the model.
16361      * </pre>
16362      *
16363      * <code>
16364      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16365      * </code>
16366      */
clearPrecedenceRules()16367     public Builder clearPrecedenceRules() {
16368       if (precedenceRulesBuilder_ == null) {
16369         precedenceRules_ = java.util.Collections.emptyList();
16370         bitField0_ = (bitField0_ & ~0x00001000);
16371         onChanged();
16372       } else {
16373         precedenceRulesBuilder_.clear();
16374       }
16375       return this;
16376     }
16377     /**
16378      *
16379      *
16380      * <pre>
16381      * Set of precedence rules which must be enforced in the model.
16382      * </pre>
16383      *
16384      * <code>
16385      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16386      * </code>
16387      */
removePrecedenceRules(int index)16388     public Builder removePrecedenceRules(int index) {
16389       if (precedenceRulesBuilder_ == null) {
16390         ensurePrecedenceRulesIsMutable();
16391         precedenceRules_.remove(index);
16392         onChanged();
16393       } else {
16394         precedenceRulesBuilder_.remove(index);
16395       }
16396       return this;
16397     }
16398     /**
16399      *
16400      *
16401      * <pre>
16402      * Set of precedence rules which must be enforced in the model.
16403      * </pre>
16404      *
16405      * <code>
16406      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16407      * </code>
16408      */
16409     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder
getPrecedenceRulesBuilder(int index)16410         getPrecedenceRulesBuilder(int index) {
16411       return getPrecedenceRulesFieldBuilder().getBuilder(index);
16412     }
16413     /**
16414      *
16415      *
16416      * <pre>
16417      * Set of precedence rules which must be enforced in the model.
16418      * </pre>
16419      *
16420      * <code>
16421      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16422      * </code>
16423      */
16424     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder
getPrecedenceRulesOrBuilder(int index)16425         getPrecedenceRulesOrBuilder(int index) {
16426       if (precedenceRulesBuilder_ == null) {
16427         return precedenceRules_.get(index);
16428       } else {
16429         return precedenceRulesBuilder_.getMessageOrBuilder(index);
16430       }
16431     }
16432     /**
16433      *
16434      *
16435      * <pre>
16436      * Set of precedence rules which must be enforced in the model.
16437      * </pre>
16438      *
16439      * <code>
16440      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16441      * </code>
16442      */
16443     public java.util.List<
16444             ? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>
getPrecedenceRulesOrBuilderList()16445         getPrecedenceRulesOrBuilderList() {
16446       if (precedenceRulesBuilder_ != null) {
16447         return precedenceRulesBuilder_.getMessageOrBuilderList();
16448       } else {
16449         return java.util.Collections.unmodifiableList(precedenceRules_);
16450       }
16451     }
16452     /**
16453      *
16454      *
16455      * <pre>
16456      * Set of precedence rules which must be enforced in the model.
16457      * </pre>
16458      *
16459      * <code>
16460      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16461      * </code>
16462      */
16463     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder
addPrecedenceRulesBuilder()16464         addPrecedenceRulesBuilder() {
16465       return getPrecedenceRulesFieldBuilder()
16466           .addBuilder(
16467               com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.getDefaultInstance());
16468     }
16469     /**
16470      *
16471      *
16472      * <pre>
16473      * Set of precedence rules which must be enforced in the model.
16474      * </pre>
16475      *
16476      * <code>
16477      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16478      * </code>
16479      */
16480     public com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder
addPrecedenceRulesBuilder(int index)16481         addPrecedenceRulesBuilder(int index) {
16482       return getPrecedenceRulesFieldBuilder()
16483           .addBuilder(
16484               index,
16485               com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.getDefaultInstance());
16486     }
16487     /**
16488      *
16489      *
16490      * <pre>
16491      * Set of precedence rules which must be enforced in the model.
16492      * </pre>
16493      *
16494      * <code>
16495      * repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
16496      * </code>
16497      */
16498     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder>
getPrecedenceRulesBuilderList()16499         getPrecedenceRulesBuilderList() {
16500       return getPrecedenceRulesFieldBuilder().getBuilderList();
16501     }
16502 
16503     private com.google.protobuf.RepeatedFieldBuilderV3<
16504             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule,
16505             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder,
16506             com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>
getPrecedenceRulesFieldBuilder()16507         getPrecedenceRulesFieldBuilder() {
16508       if (precedenceRulesBuilder_ == null) {
16509         precedenceRulesBuilder_ =
16510             new com.google.protobuf.RepeatedFieldBuilderV3<
16511                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule,
16512                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRule.Builder,
16513                 com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>(
16514                 precedenceRules_,
16515                 ((bitField0_ & 0x00001000) != 0),
16516                 getParentForChildren(),
16517                 isClean());
16518         precedenceRules_ = null;
16519       }
16520       return precedenceRulesBuilder_;
16521     }
16522 
16523     private java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule> breakRules_ =
16524         java.util.Collections.emptyList();
16525 
ensureBreakRulesIsMutable()16526     private void ensureBreakRulesIsMutable() {
16527       if (!((bitField0_ & 0x00002000) != 0)) {
16528         breakRules_ =
16529             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentModel.BreakRule>(
16530                 breakRules_);
16531         bitField0_ |= 0x00002000;
16532       }
16533     }
16534 
16535     private com.google.protobuf.RepeatedFieldBuilderV3<
16536             com.google.cloud.optimization.v1.ShipmentModel.BreakRule,
16537             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder,
16538             com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>
16539         breakRulesBuilder_;
16540 
16541     /**
16542      *
16543      *
16544      * <pre>
16545      * Deprecated: No longer used.
16546      * Set of break rules used in the model.
16547      * Each vehicle specifies the `BreakRule` that applies to it via the
16548      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16549      * field (which must be a singleton).
16550      * </pre>
16551      *
16552      * <code>
16553      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16554      * </code>
16555      */
16556     @java.lang.Deprecated
16557     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule>
getBreakRulesList()16558         getBreakRulesList() {
16559       if (breakRulesBuilder_ == null) {
16560         return java.util.Collections.unmodifiableList(breakRules_);
16561       } else {
16562         return breakRulesBuilder_.getMessageList();
16563       }
16564     }
16565     /**
16566      *
16567      *
16568      * <pre>
16569      * Deprecated: No longer used.
16570      * Set of break rules used in the model.
16571      * Each vehicle specifies the `BreakRule` that applies to it via the
16572      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16573      * field (which must be a singleton).
16574      * </pre>
16575      *
16576      * <code>
16577      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16578      * </code>
16579      */
16580     @java.lang.Deprecated
getBreakRulesCount()16581     public int getBreakRulesCount() {
16582       if (breakRulesBuilder_ == null) {
16583         return breakRules_.size();
16584       } else {
16585         return breakRulesBuilder_.getCount();
16586       }
16587     }
16588     /**
16589      *
16590      *
16591      * <pre>
16592      * Deprecated: No longer used.
16593      * Set of break rules used in the model.
16594      * Each vehicle specifies the `BreakRule` that applies to it via the
16595      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16596      * field (which must be a singleton).
16597      * </pre>
16598      *
16599      * <code>
16600      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16601      * </code>
16602      */
16603     @java.lang.Deprecated
getBreakRules(int index)16604     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule getBreakRules(int index) {
16605       if (breakRulesBuilder_ == null) {
16606         return breakRules_.get(index);
16607       } else {
16608         return breakRulesBuilder_.getMessage(index);
16609       }
16610     }
16611     /**
16612      *
16613      *
16614      * <pre>
16615      * Deprecated: No longer used.
16616      * Set of break rules used in the model.
16617      * Each vehicle specifies the `BreakRule` that applies to it via the
16618      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16619      * field (which must be a singleton).
16620      * </pre>
16621      *
16622      * <code>
16623      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16624      * </code>
16625      */
16626     @java.lang.Deprecated
setBreakRules( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule value)16627     public Builder setBreakRules(
16628         int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule value) {
16629       if (breakRulesBuilder_ == null) {
16630         if (value == null) {
16631           throw new NullPointerException();
16632         }
16633         ensureBreakRulesIsMutable();
16634         breakRules_.set(index, value);
16635         onChanged();
16636       } else {
16637         breakRulesBuilder_.setMessage(index, value);
16638       }
16639       return this;
16640     }
16641     /**
16642      *
16643      *
16644      * <pre>
16645      * Deprecated: No longer used.
16646      * Set of break rules used in the model.
16647      * Each vehicle specifies the `BreakRule` that applies to it via the
16648      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16649      * field (which must be a singleton).
16650      * </pre>
16651      *
16652      * <code>
16653      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16654      * </code>
16655      */
16656     @java.lang.Deprecated
setBreakRules( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue)16657     public Builder setBreakRules(
16658         int index,
16659         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue) {
16660       if (breakRulesBuilder_ == null) {
16661         ensureBreakRulesIsMutable();
16662         breakRules_.set(index, builderForValue.build());
16663         onChanged();
16664       } else {
16665         breakRulesBuilder_.setMessage(index, builderForValue.build());
16666       }
16667       return this;
16668     }
16669     /**
16670      *
16671      *
16672      * <pre>
16673      * Deprecated: No longer used.
16674      * Set of break rules used in the model.
16675      * Each vehicle specifies the `BreakRule` that applies to it via the
16676      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16677      * field (which must be a singleton).
16678      * </pre>
16679      *
16680      * <code>
16681      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16682      * </code>
16683      */
16684     @java.lang.Deprecated
addBreakRules(com.google.cloud.optimization.v1.ShipmentModel.BreakRule value)16685     public Builder addBreakRules(com.google.cloud.optimization.v1.ShipmentModel.BreakRule value) {
16686       if (breakRulesBuilder_ == null) {
16687         if (value == null) {
16688           throw new NullPointerException();
16689         }
16690         ensureBreakRulesIsMutable();
16691         breakRules_.add(value);
16692         onChanged();
16693       } else {
16694         breakRulesBuilder_.addMessage(value);
16695       }
16696       return this;
16697     }
16698     /**
16699      *
16700      *
16701      * <pre>
16702      * Deprecated: No longer used.
16703      * Set of break rules used in the model.
16704      * Each vehicle specifies the `BreakRule` that applies to it via the
16705      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16706      * field (which must be a singleton).
16707      * </pre>
16708      *
16709      * <code>
16710      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16711      * </code>
16712      */
16713     @java.lang.Deprecated
addBreakRules( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule value)16714     public Builder addBreakRules(
16715         int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule value) {
16716       if (breakRulesBuilder_ == null) {
16717         if (value == null) {
16718           throw new NullPointerException();
16719         }
16720         ensureBreakRulesIsMutable();
16721         breakRules_.add(index, value);
16722         onChanged();
16723       } else {
16724         breakRulesBuilder_.addMessage(index, value);
16725       }
16726       return this;
16727     }
16728     /**
16729      *
16730      *
16731      * <pre>
16732      * Deprecated: No longer used.
16733      * Set of break rules used in the model.
16734      * Each vehicle specifies the `BreakRule` that applies to it via the
16735      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16736      * field (which must be a singleton).
16737      * </pre>
16738      *
16739      * <code>
16740      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16741      * </code>
16742      */
16743     @java.lang.Deprecated
addBreakRules( com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue)16744     public Builder addBreakRules(
16745         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue) {
16746       if (breakRulesBuilder_ == null) {
16747         ensureBreakRulesIsMutable();
16748         breakRules_.add(builderForValue.build());
16749         onChanged();
16750       } else {
16751         breakRulesBuilder_.addMessage(builderForValue.build());
16752       }
16753       return this;
16754     }
16755     /**
16756      *
16757      *
16758      * <pre>
16759      * Deprecated: No longer used.
16760      * Set of break rules used in the model.
16761      * Each vehicle specifies the `BreakRule` that applies to it via the
16762      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16763      * field (which must be a singleton).
16764      * </pre>
16765      *
16766      * <code>
16767      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16768      * </code>
16769      */
16770     @java.lang.Deprecated
addBreakRules( int index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue)16771     public Builder addBreakRules(
16772         int index,
16773         com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder builderForValue) {
16774       if (breakRulesBuilder_ == null) {
16775         ensureBreakRulesIsMutable();
16776         breakRules_.add(index, builderForValue.build());
16777         onChanged();
16778       } else {
16779         breakRulesBuilder_.addMessage(index, builderForValue.build());
16780       }
16781       return this;
16782     }
16783     /**
16784      *
16785      *
16786      * <pre>
16787      * Deprecated: No longer used.
16788      * Set of break rules used in the model.
16789      * Each vehicle specifies the `BreakRule` that applies to it via the
16790      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16791      * field (which must be a singleton).
16792      * </pre>
16793      *
16794      * <code>
16795      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16796      * </code>
16797      */
16798     @java.lang.Deprecated
addAllBreakRules( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRule> values)16799     public Builder addAllBreakRules(
16800         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRule>
16801             values) {
16802       if (breakRulesBuilder_ == null) {
16803         ensureBreakRulesIsMutable();
16804         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, breakRules_);
16805         onChanged();
16806       } else {
16807         breakRulesBuilder_.addAllMessages(values);
16808       }
16809       return this;
16810     }
16811     /**
16812      *
16813      *
16814      * <pre>
16815      * Deprecated: No longer used.
16816      * Set of break rules used in the model.
16817      * Each vehicle specifies the `BreakRule` that applies to it via the
16818      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16819      * field (which must be a singleton).
16820      * </pre>
16821      *
16822      * <code>
16823      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16824      * </code>
16825      */
16826     @java.lang.Deprecated
clearBreakRules()16827     public Builder clearBreakRules() {
16828       if (breakRulesBuilder_ == null) {
16829         breakRules_ = java.util.Collections.emptyList();
16830         bitField0_ = (bitField0_ & ~0x00002000);
16831         onChanged();
16832       } else {
16833         breakRulesBuilder_.clear();
16834       }
16835       return this;
16836     }
16837     /**
16838      *
16839      *
16840      * <pre>
16841      * Deprecated: No longer used.
16842      * Set of break rules used in the model.
16843      * Each vehicle specifies the `BreakRule` that applies to it via the
16844      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16845      * field (which must be a singleton).
16846      * </pre>
16847      *
16848      * <code>
16849      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16850      * </code>
16851      */
16852     @java.lang.Deprecated
removeBreakRules(int index)16853     public Builder removeBreakRules(int index) {
16854       if (breakRulesBuilder_ == null) {
16855         ensureBreakRulesIsMutable();
16856         breakRules_.remove(index);
16857         onChanged();
16858       } else {
16859         breakRulesBuilder_.remove(index);
16860       }
16861       return this;
16862     }
16863     /**
16864      *
16865      *
16866      * <pre>
16867      * Deprecated: No longer used.
16868      * Set of break rules used in the model.
16869      * Each vehicle specifies the `BreakRule` that applies to it via the
16870      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16871      * field (which must be a singleton).
16872      * </pre>
16873      *
16874      * <code>
16875      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16876      * </code>
16877      */
16878     @java.lang.Deprecated
getBreakRulesBuilder( int index)16879     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder getBreakRulesBuilder(
16880         int index) {
16881       return getBreakRulesFieldBuilder().getBuilder(index);
16882     }
16883     /**
16884      *
16885      *
16886      * <pre>
16887      * Deprecated: No longer used.
16888      * Set of break rules used in the model.
16889      * Each vehicle specifies the `BreakRule` that applies to it via the
16890      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16891      * field (which must be a singleton).
16892      * </pre>
16893      *
16894      * <code>
16895      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16896      * </code>
16897      */
16898     @java.lang.Deprecated
getBreakRulesOrBuilder( int index)16899     public com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder getBreakRulesOrBuilder(
16900         int index) {
16901       if (breakRulesBuilder_ == null) {
16902         return breakRules_.get(index);
16903       } else {
16904         return breakRulesBuilder_.getMessageOrBuilder(index);
16905       }
16906     }
16907     /**
16908      *
16909      *
16910      * <pre>
16911      * Deprecated: No longer used.
16912      * Set of break rules used in the model.
16913      * Each vehicle specifies the `BreakRule` that applies to it via the
16914      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16915      * field (which must be a singleton).
16916      * </pre>
16917      *
16918      * <code>
16919      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16920      * </code>
16921      */
16922     @java.lang.Deprecated
16923     public java.util.List<
16924             ? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>
getBreakRulesOrBuilderList()16925         getBreakRulesOrBuilderList() {
16926       if (breakRulesBuilder_ != null) {
16927         return breakRulesBuilder_.getMessageOrBuilderList();
16928       } else {
16929         return java.util.Collections.unmodifiableList(breakRules_);
16930       }
16931     }
16932     /**
16933      *
16934      *
16935      * <pre>
16936      * Deprecated: No longer used.
16937      * Set of break rules used in the model.
16938      * Each vehicle specifies the `BreakRule` that applies to it via the
16939      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16940      * field (which must be a singleton).
16941      * </pre>
16942      *
16943      * <code>
16944      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16945      * </code>
16946      */
16947     @java.lang.Deprecated
addBreakRulesBuilder()16948     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder addBreakRulesBuilder() {
16949       return getBreakRulesFieldBuilder()
16950           .addBuilder(
16951               com.google.cloud.optimization.v1.ShipmentModel.BreakRule.getDefaultInstance());
16952     }
16953     /**
16954      *
16955      *
16956      * <pre>
16957      * Deprecated: No longer used.
16958      * Set of break rules used in the model.
16959      * Each vehicle specifies the `BreakRule` that applies to it via the
16960      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16961      * field (which must be a singleton).
16962      * </pre>
16963      *
16964      * <code>
16965      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16966      * </code>
16967      */
16968     @java.lang.Deprecated
addBreakRulesBuilder( int index)16969     public com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder addBreakRulesBuilder(
16970         int index) {
16971       return getBreakRulesFieldBuilder()
16972           .addBuilder(
16973               index, com.google.cloud.optimization.v1.ShipmentModel.BreakRule.getDefaultInstance());
16974     }
16975     /**
16976      *
16977      *
16978      * <pre>
16979      * Deprecated: No longer used.
16980      * Set of break rules used in the model.
16981      * Each vehicle specifies the `BreakRule` that applies to it via the
16982      * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices]
16983      * field (which must be a singleton).
16984      * </pre>
16985      *
16986      * <code>
16987      * repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];
16988      * </code>
16989      */
16990     @java.lang.Deprecated
16991     public java.util.List<com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder>
getBreakRulesBuilderList()16992         getBreakRulesBuilderList() {
16993       return getBreakRulesFieldBuilder().getBuilderList();
16994     }
16995 
16996     private com.google.protobuf.RepeatedFieldBuilderV3<
16997             com.google.cloud.optimization.v1.ShipmentModel.BreakRule,
16998             com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder,
16999             com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>
getBreakRulesFieldBuilder()17000         getBreakRulesFieldBuilder() {
17001       if (breakRulesBuilder_ == null) {
17002         breakRulesBuilder_ =
17003             new com.google.protobuf.RepeatedFieldBuilderV3<
17004                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule,
17005                 com.google.cloud.optimization.v1.ShipmentModel.BreakRule.Builder,
17006                 com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>(
17007                 breakRules_, ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean());
17008         breakRules_ = null;
17009       }
17010       return breakRulesBuilder_;
17011     }
17012 
17013     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)17014     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
17015       return super.setUnknownFields(unknownFields);
17016     }
17017 
17018     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)17019     public final Builder mergeUnknownFields(
17020         final com.google.protobuf.UnknownFieldSet unknownFields) {
17021       return super.mergeUnknownFields(unknownFields);
17022     }
17023 
17024     // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.ShipmentModel)
17025   }
17026 
17027   // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.ShipmentModel)
17028   private static final com.google.cloud.optimization.v1.ShipmentModel DEFAULT_INSTANCE;
17029 
17030   static {
17031     DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.ShipmentModel();
17032   }
17033 
getDefaultInstance()17034   public static com.google.cloud.optimization.v1.ShipmentModel getDefaultInstance() {
17035     return DEFAULT_INSTANCE;
17036   }
17037 
17038   private static final com.google.protobuf.Parser<ShipmentModel> PARSER =
17039       new com.google.protobuf.AbstractParser<ShipmentModel>() {
17040         @java.lang.Override
17041         public ShipmentModel parsePartialFrom(
17042             com.google.protobuf.CodedInputStream input,
17043             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
17044             throws com.google.protobuf.InvalidProtocolBufferException {
17045           Builder builder = newBuilder();
17046           try {
17047             builder.mergeFrom(input, extensionRegistry);
17048           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
17049             throw e.setUnfinishedMessage(builder.buildPartial());
17050           } catch (com.google.protobuf.UninitializedMessageException e) {
17051             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
17052           } catch (java.io.IOException e) {
17053             throw new com.google.protobuf.InvalidProtocolBufferException(e)
17054                 .setUnfinishedMessage(builder.buildPartial());
17055           }
17056           return builder.buildPartial();
17057         }
17058       };
17059 
parser()17060   public static com.google.protobuf.Parser<ShipmentModel> parser() {
17061     return PARSER;
17062   }
17063 
17064   @java.lang.Override
getParserForType()17065   public com.google.protobuf.Parser<ShipmentModel> getParserForType() {
17066     return PARSER;
17067   }
17068 
17069   @java.lang.Override
getDefaultInstanceForType()17070   public com.google.cloud.optimization.v1.ShipmentModel getDefaultInstanceForType() {
17071     return DEFAULT_INSTANCE;
17072   }
17073 }
17074