• 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  * Request to be given to a tour optimization solver which defines the
26  * shipment model to solve as well as optimization parameters.
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.optimization.v1.OptimizeToursRequest}
30  */
31 public final class OptimizeToursRequest extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.optimization.v1.OptimizeToursRequest)
34     OptimizeToursRequestOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use OptimizeToursRequest.newBuilder() to construct.
OptimizeToursRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private OptimizeToursRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
OptimizeToursRequest()41   private OptimizeToursRequest() {
42     parent_ = "";
43     solvingMode_ = 0;
44     searchMode_ = 0;
45     injectedFirstSolutionRoutes_ = java.util.Collections.emptyList();
46     refreshDetailsRoutes_ = java.util.Collections.emptyList();
47     label_ = "";
48   }
49 
50   @java.lang.Override
51   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)52   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
53     return new OptimizeToursRequest();
54   }
55 
56   @java.lang.Override
getUnknownFields()57   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
58     return this.unknownFields;
59   }
60 
getDescriptor()61   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
62     return com.google.cloud.optimization.v1.FleetRoutingProto
63         .internal_static_google_cloud_optimization_v1_OptimizeToursRequest_descriptor;
64   }
65 
66   @java.lang.Override
67   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()68       internalGetFieldAccessorTable() {
69     return com.google.cloud.optimization.v1.FleetRoutingProto
70         .internal_static_google_cloud_optimization_v1_OptimizeToursRequest_fieldAccessorTable
71         .ensureFieldAccessorsInitialized(
72             com.google.cloud.optimization.v1.OptimizeToursRequest.class,
73             com.google.cloud.optimization.v1.OptimizeToursRequest.Builder.class);
74   }
75 
76   /**
77    *
78    *
79    * <pre>
80    * Defines how the solver should handle the request. In all modes but
81    * `VALIDATE_ONLY`, if the request is invalid, you will receive an
82    * `INVALID_REQUEST` error. See
83    * [max_validation_errors][google.cloud.optimization.v1.OptimizeToursRequest.max_validation_errors]
84    * to cap the number of errors returned.
85    * </pre>
86    *
87    * Protobuf enum {@code google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode}
88    */
89   public enum SolvingMode implements com.google.protobuf.ProtocolMessageEnum {
90     /**
91      *
92      *
93      * <pre>
94      * Solve the model.
95      * </pre>
96      *
97      * <code>DEFAULT_SOLVE = 0;</code>
98      */
99     DEFAULT_SOLVE(0),
100     /**
101      *
102      *
103      * <pre>
104      * Only validates the model without solving it: populates as many
105      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
106      * as possible.
107      * </pre>
108      *
109      * <code>VALIDATE_ONLY = 1;</code>
110      */
111     VALIDATE_ONLY(1),
112     /**
113      *
114      *
115      * <pre>
116      * Only populates
117      * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments],
118      * and doesn't actually solve the rest of the request (`status` and `routes`
119      * are unset in the response).
120      * *IMPORTANT*: not all infeasible shipments are returned here, but only the
121      * ones that are detected as infeasible as a preprocessing.
122      * </pre>
123      *
124      * <code>DETECT_SOME_INFEASIBLE_SHIPMENTS = 2;</code>
125      */
126     DETECT_SOME_INFEASIBLE_SHIPMENTS(2),
127     UNRECOGNIZED(-1),
128     ;
129 
130     /**
131      *
132      *
133      * <pre>
134      * Solve the model.
135      * </pre>
136      *
137      * <code>DEFAULT_SOLVE = 0;</code>
138      */
139     public static final int DEFAULT_SOLVE_VALUE = 0;
140     /**
141      *
142      *
143      * <pre>
144      * Only validates the model without solving it: populates as many
145      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
146      * as possible.
147      * </pre>
148      *
149      * <code>VALIDATE_ONLY = 1;</code>
150      */
151     public static final int VALIDATE_ONLY_VALUE = 1;
152     /**
153      *
154      *
155      * <pre>
156      * Only populates
157      * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments],
158      * and doesn't actually solve the rest of the request (`status` and `routes`
159      * are unset in the response).
160      * *IMPORTANT*: not all infeasible shipments are returned here, but only the
161      * ones that are detected as infeasible as a preprocessing.
162      * </pre>
163      *
164      * <code>DETECT_SOME_INFEASIBLE_SHIPMENTS = 2;</code>
165      */
166     public static final int DETECT_SOME_INFEASIBLE_SHIPMENTS_VALUE = 2;
167 
getNumber()168     public final int getNumber() {
169       if (this == UNRECOGNIZED) {
170         throw new java.lang.IllegalArgumentException(
171             "Can't get the number of an unknown enum value.");
172       }
173       return value;
174     }
175 
176     /**
177      * @param value The numeric wire value of the corresponding enum entry.
178      * @return The enum associated with the given numeric wire value.
179      * @deprecated Use {@link #forNumber(int)} instead.
180      */
181     @java.lang.Deprecated
valueOf(int value)182     public static SolvingMode valueOf(int value) {
183       return forNumber(value);
184     }
185 
186     /**
187      * @param value The numeric wire value of the corresponding enum entry.
188      * @return The enum associated with the given numeric wire value.
189      */
forNumber(int value)190     public static SolvingMode forNumber(int value) {
191       switch (value) {
192         case 0:
193           return DEFAULT_SOLVE;
194         case 1:
195           return VALIDATE_ONLY;
196         case 2:
197           return DETECT_SOME_INFEASIBLE_SHIPMENTS;
198         default:
199           return null;
200       }
201     }
202 
internalGetValueMap()203     public static com.google.protobuf.Internal.EnumLiteMap<SolvingMode> internalGetValueMap() {
204       return internalValueMap;
205     }
206 
207     private static final com.google.protobuf.Internal.EnumLiteMap<SolvingMode> internalValueMap =
208         new com.google.protobuf.Internal.EnumLiteMap<SolvingMode>() {
209           public SolvingMode findValueByNumber(int number) {
210             return SolvingMode.forNumber(number);
211           }
212         };
213 
getValueDescriptor()214     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
215       if (this == UNRECOGNIZED) {
216         throw new java.lang.IllegalStateException(
217             "Can't get the descriptor of an unrecognized enum value.");
218       }
219       return getDescriptor().getValues().get(ordinal());
220     }
221 
getDescriptorForType()222     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
223       return getDescriptor();
224     }
225 
getDescriptor()226     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
227       return com.google.cloud.optimization.v1.OptimizeToursRequest.getDescriptor()
228           .getEnumTypes()
229           .get(0);
230     }
231 
232     private static final SolvingMode[] VALUES = values();
233 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)234     public static SolvingMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
235       if (desc.getType() != getDescriptor()) {
236         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
237       }
238       if (desc.getIndex() == -1) {
239         return UNRECOGNIZED;
240       }
241       return VALUES[desc.getIndex()];
242     }
243 
244     private final int value;
245 
SolvingMode(int value)246     private SolvingMode(int value) {
247       this.value = value;
248     }
249 
250     // @@protoc_insertion_point(enum_scope:google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode)
251   }
252 
253   /**
254    *
255    *
256    * <pre>
257    * Mode defining the behavior of the search, trading off latency versus
258    * solution quality. In all modes, the global request deadline is enforced.
259    * </pre>
260    *
261    * Protobuf enum {@code google.cloud.optimization.v1.OptimizeToursRequest.SearchMode}
262    */
263   public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum {
264     /**
265      *
266      *
267      * <pre>
268      * Unspecified search mode, equivalent to `RETURN_FAST`.
269      * </pre>
270      *
271      * <code>SEARCH_MODE_UNSPECIFIED = 0;</code>
272      */
273     SEARCH_MODE_UNSPECIFIED(0),
274     /**
275      *
276      *
277      * <pre>
278      * Stop the search after finding the first good solution.
279      * </pre>
280      *
281      * <code>RETURN_FAST = 1;</code>
282      */
283     RETURN_FAST(1),
284     /**
285      *
286      *
287      * <pre>
288      * Spend all the available time to search for better solutions.
289      * </pre>
290      *
291      * <code>CONSUME_ALL_AVAILABLE_TIME = 2;</code>
292      */
293     CONSUME_ALL_AVAILABLE_TIME(2),
294     UNRECOGNIZED(-1),
295     ;
296 
297     /**
298      *
299      *
300      * <pre>
301      * Unspecified search mode, equivalent to `RETURN_FAST`.
302      * </pre>
303      *
304      * <code>SEARCH_MODE_UNSPECIFIED = 0;</code>
305      */
306     public static final int SEARCH_MODE_UNSPECIFIED_VALUE = 0;
307     /**
308      *
309      *
310      * <pre>
311      * Stop the search after finding the first good solution.
312      * </pre>
313      *
314      * <code>RETURN_FAST = 1;</code>
315      */
316     public static final int RETURN_FAST_VALUE = 1;
317     /**
318      *
319      *
320      * <pre>
321      * Spend all the available time to search for better solutions.
322      * </pre>
323      *
324      * <code>CONSUME_ALL_AVAILABLE_TIME = 2;</code>
325      */
326     public static final int CONSUME_ALL_AVAILABLE_TIME_VALUE = 2;
327 
getNumber()328     public final int getNumber() {
329       if (this == UNRECOGNIZED) {
330         throw new java.lang.IllegalArgumentException(
331             "Can't get the number of an unknown enum value.");
332       }
333       return value;
334     }
335 
336     /**
337      * @param value The numeric wire value of the corresponding enum entry.
338      * @return The enum associated with the given numeric wire value.
339      * @deprecated Use {@link #forNumber(int)} instead.
340      */
341     @java.lang.Deprecated
valueOf(int value)342     public static SearchMode valueOf(int value) {
343       return forNumber(value);
344     }
345 
346     /**
347      * @param value The numeric wire value of the corresponding enum entry.
348      * @return The enum associated with the given numeric wire value.
349      */
forNumber(int value)350     public static SearchMode forNumber(int value) {
351       switch (value) {
352         case 0:
353           return SEARCH_MODE_UNSPECIFIED;
354         case 1:
355           return RETURN_FAST;
356         case 2:
357           return CONSUME_ALL_AVAILABLE_TIME;
358         default:
359           return null;
360       }
361     }
362 
internalGetValueMap()363     public static com.google.protobuf.Internal.EnumLiteMap<SearchMode> internalGetValueMap() {
364       return internalValueMap;
365     }
366 
367     private static final com.google.protobuf.Internal.EnumLiteMap<SearchMode> internalValueMap =
368         new com.google.protobuf.Internal.EnumLiteMap<SearchMode>() {
369           public SearchMode findValueByNumber(int number) {
370             return SearchMode.forNumber(number);
371           }
372         };
373 
getValueDescriptor()374     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
375       if (this == UNRECOGNIZED) {
376         throw new java.lang.IllegalStateException(
377             "Can't get the descriptor of an unrecognized enum value.");
378       }
379       return getDescriptor().getValues().get(ordinal());
380     }
381 
getDescriptorForType()382     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
383       return getDescriptor();
384     }
385 
getDescriptor()386     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
387       return com.google.cloud.optimization.v1.OptimizeToursRequest.getDescriptor()
388           .getEnumTypes()
389           .get(1);
390     }
391 
392     private static final SearchMode[] VALUES = values();
393 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)394     public static SearchMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
395       if (desc.getType() != getDescriptor()) {
396         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
397       }
398       if (desc.getIndex() == -1) {
399         return UNRECOGNIZED;
400       }
401       return VALUES[desc.getIndex()];
402     }
403 
404     private final int value;
405 
SearchMode(int value)406     private SearchMode(int value) {
407       this.value = value;
408     }
409 
410     // @@protoc_insertion_point(enum_scope:google.cloud.optimization.v1.OptimizeToursRequest.SearchMode)
411   }
412 
413   private int bitField0_;
414   public static final int PARENT_FIELD_NUMBER = 1;
415 
416   @SuppressWarnings("serial")
417   private volatile java.lang.Object parent_ = "";
418   /**
419    *
420    *
421    * <pre>
422    * Required. Target project and location to make a call.
423    * Format: `projects/{project-id}/locations/{location-id}`.
424    * If no location is specified, a region will be chosen automatically.
425    * </pre>
426    *
427    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
428    *
429    * @return The parent.
430    */
431   @java.lang.Override
getParent()432   public java.lang.String getParent() {
433     java.lang.Object ref = parent_;
434     if (ref instanceof java.lang.String) {
435       return (java.lang.String) ref;
436     } else {
437       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
438       java.lang.String s = bs.toStringUtf8();
439       parent_ = s;
440       return s;
441     }
442   }
443   /**
444    *
445    *
446    * <pre>
447    * Required. Target project and location to make a call.
448    * Format: `projects/{project-id}/locations/{location-id}`.
449    * If no location is specified, a region will be chosen automatically.
450    * </pre>
451    *
452    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
453    *
454    * @return The bytes for parent.
455    */
456   @java.lang.Override
getParentBytes()457   public com.google.protobuf.ByteString getParentBytes() {
458     java.lang.Object ref = parent_;
459     if (ref instanceof java.lang.String) {
460       com.google.protobuf.ByteString b =
461           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
462       parent_ = b;
463       return b;
464     } else {
465       return (com.google.protobuf.ByteString) ref;
466     }
467   }
468 
469   public static final int TIMEOUT_FIELD_NUMBER = 2;
470   private com.google.protobuf.Duration timeout_;
471   /**
472    *
473    *
474    * <pre>
475    * If this timeout is set, the server returns a response before the timeout
476    * period has elapsed or the server deadline for synchronous requests is
477    * reached, whichever is sooner.
478    * For asynchronous requests, the server will generate a solution (if
479    * possible) before the timeout has elapsed.
480    * </pre>
481    *
482    * <code>.google.protobuf.Duration timeout = 2;</code>
483    *
484    * @return Whether the timeout field is set.
485    */
486   @java.lang.Override
hasTimeout()487   public boolean hasTimeout() {
488     return timeout_ != null;
489   }
490   /**
491    *
492    *
493    * <pre>
494    * If this timeout is set, the server returns a response before the timeout
495    * period has elapsed or the server deadline for synchronous requests is
496    * reached, whichever is sooner.
497    * For asynchronous requests, the server will generate a solution (if
498    * possible) before the timeout has elapsed.
499    * </pre>
500    *
501    * <code>.google.protobuf.Duration timeout = 2;</code>
502    *
503    * @return The timeout.
504    */
505   @java.lang.Override
getTimeout()506   public com.google.protobuf.Duration getTimeout() {
507     return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
508   }
509   /**
510    *
511    *
512    * <pre>
513    * If this timeout is set, the server returns a response before the timeout
514    * period has elapsed or the server deadline for synchronous requests is
515    * reached, whichever is sooner.
516    * For asynchronous requests, the server will generate a solution (if
517    * possible) before the timeout has elapsed.
518    * </pre>
519    *
520    * <code>.google.protobuf.Duration timeout = 2;</code>
521    */
522   @java.lang.Override
getTimeoutOrBuilder()523   public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
524     return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
525   }
526 
527   public static final int MODEL_FIELD_NUMBER = 3;
528   private com.google.cloud.optimization.v1.ShipmentModel model_;
529   /**
530    *
531    *
532    * <pre>
533    * Shipment model to solve.
534    * </pre>
535    *
536    * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
537    *
538    * @return Whether the model field is set.
539    */
540   @java.lang.Override
hasModel()541   public boolean hasModel() {
542     return model_ != null;
543   }
544   /**
545    *
546    *
547    * <pre>
548    * Shipment model to solve.
549    * </pre>
550    *
551    * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
552    *
553    * @return The model.
554    */
555   @java.lang.Override
getModel()556   public com.google.cloud.optimization.v1.ShipmentModel getModel() {
557     return model_ == null
558         ? com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()
559         : model_;
560   }
561   /**
562    *
563    *
564    * <pre>
565    * Shipment model to solve.
566    * </pre>
567    *
568    * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
569    */
570   @java.lang.Override
getModelOrBuilder()571   public com.google.cloud.optimization.v1.ShipmentModelOrBuilder getModelOrBuilder() {
572     return model_ == null
573         ? com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()
574         : model_;
575   }
576 
577   public static final int SOLVING_MODE_FIELD_NUMBER = 4;
578   private int solvingMode_ = 0;
579   /**
580    *
581    *
582    * <pre>
583    * By default, the solving mode is `DEFAULT_SOLVE` (0).
584    * </pre>
585    *
586    * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
587    *
588    * @return The enum numeric value on the wire for solvingMode.
589    */
590   @java.lang.Override
getSolvingModeValue()591   public int getSolvingModeValue() {
592     return solvingMode_;
593   }
594   /**
595    *
596    *
597    * <pre>
598    * By default, the solving mode is `DEFAULT_SOLVE` (0).
599    * </pre>
600    *
601    * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
602    *
603    * @return The solvingMode.
604    */
605   @java.lang.Override
getSolvingMode()606   public com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode getSolvingMode() {
607     com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode result =
608         com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.forNumber(solvingMode_);
609     return result == null
610         ? com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.UNRECOGNIZED
611         : result;
612   }
613 
614   public static final int MAX_VALIDATION_ERRORS_FIELD_NUMBER = 5;
615   private int maxValidationErrors_ = 0;
616   /**
617    *
618    *
619    * <pre>
620    * Truncates the number of validation errors returned. These errors are
621    * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
622    * error detail (https://cloud.google.com/apis/design/errors#error_details),
623    * unless solving_mode=VALIDATE_ONLY: see the
624    * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
625    * field.
626    * This defaults to 100 and is capped at 10,000.
627    * </pre>
628    *
629    * <code>optional int32 max_validation_errors = 5;</code>
630    *
631    * @return Whether the maxValidationErrors field is set.
632    */
633   @java.lang.Override
hasMaxValidationErrors()634   public boolean hasMaxValidationErrors() {
635     return ((bitField0_ & 0x00000001) != 0);
636   }
637   /**
638    *
639    *
640    * <pre>
641    * Truncates the number of validation errors returned. These errors are
642    * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
643    * error detail (https://cloud.google.com/apis/design/errors#error_details),
644    * unless solving_mode=VALIDATE_ONLY: see the
645    * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
646    * field.
647    * This defaults to 100 and is capped at 10,000.
648    * </pre>
649    *
650    * <code>optional int32 max_validation_errors = 5;</code>
651    *
652    * @return The maxValidationErrors.
653    */
654   @java.lang.Override
getMaxValidationErrors()655   public int getMaxValidationErrors() {
656     return maxValidationErrors_;
657   }
658 
659   public static final int SEARCH_MODE_FIELD_NUMBER = 6;
660   private int searchMode_ = 0;
661   /**
662    *
663    *
664    * <pre>
665    * Search mode used to solve the request.
666    * </pre>
667    *
668    * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
669    *
670    * @return The enum numeric value on the wire for searchMode.
671    */
672   @java.lang.Override
getSearchModeValue()673   public int getSearchModeValue() {
674     return searchMode_;
675   }
676   /**
677    *
678    *
679    * <pre>
680    * Search mode used to solve the request.
681    * </pre>
682    *
683    * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
684    *
685    * @return The searchMode.
686    */
687   @java.lang.Override
getSearchMode()688   public com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode getSearchMode() {
689     com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode result =
690         com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.forNumber(searchMode_);
691     return result == null
692         ? com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.UNRECOGNIZED
693         : result;
694   }
695 
696   public static final int INJECTED_FIRST_SOLUTION_ROUTES_FIELD_NUMBER = 7;
697 
698   @SuppressWarnings("serial")
699   private java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
700       injectedFirstSolutionRoutes_;
701   /**
702    *
703    *
704    * <pre>
705    * Guide the optimization algorithm in finding a first solution that is
706    * similar to a previous solution.
707    * The model is constrained when the first solution is built.
708    * Any shipments not performed on a route are implicitly skipped in the first
709    * solution, but they may be performed in successive solutions.
710    * The solution must satisfy some basic validity assumptions:
711    *   * for all routes, `vehicle_index` must be in range and not be duplicated.
712    *   * for all visits, `shipment_index` and `visit_request_index` must be
713    *     in range.
714    *   * a shipment may only be referenced on one route.
715    *   * the pickup of a pickup-delivery shipment must be performed before
716    *     the delivery.
717    *   * no more than one pickup alternative or delivery alternative of
718    *     a shipment may be performed.
719    *   * for all routes, times are increasing (i.e., `vehicle_start_time
720    *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
721    *     &lt;= vehicle_end_time`).
722    *   * a shipment may only be performed on a vehicle that is allowed. A
723    *     vehicle is allowed if
724    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
725    *     is empty or its `vehicle_index` is included in
726    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
727    * If the injected solution is not feasible, a validation error is not
728    * necessarily returned and an error indicating infeasibility may be returned
729    * instead.
730    * </pre>
731    *
732    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
733    * </code>
734    */
735   @java.lang.Override
736   public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
getInjectedFirstSolutionRoutesList()737       getInjectedFirstSolutionRoutesList() {
738     return injectedFirstSolutionRoutes_;
739   }
740   /**
741    *
742    *
743    * <pre>
744    * Guide the optimization algorithm in finding a first solution that is
745    * similar to a previous solution.
746    * The model is constrained when the first solution is built.
747    * Any shipments not performed on a route are implicitly skipped in the first
748    * solution, but they may be performed in successive solutions.
749    * The solution must satisfy some basic validity assumptions:
750    *   * for all routes, `vehicle_index` must be in range and not be duplicated.
751    *   * for all visits, `shipment_index` and `visit_request_index` must be
752    *     in range.
753    *   * a shipment may only be referenced on one route.
754    *   * the pickup of a pickup-delivery shipment must be performed before
755    *     the delivery.
756    *   * no more than one pickup alternative or delivery alternative of
757    *     a shipment may be performed.
758    *   * for all routes, times are increasing (i.e., `vehicle_start_time
759    *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
760    *     &lt;= vehicle_end_time`).
761    *   * a shipment may only be performed on a vehicle that is allowed. A
762    *     vehicle is allowed if
763    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
764    *     is empty or its `vehicle_index` is included in
765    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
766    * If the injected solution is not feasible, a validation error is not
767    * necessarily returned and an error indicating infeasibility may be returned
768    * instead.
769    * </pre>
770    *
771    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
772    * </code>
773    */
774   @java.lang.Override
775   public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getInjectedFirstSolutionRoutesOrBuilderList()776       getInjectedFirstSolutionRoutesOrBuilderList() {
777     return injectedFirstSolutionRoutes_;
778   }
779   /**
780    *
781    *
782    * <pre>
783    * Guide the optimization algorithm in finding a first solution that is
784    * similar to a previous solution.
785    * The model is constrained when the first solution is built.
786    * Any shipments not performed on a route are implicitly skipped in the first
787    * solution, but they may be performed in successive solutions.
788    * The solution must satisfy some basic validity assumptions:
789    *   * for all routes, `vehicle_index` must be in range and not be duplicated.
790    *   * for all visits, `shipment_index` and `visit_request_index` must be
791    *     in range.
792    *   * a shipment may only be referenced on one route.
793    *   * the pickup of a pickup-delivery shipment must be performed before
794    *     the delivery.
795    *   * no more than one pickup alternative or delivery alternative of
796    *     a shipment may be performed.
797    *   * for all routes, times are increasing (i.e., `vehicle_start_time
798    *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
799    *     &lt;= vehicle_end_time`).
800    *   * a shipment may only be performed on a vehicle that is allowed. A
801    *     vehicle is allowed if
802    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
803    *     is empty or its `vehicle_index` is included in
804    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
805    * If the injected solution is not feasible, a validation error is not
806    * necessarily returned and an error indicating infeasibility may be returned
807    * instead.
808    * </pre>
809    *
810    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
811    * </code>
812    */
813   @java.lang.Override
getInjectedFirstSolutionRoutesCount()814   public int getInjectedFirstSolutionRoutesCount() {
815     return injectedFirstSolutionRoutes_.size();
816   }
817   /**
818    *
819    *
820    * <pre>
821    * Guide the optimization algorithm in finding a first solution that is
822    * similar to a previous solution.
823    * The model is constrained when the first solution is built.
824    * Any shipments not performed on a route are implicitly skipped in the first
825    * solution, but they may be performed in successive solutions.
826    * The solution must satisfy some basic validity assumptions:
827    *   * for all routes, `vehicle_index` must be in range and not be duplicated.
828    *   * for all visits, `shipment_index` and `visit_request_index` must be
829    *     in range.
830    *   * a shipment may only be referenced on one route.
831    *   * the pickup of a pickup-delivery shipment must be performed before
832    *     the delivery.
833    *   * no more than one pickup alternative or delivery alternative of
834    *     a shipment may be performed.
835    *   * for all routes, times are increasing (i.e., `vehicle_start_time
836    *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
837    *     &lt;= vehicle_end_time`).
838    *   * a shipment may only be performed on a vehicle that is allowed. A
839    *     vehicle is allowed if
840    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
841    *     is empty or its `vehicle_index` is included in
842    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
843    * If the injected solution is not feasible, a validation error is not
844    * necessarily returned and an error indicating infeasibility may be returned
845    * instead.
846    * </pre>
847    *
848    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
849    * </code>
850    */
851   @java.lang.Override
getInjectedFirstSolutionRoutes(int index)852   public com.google.cloud.optimization.v1.ShipmentRoute getInjectedFirstSolutionRoutes(int index) {
853     return injectedFirstSolutionRoutes_.get(index);
854   }
855   /**
856    *
857    *
858    * <pre>
859    * Guide the optimization algorithm in finding a first solution that is
860    * similar to a previous solution.
861    * The model is constrained when the first solution is built.
862    * Any shipments not performed on a route are implicitly skipped in the first
863    * solution, but they may be performed in successive solutions.
864    * The solution must satisfy some basic validity assumptions:
865    *   * for all routes, `vehicle_index` must be in range and not be duplicated.
866    *   * for all visits, `shipment_index` and `visit_request_index` must be
867    *     in range.
868    *   * a shipment may only be referenced on one route.
869    *   * the pickup of a pickup-delivery shipment must be performed before
870    *     the delivery.
871    *   * no more than one pickup alternative or delivery alternative of
872    *     a shipment may be performed.
873    *   * for all routes, times are increasing (i.e., `vehicle_start_time
874    *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
875    *     &lt;= vehicle_end_time`).
876    *   * a shipment may only be performed on a vehicle that is allowed. A
877    *     vehicle is allowed if
878    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
879    *     is empty or its `vehicle_index` is included in
880    *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
881    * If the injected solution is not feasible, a validation error is not
882    * necessarily returned and an error indicating infeasibility may be returned
883    * instead.
884    * </pre>
885    *
886    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
887    * </code>
888    */
889   @java.lang.Override
890   public com.google.cloud.optimization.v1.ShipmentRouteOrBuilder
getInjectedFirstSolutionRoutesOrBuilder(int index)891       getInjectedFirstSolutionRoutesOrBuilder(int index) {
892     return injectedFirstSolutionRoutes_.get(index);
893   }
894 
895   public static final int INJECTED_SOLUTION_CONSTRAINT_FIELD_NUMBER = 8;
896   private com.google.cloud.optimization.v1.InjectedSolutionConstraint injectedSolutionConstraint_;
897   /**
898    *
899    *
900    * <pre>
901    * Constrain the optimization algorithm to find a final solution that is
902    * similar to a previous solution. For example, this may be used to freeze
903    * portions of routes which have already been completed or which are to be
904    * completed but must not be modified.
905    * If the injected solution is not feasible, a validation error is not
906    * necessarily returned and an error indicating infeasibility may be returned
907    * instead.
908    * </pre>
909    *
910    * <code>
911    * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
912    * </code>
913    *
914    * @return Whether the injectedSolutionConstraint field is set.
915    */
916   @java.lang.Override
hasInjectedSolutionConstraint()917   public boolean hasInjectedSolutionConstraint() {
918     return injectedSolutionConstraint_ != null;
919   }
920   /**
921    *
922    *
923    * <pre>
924    * Constrain the optimization algorithm to find a final solution that is
925    * similar to a previous solution. For example, this may be used to freeze
926    * portions of routes which have already been completed or which are to be
927    * completed but must not be modified.
928    * If the injected solution is not feasible, a validation error is not
929    * necessarily returned and an error indicating infeasibility may be returned
930    * instead.
931    * </pre>
932    *
933    * <code>
934    * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
935    * </code>
936    *
937    * @return The injectedSolutionConstraint.
938    */
939   @java.lang.Override
940   public com.google.cloud.optimization.v1.InjectedSolutionConstraint
getInjectedSolutionConstraint()941       getInjectedSolutionConstraint() {
942     return injectedSolutionConstraint_ == null
943         ? com.google.cloud.optimization.v1.InjectedSolutionConstraint.getDefaultInstance()
944         : injectedSolutionConstraint_;
945   }
946   /**
947    *
948    *
949    * <pre>
950    * Constrain the optimization algorithm to find a final solution that is
951    * similar to a previous solution. For example, this may be used to freeze
952    * portions of routes which have already been completed or which are to be
953    * completed but must not be modified.
954    * If the injected solution is not feasible, a validation error is not
955    * necessarily returned and an error indicating infeasibility may be returned
956    * instead.
957    * </pre>
958    *
959    * <code>
960    * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
961    * </code>
962    */
963   @java.lang.Override
964   public com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder
getInjectedSolutionConstraintOrBuilder()965       getInjectedSolutionConstraintOrBuilder() {
966     return injectedSolutionConstraint_ == null
967         ? com.google.cloud.optimization.v1.InjectedSolutionConstraint.getDefaultInstance()
968         : injectedSolutionConstraint_;
969   }
970 
971   public static final int REFRESH_DETAILS_ROUTES_FIELD_NUMBER = 9;
972 
973   @SuppressWarnings("serial")
974   private java.util.List<com.google.cloud.optimization.v1.ShipmentRoute> refreshDetailsRoutes_;
975   /**
976    *
977    *
978    * <pre>
979    * If non-empty, the given routes will be refreshed, without modifying their
980    * underlying sequence of visits or travel times: only other details will be
981    * updated. This does not solve the model.
982    * As of 2020/11, this only populates the polylines of non-empty routes and
983    * requires that `populate_polylines` is true.
984    * The `route_polyline` fields of the passed-in routes may be inconsistent
985    * with route `transitions`.
986    * This field must not be used together with `injected_first_solution_routes`
987    * or `injected_solution_constraint`.
988    * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
989    * Polylines are still populated between all visits in all non-empty routes
990    * regardless of whether the related shipments or vehicles are ignored.
991    * </pre>
992    *
993    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
994    */
995   @java.lang.Override
996   public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
getRefreshDetailsRoutesList()997       getRefreshDetailsRoutesList() {
998     return refreshDetailsRoutes_;
999   }
1000   /**
1001    *
1002    *
1003    * <pre>
1004    * If non-empty, the given routes will be refreshed, without modifying their
1005    * underlying sequence of visits or travel times: only other details will be
1006    * updated. This does not solve the model.
1007    * As of 2020/11, this only populates the polylines of non-empty routes and
1008    * requires that `populate_polylines` is true.
1009    * The `route_polyline` fields of the passed-in routes may be inconsistent
1010    * with route `transitions`.
1011    * This field must not be used together with `injected_first_solution_routes`
1012    * or `injected_solution_constraint`.
1013    * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
1014    * Polylines are still populated between all visits in all non-empty routes
1015    * regardless of whether the related shipments or vehicles are ignored.
1016    * </pre>
1017    *
1018    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
1019    */
1020   @java.lang.Override
1021   public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getRefreshDetailsRoutesOrBuilderList()1022       getRefreshDetailsRoutesOrBuilderList() {
1023     return refreshDetailsRoutes_;
1024   }
1025   /**
1026    *
1027    *
1028    * <pre>
1029    * If non-empty, the given routes will be refreshed, without modifying their
1030    * underlying sequence of visits or travel times: only other details will be
1031    * updated. This does not solve the model.
1032    * As of 2020/11, this only populates the polylines of non-empty routes and
1033    * requires that `populate_polylines` is true.
1034    * The `route_polyline` fields of the passed-in routes may be inconsistent
1035    * with route `transitions`.
1036    * This field must not be used together with `injected_first_solution_routes`
1037    * or `injected_solution_constraint`.
1038    * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
1039    * Polylines are still populated between all visits in all non-empty routes
1040    * regardless of whether the related shipments or vehicles are ignored.
1041    * </pre>
1042    *
1043    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
1044    */
1045   @java.lang.Override
getRefreshDetailsRoutesCount()1046   public int getRefreshDetailsRoutesCount() {
1047     return refreshDetailsRoutes_.size();
1048   }
1049   /**
1050    *
1051    *
1052    * <pre>
1053    * If non-empty, the given routes will be refreshed, without modifying their
1054    * underlying sequence of visits or travel times: only other details will be
1055    * updated. This does not solve the model.
1056    * As of 2020/11, this only populates the polylines of non-empty routes and
1057    * requires that `populate_polylines` is true.
1058    * The `route_polyline` fields of the passed-in routes may be inconsistent
1059    * with route `transitions`.
1060    * This field must not be used together with `injected_first_solution_routes`
1061    * or `injected_solution_constraint`.
1062    * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
1063    * Polylines are still populated between all visits in all non-empty routes
1064    * regardless of whether the related shipments or vehicles are ignored.
1065    * </pre>
1066    *
1067    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
1068    */
1069   @java.lang.Override
getRefreshDetailsRoutes(int index)1070   public com.google.cloud.optimization.v1.ShipmentRoute getRefreshDetailsRoutes(int index) {
1071     return refreshDetailsRoutes_.get(index);
1072   }
1073   /**
1074    *
1075    *
1076    * <pre>
1077    * If non-empty, the given routes will be refreshed, without modifying their
1078    * underlying sequence of visits or travel times: only other details will be
1079    * updated. This does not solve the model.
1080    * As of 2020/11, this only populates the polylines of non-empty routes and
1081    * requires that `populate_polylines` is true.
1082    * The `route_polyline` fields of the passed-in routes may be inconsistent
1083    * with route `transitions`.
1084    * This field must not be used together with `injected_first_solution_routes`
1085    * or `injected_solution_constraint`.
1086    * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
1087    * Polylines are still populated between all visits in all non-empty routes
1088    * regardless of whether the related shipments or vehicles are ignored.
1089    * </pre>
1090    *
1091    * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
1092    */
1093   @java.lang.Override
getRefreshDetailsRoutesOrBuilder( int index)1094   public com.google.cloud.optimization.v1.ShipmentRouteOrBuilder getRefreshDetailsRoutesOrBuilder(
1095       int index) {
1096     return refreshDetailsRoutes_.get(index);
1097   }
1098 
1099   public static final int INTERPRET_INJECTED_SOLUTIONS_USING_LABELS_FIELD_NUMBER = 10;
1100   private boolean interpretInjectedSolutionsUsingLabels_ = false;
1101   /**
1102    *
1103    *
1104    * <pre>
1105    * If true:
1106    *   * uses
1107    *   [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label]
1108    *   instead of `vehicle_index` to
1109    *     match routes in an injected solution with vehicles in the request;
1110    *     reuses the mapping of original
1111    *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
1112    *     to new
1113    *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
1114    *     to update
1115    *     [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices]
1116    *     if non-empty, but the mapping must be unambiguous (i.e., multiple
1117    *     `ShipmentRoute`s must not share the same original `vehicle_index`).
1118    *   * uses
1119    *   [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label]
1120    *   instead of `shipment_index`
1121    *     to match visits in an injected solution with shipments in the request;
1122    *   * uses
1123    *   [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
1124    *   instead of
1125    *   [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index]
1126    *   to
1127    *     match skipped shipments in the injected solution with request
1128    *     shipments.
1129    * This interpretation applies to the `injected_first_solution_routes`,
1130    * `injected_solution_constraint`, and `refresh_details_routes` fields.
1131    * It can be used when shipment or vehicle indices in the request have
1132    * changed since the solution was created, perhaps because shipments or
1133    * vehicles have been removed from or added to the request.
1134    * If true, labels in the following categories must appear at most once in
1135    * their category:
1136    *   * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the
1137    *   request;
1138    *   * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the
1139    *   request;
1140    *   * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution;
1141    *   * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in
1142    *     the injected solution (except pickup/delivery visit pairs, whose
1143    *     `shipment_label` must appear twice).
1144    * If a `vehicle_label` in the injected solution does not correspond to a
1145    * request vehicle, the corresponding route is removed from the solution
1146    * along with its visits. If a `shipment_label` in the injected solution does
1147    * not correspond to a request shipment, the corresponding visit is removed
1148    * from the solution. If a
1149    * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
1150    * in the injected solution does not correspond to a request shipment, the
1151    * `SkippedShipment` is removed from the solution.
1152    * Removing route visits or entire routes from an injected solution may
1153    * have an effect on the implied constraints, which may lead to change in
1154    * solution, validation errors, or infeasibility.
1155    * NOTE: The caller must ensure that each
1156    * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp.
1157    * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely
1158    * identifies a vehicle (resp. shipment) entity used across the two relevant
1159    * requests: the past request that produced the `OptimizeToursResponse` used
1160    * in the injected solution and the current request that includes the injected
1161    * solution. The uniqueness checks described above are not enough to guarantee
1162    * this requirement.
1163    * </pre>
1164    *
1165    * <code>bool interpret_injected_solutions_using_labels = 10;</code>
1166    *
1167    * @return The interpretInjectedSolutionsUsingLabels.
1168    */
1169   @java.lang.Override
getInterpretInjectedSolutionsUsingLabels()1170   public boolean getInterpretInjectedSolutionsUsingLabels() {
1171     return interpretInjectedSolutionsUsingLabels_;
1172   }
1173 
1174   public static final int CONSIDER_ROAD_TRAFFIC_FIELD_NUMBER = 11;
1175   private boolean considerRoadTraffic_ = false;
1176   /**
1177    *
1178    *
1179    * <pre>
1180    * Consider traffic estimation in calculating `ShipmentRoute` fields
1181    * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration],
1182    * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time],
1183    * and `vehicle_end_time`; in setting the
1184    * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities]
1185    * field, and in calculating the
1186    * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost]
1187    * field.
1188    * </pre>
1189    *
1190    * <code>bool consider_road_traffic = 11;</code>
1191    *
1192    * @return The considerRoadTraffic.
1193    */
1194   @java.lang.Override
getConsiderRoadTraffic()1195   public boolean getConsiderRoadTraffic() {
1196     return considerRoadTraffic_;
1197   }
1198 
1199   public static final int POPULATE_POLYLINES_FIELD_NUMBER = 12;
1200   private boolean populatePolylines_ = false;
1201   /**
1202    *
1203    *
1204    * <pre>
1205    * If true, polylines will be populated in response `ShipmentRoute`s.
1206    * </pre>
1207    *
1208    * <code>bool populate_polylines = 12;</code>
1209    *
1210    * @return The populatePolylines.
1211    */
1212   @java.lang.Override
getPopulatePolylines()1213   public boolean getPopulatePolylines() {
1214     return populatePolylines_;
1215   }
1216 
1217   public static final int POPULATE_TRANSITION_POLYLINES_FIELD_NUMBER = 13;
1218   private boolean populateTransitionPolylines_ = false;
1219   /**
1220    *
1221    *
1222    * <pre>
1223    * If true, polylines will be populated in response
1224    * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
1225    * Note that in this case, the polylines will also be populated in the
1226    * deprecated `travel_steps`.
1227    * </pre>
1228    *
1229    * <code>bool populate_transition_polylines = 13;</code>
1230    *
1231    * @return The populateTransitionPolylines.
1232    */
1233   @java.lang.Override
getPopulateTransitionPolylines()1234   public boolean getPopulateTransitionPolylines() {
1235     return populateTransitionPolylines_;
1236   }
1237 
1238   public static final int ALLOW_LARGE_DEADLINE_DESPITE_INTERRUPTION_RISK_FIELD_NUMBER = 14;
1239   private boolean allowLargeDeadlineDespiteInterruptionRisk_ = false;
1240   /**
1241    *
1242    *
1243    * <pre>
1244    * If this is set, then the request can have a deadline
1245    * (see https://grpc.io/blog/deadlines) of up to 60 minutes.
1246    * Otherwise, the maximum deadline is only 30 minutes.
1247    * Note that long-lived requests have a significantly larger (but still small)
1248    * risk of interruption.
1249    * </pre>
1250    *
1251    * <code>bool allow_large_deadline_despite_interruption_risk = 14;</code>
1252    *
1253    * @return The allowLargeDeadlineDespiteInterruptionRisk.
1254    */
1255   @java.lang.Override
getAllowLargeDeadlineDespiteInterruptionRisk()1256   public boolean getAllowLargeDeadlineDespiteInterruptionRisk() {
1257     return allowLargeDeadlineDespiteInterruptionRisk_;
1258   }
1259 
1260   public static final int USE_GEODESIC_DISTANCES_FIELD_NUMBER = 15;
1261   private boolean useGeodesicDistances_ = false;
1262   /**
1263    *
1264    *
1265    * <pre>
1266    * If true, travel distances will be computed using geodesic distances instead
1267    * of Google Maps distances, and travel times will be computed using geodesic
1268    * distances with a speed defined by `geodesic_meters_per_second`.
1269    * </pre>
1270    *
1271    * <code>bool use_geodesic_distances = 15;</code>
1272    *
1273    * @return The useGeodesicDistances.
1274    */
1275   @java.lang.Override
getUseGeodesicDistances()1276   public boolean getUseGeodesicDistances() {
1277     return useGeodesicDistances_;
1278   }
1279 
1280   public static final int GEODESIC_METERS_PER_SECOND_FIELD_NUMBER = 16;
1281   private double geodesicMetersPerSecond_ = 0D;
1282   /**
1283    *
1284    *
1285    * <pre>
1286    * When `use_geodesic_distances` is true, this field must be set and defines
1287    * the speed applied to compute travel times. Its value must be at least 1.0
1288    * meters/seconds.
1289    * </pre>
1290    *
1291    * <code>optional double geodesic_meters_per_second = 16;</code>
1292    *
1293    * @return Whether the geodesicMetersPerSecond field is set.
1294    */
1295   @java.lang.Override
hasGeodesicMetersPerSecond()1296   public boolean hasGeodesicMetersPerSecond() {
1297     return ((bitField0_ & 0x00000002) != 0);
1298   }
1299   /**
1300    *
1301    *
1302    * <pre>
1303    * When `use_geodesic_distances` is true, this field must be set and defines
1304    * the speed applied to compute travel times. Its value must be at least 1.0
1305    * meters/seconds.
1306    * </pre>
1307    *
1308    * <code>optional double geodesic_meters_per_second = 16;</code>
1309    *
1310    * @return The geodesicMetersPerSecond.
1311    */
1312   @java.lang.Override
getGeodesicMetersPerSecond()1313   public double getGeodesicMetersPerSecond() {
1314     return geodesicMetersPerSecond_;
1315   }
1316 
1317   public static final int LABEL_FIELD_NUMBER = 17;
1318 
1319   @SuppressWarnings("serial")
1320   private volatile java.lang.Object label_ = "";
1321   /**
1322    *
1323    *
1324    * <pre>
1325    * Label that may be used to identify this request, reported back in the
1326    * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
1327    * </pre>
1328    *
1329    * <code>string label = 17;</code>
1330    *
1331    * @return The label.
1332    */
1333   @java.lang.Override
getLabel()1334   public java.lang.String getLabel() {
1335     java.lang.Object ref = label_;
1336     if (ref instanceof java.lang.String) {
1337       return (java.lang.String) ref;
1338     } else {
1339       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1340       java.lang.String s = bs.toStringUtf8();
1341       label_ = s;
1342       return s;
1343     }
1344   }
1345   /**
1346    *
1347    *
1348    * <pre>
1349    * Label that may be used to identify this request, reported back in the
1350    * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
1351    * </pre>
1352    *
1353    * <code>string label = 17;</code>
1354    *
1355    * @return The bytes for label.
1356    */
1357   @java.lang.Override
getLabelBytes()1358   public com.google.protobuf.ByteString getLabelBytes() {
1359     java.lang.Object ref = label_;
1360     if (ref instanceof java.lang.String) {
1361       com.google.protobuf.ByteString b =
1362           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1363       label_ = b;
1364       return b;
1365     } else {
1366       return (com.google.protobuf.ByteString) ref;
1367     }
1368   }
1369 
1370   public static final int POPULATE_TRAVEL_STEP_POLYLINES_FIELD_NUMBER = 20;
1371   private boolean populateTravelStepPolylines_ = false;
1372   /**
1373    *
1374    *
1375    * <pre>
1376    * Deprecated: Use
1377    * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
1378    * instead. If true, polylines will be populated in response
1379    * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
1380    * Note that in this case, the polylines will also be populated in the
1381    * deprecated `travel_steps`.
1382    * </pre>
1383    *
1384    * <code>bool populate_travel_step_polylines = 20 [deprecated = true];</code>
1385    *
1386    * @deprecated google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines is
1387    *     deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=351
1388    * @return The populateTravelStepPolylines.
1389    */
1390   @java.lang.Override
1391   @java.lang.Deprecated
getPopulateTravelStepPolylines()1392   public boolean getPopulateTravelStepPolylines() {
1393     return populateTravelStepPolylines_;
1394   }
1395 
1396   private byte memoizedIsInitialized = -1;
1397 
1398   @java.lang.Override
isInitialized()1399   public final boolean isInitialized() {
1400     byte isInitialized = memoizedIsInitialized;
1401     if (isInitialized == 1) return true;
1402     if (isInitialized == 0) return false;
1403 
1404     memoizedIsInitialized = 1;
1405     return true;
1406   }
1407 
1408   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1409   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1410     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
1411       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
1412     }
1413     if (timeout_ != null) {
1414       output.writeMessage(2, getTimeout());
1415     }
1416     if (model_ != null) {
1417       output.writeMessage(3, getModel());
1418     }
1419     if (solvingMode_
1420         != com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.DEFAULT_SOLVE
1421             .getNumber()) {
1422       output.writeEnum(4, solvingMode_);
1423     }
1424     if (((bitField0_ & 0x00000001) != 0)) {
1425       output.writeInt32(5, maxValidationErrors_);
1426     }
1427     if (searchMode_
1428         != com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.SEARCH_MODE_UNSPECIFIED
1429             .getNumber()) {
1430       output.writeEnum(6, searchMode_);
1431     }
1432     for (int i = 0; i < injectedFirstSolutionRoutes_.size(); i++) {
1433       output.writeMessage(7, injectedFirstSolutionRoutes_.get(i));
1434     }
1435     if (injectedSolutionConstraint_ != null) {
1436       output.writeMessage(8, getInjectedSolutionConstraint());
1437     }
1438     for (int i = 0; i < refreshDetailsRoutes_.size(); i++) {
1439       output.writeMessage(9, refreshDetailsRoutes_.get(i));
1440     }
1441     if (interpretInjectedSolutionsUsingLabels_ != false) {
1442       output.writeBool(10, interpretInjectedSolutionsUsingLabels_);
1443     }
1444     if (considerRoadTraffic_ != false) {
1445       output.writeBool(11, considerRoadTraffic_);
1446     }
1447     if (populatePolylines_ != false) {
1448       output.writeBool(12, populatePolylines_);
1449     }
1450     if (populateTransitionPolylines_ != false) {
1451       output.writeBool(13, populateTransitionPolylines_);
1452     }
1453     if (allowLargeDeadlineDespiteInterruptionRisk_ != false) {
1454       output.writeBool(14, allowLargeDeadlineDespiteInterruptionRisk_);
1455     }
1456     if (useGeodesicDistances_ != false) {
1457       output.writeBool(15, useGeodesicDistances_);
1458     }
1459     if (((bitField0_ & 0x00000002) != 0)) {
1460       output.writeDouble(16, geodesicMetersPerSecond_);
1461     }
1462     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
1463       com.google.protobuf.GeneratedMessageV3.writeString(output, 17, label_);
1464     }
1465     if (populateTravelStepPolylines_ != false) {
1466       output.writeBool(20, populateTravelStepPolylines_);
1467     }
1468     getUnknownFields().writeTo(output);
1469   }
1470 
1471   @java.lang.Override
getSerializedSize()1472   public int getSerializedSize() {
1473     int size = memoizedSize;
1474     if (size != -1) return size;
1475 
1476     size = 0;
1477     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
1478       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
1479     }
1480     if (timeout_ != null) {
1481       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeout());
1482     }
1483     if (model_ != null) {
1484       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getModel());
1485     }
1486     if (solvingMode_
1487         != com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.DEFAULT_SOLVE
1488             .getNumber()) {
1489       size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, solvingMode_);
1490     }
1491     if (((bitField0_ & 0x00000001) != 0)) {
1492       size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxValidationErrors_);
1493     }
1494     if (searchMode_
1495         != com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.SEARCH_MODE_UNSPECIFIED
1496             .getNumber()) {
1497       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, searchMode_);
1498     }
1499     for (int i = 0; i < injectedFirstSolutionRoutes_.size(); i++) {
1500       size +=
1501           com.google.protobuf.CodedOutputStream.computeMessageSize(
1502               7, injectedFirstSolutionRoutes_.get(i));
1503     }
1504     if (injectedSolutionConstraint_ != null) {
1505       size +=
1506           com.google.protobuf.CodedOutputStream.computeMessageSize(
1507               8, getInjectedSolutionConstraint());
1508     }
1509     for (int i = 0; i < refreshDetailsRoutes_.size(); i++) {
1510       size +=
1511           com.google.protobuf.CodedOutputStream.computeMessageSize(9, refreshDetailsRoutes_.get(i));
1512     }
1513     if (interpretInjectedSolutionsUsingLabels_ != false) {
1514       size +=
1515           com.google.protobuf.CodedOutputStream.computeBoolSize(
1516               10, interpretInjectedSolutionsUsingLabels_);
1517     }
1518     if (considerRoadTraffic_ != false) {
1519       size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, considerRoadTraffic_);
1520     }
1521     if (populatePolylines_ != false) {
1522       size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, populatePolylines_);
1523     }
1524     if (populateTransitionPolylines_ != false) {
1525       size +=
1526           com.google.protobuf.CodedOutputStream.computeBoolSize(13, populateTransitionPolylines_);
1527     }
1528     if (allowLargeDeadlineDespiteInterruptionRisk_ != false) {
1529       size +=
1530           com.google.protobuf.CodedOutputStream.computeBoolSize(
1531               14, allowLargeDeadlineDespiteInterruptionRisk_);
1532     }
1533     if (useGeodesicDistances_ != false) {
1534       size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, useGeodesicDistances_);
1535     }
1536     if (((bitField0_ & 0x00000002) != 0)) {
1537       size += com.google.protobuf.CodedOutputStream.computeDoubleSize(16, geodesicMetersPerSecond_);
1538     }
1539     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) {
1540       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, label_);
1541     }
1542     if (populateTravelStepPolylines_ != false) {
1543       size +=
1544           com.google.protobuf.CodedOutputStream.computeBoolSize(20, populateTravelStepPolylines_);
1545     }
1546     size += getUnknownFields().getSerializedSize();
1547     memoizedSize = size;
1548     return size;
1549   }
1550 
1551   @java.lang.Override
equals(final java.lang.Object obj)1552   public boolean equals(final java.lang.Object obj) {
1553     if (obj == this) {
1554       return true;
1555     }
1556     if (!(obj instanceof com.google.cloud.optimization.v1.OptimizeToursRequest)) {
1557       return super.equals(obj);
1558     }
1559     com.google.cloud.optimization.v1.OptimizeToursRequest other =
1560         (com.google.cloud.optimization.v1.OptimizeToursRequest) obj;
1561 
1562     if (!getParent().equals(other.getParent())) return false;
1563     if (hasTimeout() != other.hasTimeout()) return false;
1564     if (hasTimeout()) {
1565       if (!getTimeout().equals(other.getTimeout())) return false;
1566     }
1567     if (hasModel() != other.hasModel()) return false;
1568     if (hasModel()) {
1569       if (!getModel().equals(other.getModel())) return false;
1570     }
1571     if (solvingMode_ != other.solvingMode_) return false;
1572     if (hasMaxValidationErrors() != other.hasMaxValidationErrors()) return false;
1573     if (hasMaxValidationErrors()) {
1574       if (getMaxValidationErrors() != other.getMaxValidationErrors()) return false;
1575     }
1576     if (searchMode_ != other.searchMode_) return false;
1577     if (!getInjectedFirstSolutionRoutesList().equals(other.getInjectedFirstSolutionRoutesList()))
1578       return false;
1579     if (hasInjectedSolutionConstraint() != other.hasInjectedSolutionConstraint()) return false;
1580     if (hasInjectedSolutionConstraint()) {
1581       if (!getInjectedSolutionConstraint().equals(other.getInjectedSolutionConstraint()))
1582         return false;
1583     }
1584     if (!getRefreshDetailsRoutesList().equals(other.getRefreshDetailsRoutesList())) return false;
1585     if (getInterpretInjectedSolutionsUsingLabels()
1586         != other.getInterpretInjectedSolutionsUsingLabels()) return false;
1587     if (getConsiderRoadTraffic() != other.getConsiderRoadTraffic()) return false;
1588     if (getPopulatePolylines() != other.getPopulatePolylines()) return false;
1589     if (getPopulateTransitionPolylines() != other.getPopulateTransitionPolylines()) return false;
1590     if (getAllowLargeDeadlineDespiteInterruptionRisk()
1591         != other.getAllowLargeDeadlineDespiteInterruptionRisk()) return false;
1592     if (getUseGeodesicDistances() != other.getUseGeodesicDistances()) return false;
1593     if (hasGeodesicMetersPerSecond() != other.hasGeodesicMetersPerSecond()) return false;
1594     if (hasGeodesicMetersPerSecond()) {
1595       if (java.lang.Double.doubleToLongBits(getGeodesicMetersPerSecond())
1596           != java.lang.Double.doubleToLongBits(other.getGeodesicMetersPerSecond())) return false;
1597     }
1598     if (!getLabel().equals(other.getLabel())) return false;
1599     if (getPopulateTravelStepPolylines() != other.getPopulateTravelStepPolylines()) return false;
1600     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1601     return true;
1602   }
1603 
1604   @java.lang.Override
hashCode()1605   public int hashCode() {
1606     if (memoizedHashCode != 0) {
1607       return memoizedHashCode;
1608     }
1609     int hash = 41;
1610     hash = (19 * hash) + getDescriptor().hashCode();
1611     hash = (37 * hash) + PARENT_FIELD_NUMBER;
1612     hash = (53 * hash) + getParent().hashCode();
1613     if (hasTimeout()) {
1614       hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
1615       hash = (53 * hash) + getTimeout().hashCode();
1616     }
1617     if (hasModel()) {
1618       hash = (37 * hash) + MODEL_FIELD_NUMBER;
1619       hash = (53 * hash) + getModel().hashCode();
1620     }
1621     hash = (37 * hash) + SOLVING_MODE_FIELD_NUMBER;
1622     hash = (53 * hash) + solvingMode_;
1623     if (hasMaxValidationErrors()) {
1624       hash = (37 * hash) + MAX_VALIDATION_ERRORS_FIELD_NUMBER;
1625       hash = (53 * hash) + getMaxValidationErrors();
1626     }
1627     hash = (37 * hash) + SEARCH_MODE_FIELD_NUMBER;
1628     hash = (53 * hash) + searchMode_;
1629     if (getInjectedFirstSolutionRoutesCount() > 0) {
1630       hash = (37 * hash) + INJECTED_FIRST_SOLUTION_ROUTES_FIELD_NUMBER;
1631       hash = (53 * hash) + getInjectedFirstSolutionRoutesList().hashCode();
1632     }
1633     if (hasInjectedSolutionConstraint()) {
1634       hash = (37 * hash) + INJECTED_SOLUTION_CONSTRAINT_FIELD_NUMBER;
1635       hash = (53 * hash) + getInjectedSolutionConstraint().hashCode();
1636     }
1637     if (getRefreshDetailsRoutesCount() > 0) {
1638       hash = (37 * hash) + REFRESH_DETAILS_ROUTES_FIELD_NUMBER;
1639       hash = (53 * hash) + getRefreshDetailsRoutesList().hashCode();
1640     }
1641     hash = (37 * hash) + INTERPRET_INJECTED_SOLUTIONS_USING_LABELS_FIELD_NUMBER;
1642     hash =
1643         (53 * hash)
1644             + com.google.protobuf.Internal.hashBoolean(getInterpretInjectedSolutionsUsingLabels());
1645     hash = (37 * hash) + CONSIDER_ROAD_TRAFFIC_FIELD_NUMBER;
1646     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getConsiderRoadTraffic());
1647     hash = (37 * hash) + POPULATE_POLYLINES_FIELD_NUMBER;
1648     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPopulatePolylines());
1649     hash = (37 * hash) + POPULATE_TRANSITION_POLYLINES_FIELD_NUMBER;
1650     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPopulateTransitionPolylines());
1651     hash = (37 * hash) + ALLOW_LARGE_DEADLINE_DESPITE_INTERRUPTION_RISK_FIELD_NUMBER;
1652     hash =
1653         (53 * hash)
1654             + com.google.protobuf.Internal.hashBoolean(
1655                 getAllowLargeDeadlineDespiteInterruptionRisk());
1656     hash = (37 * hash) + USE_GEODESIC_DISTANCES_FIELD_NUMBER;
1657     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseGeodesicDistances());
1658     if (hasGeodesicMetersPerSecond()) {
1659       hash = (37 * hash) + GEODESIC_METERS_PER_SECOND_FIELD_NUMBER;
1660       hash =
1661           (53 * hash)
1662               + com.google.protobuf.Internal.hashLong(
1663                   java.lang.Double.doubleToLongBits(getGeodesicMetersPerSecond()));
1664     }
1665     hash = (37 * hash) + LABEL_FIELD_NUMBER;
1666     hash = (53 * hash) + getLabel().hashCode();
1667     hash = (37 * hash) + POPULATE_TRAVEL_STEP_POLYLINES_FIELD_NUMBER;
1668     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPopulateTravelStepPolylines());
1669     hash = (29 * hash) + getUnknownFields().hashCode();
1670     memoizedHashCode = hash;
1671     return hash;
1672   }
1673 
parseFrom( java.nio.ByteBuffer data)1674   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1675       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
1676     return PARSER.parseFrom(data);
1677   }
1678 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1679   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1680       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1681       throws com.google.protobuf.InvalidProtocolBufferException {
1682     return PARSER.parseFrom(data, extensionRegistry);
1683   }
1684 
parseFrom( com.google.protobuf.ByteString data)1685   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1686       com.google.protobuf.ByteString data)
1687       throws com.google.protobuf.InvalidProtocolBufferException {
1688     return PARSER.parseFrom(data);
1689   }
1690 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1691   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1692       com.google.protobuf.ByteString data,
1693       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1694       throws com.google.protobuf.InvalidProtocolBufferException {
1695     return PARSER.parseFrom(data, extensionRegistry);
1696   }
1697 
parseFrom(byte[] data)1698   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(byte[] data)
1699       throws com.google.protobuf.InvalidProtocolBufferException {
1700     return PARSER.parseFrom(data);
1701   }
1702 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1703   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1704       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1705       throws com.google.protobuf.InvalidProtocolBufferException {
1706     return PARSER.parseFrom(data, extensionRegistry);
1707   }
1708 
parseFrom( java.io.InputStream input)1709   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1710       java.io.InputStream input) throws java.io.IOException {
1711     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1712   }
1713 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1714   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1715       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1716       throws java.io.IOException {
1717     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1718         PARSER, input, extensionRegistry);
1719   }
1720 
parseDelimitedFrom( java.io.InputStream input)1721   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseDelimitedFrom(
1722       java.io.InputStream input) throws java.io.IOException {
1723     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1724   }
1725 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1726   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseDelimitedFrom(
1727       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1728       throws java.io.IOException {
1729     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1730         PARSER, input, extensionRegistry);
1731   }
1732 
parseFrom( com.google.protobuf.CodedInputStream input)1733   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1734       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1735     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1736   }
1737 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1738   public static com.google.cloud.optimization.v1.OptimizeToursRequest parseFrom(
1739       com.google.protobuf.CodedInputStream input,
1740       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1741       throws java.io.IOException {
1742     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1743         PARSER, input, extensionRegistry);
1744   }
1745 
1746   @java.lang.Override
newBuilderForType()1747   public Builder newBuilderForType() {
1748     return newBuilder();
1749   }
1750 
newBuilder()1751   public static Builder newBuilder() {
1752     return DEFAULT_INSTANCE.toBuilder();
1753   }
1754 
newBuilder( com.google.cloud.optimization.v1.OptimizeToursRequest prototype)1755   public static Builder newBuilder(
1756       com.google.cloud.optimization.v1.OptimizeToursRequest prototype) {
1757     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1758   }
1759 
1760   @java.lang.Override
toBuilder()1761   public Builder toBuilder() {
1762     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1763   }
1764 
1765   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1766   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1767     Builder builder = new Builder(parent);
1768     return builder;
1769   }
1770   /**
1771    *
1772    *
1773    * <pre>
1774    * Request to be given to a tour optimization solver which defines the
1775    * shipment model to solve as well as optimization parameters.
1776    * </pre>
1777    *
1778    * Protobuf type {@code google.cloud.optimization.v1.OptimizeToursRequest}
1779    */
1780   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1781       implements
1782       // @@protoc_insertion_point(builder_implements:google.cloud.optimization.v1.OptimizeToursRequest)
1783       com.google.cloud.optimization.v1.OptimizeToursRequestOrBuilder {
getDescriptor()1784     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1785       return com.google.cloud.optimization.v1.FleetRoutingProto
1786           .internal_static_google_cloud_optimization_v1_OptimizeToursRequest_descriptor;
1787     }
1788 
1789     @java.lang.Override
1790     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1791         internalGetFieldAccessorTable() {
1792       return com.google.cloud.optimization.v1.FleetRoutingProto
1793           .internal_static_google_cloud_optimization_v1_OptimizeToursRequest_fieldAccessorTable
1794           .ensureFieldAccessorsInitialized(
1795               com.google.cloud.optimization.v1.OptimizeToursRequest.class,
1796               com.google.cloud.optimization.v1.OptimizeToursRequest.Builder.class);
1797     }
1798 
1799     // Construct using com.google.cloud.optimization.v1.OptimizeToursRequest.newBuilder()
Builder()1800     private Builder() {}
1801 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1802     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1803       super(parent);
1804     }
1805 
1806     @java.lang.Override
clear()1807     public Builder clear() {
1808       super.clear();
1809       bitField0_ = 0;
1810       parent_ = "";
1811       timeout_ = null;
1812       if (timeoutBuilder_ != null) {
1813         timeoutBuilder_.dispose();
1814         timeoutBuilder_ = null;
1815       }
1816       model_ = null;
1817       if (modelBuilder_ != null) {
1818         modelBuilder_.dispose();
1819         modelBuilder_ = null;
1820       }
1821       solvingMode_ = 0;
1822       maxValidationErrors_ = 0;
1823       searchMode_ = 0;
1824       if (injectedFirstSolutionRoutesBuilder_ == null) {
1825         injectedFirstSolutionRoutes_ = java.util.Collections.emptyList();
1826       } else {
1827         injectedFirstSolutionRoutes_ = null;
1828         injectedFirstSolutionRoutesBuilder_.clear();
1829       }
1830       bitField0_ = (bitField0_ & ~0x00000040);
1831       injectedSolutionConstraint_ = null;
1832       if (injectedSolutionConstraintBuilder_ != null) {
1833         injectedSolutionConstraintBuilder_.dispose();
1834         injectedSolutionConstraintBuilder_ = null;
1835       }
1836       if (refreshDetailsRoutesBuilder_ == null) {
1837         refreshDetailsRoutes_ = java.util.Collections.emptyList();
1838       } else {
1839         refreshDetailsRoutes_ = null;
1840         refreshDetailsRoutesBuilder_.clear();
1841       }
1842       bitField0_ = (bitField0_ & ~0x00000100);
1843       interpretInjectedSolutionsUsingLabels_ = false;
1844       considerRoadTraffic_ = false;
1845       populatePolylines_ = false;
1846       populateTransitionPolylines_ = false;
1847       allowLargeDeadlineDespiteInterruptionRisk_ = false;
1848       useGeodesicDistances_ = false;
1849       geodesicMetersPerSecond_ = 0D;
1850       label_ = "";
1851       populateTravelStepPolylines_ = false;
1852       return this;
1853     }
1854 
1855     @java.lang.Override
getDescriptorForType()1856     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1857       return com.google.cloud.optimization.v1.FleetRoutingProto
1858           .internal_static_google_cloud_optimization_v1_OptimizeToursRequest_descriptor;
1859     }
1860 
1861     @java.lang.Override
getDefaultInstanceForType()1862     public com.google.cloud.optimization.v1.OptimizeToursRequest getDefaultInstanceForType() {
1863       return com.google.cloud.optimization.v1.OptimizeToursRequest.getDefaultInstance();
1864     }
1865 
1866     @java.lang.Override
build()1867     public com.google.cloud.optimization.v1.OptimizeToursRequest build() {
1868       com.google.cloud.optimization.v1.OptimizeToursRequest result = buildPartial();
1869       if (!result.isInitialized()) {
1870         throw newUninitializedMessageException(result);
1871       }
1872       return result;
1873     }
1874 
1875     @java.lang.Override
buildPartial()1876     public com.google.cloud.optimization.v1.OptimizeToursRequest buildPartial() {
1877       com.google.cloud.optimization.v1.OptimizeToursRequest result =
1878           new com.google.cloud.optimization.v1.OptimizeToursRequest(this);
1879       buildPartialRepeatedFields(result);
1880       if (bitField0_ != 0) {
1881         buildPartial0(result);
1882       }
1883       onBuilt();
1884       return result;
1885     }
1886 
buildPartialRepeatedFields( com.google.cloud.optimization.v1.OptimizeToursRequest result)1887     private void buildPartialRepeatedFields(
1888         com.google.cloud.optimization.v1.OptimizeToursRequest result) {
1889       if (injectedFirstSolutionRoutesBuilder_ == null) {
1890         if (((bitField0_ & 0x00000040) != 0)) {
1891           injectedFirstSolutionRoutes_ =
1892               java.util.Collections.unmodifiableList(injectedFirstSolutionRoutes_);
1893           bitField0_ = (bitField0_ & ~0x00000040);
1894         }
1895         result.injectedFirstSolutionRoutes_ = injectedFirstSolutionRoutes_;
1896       } else {
1897         result.injectedFirstSolutionRoutes_ = injectedFirstSolutionRoutesBuilder_.build();
1898       }
1899       if (refreshDetailsRoutesBuilder_ == null) {
1900         if (((bitField0_ & 0x00000100) != 0)) {
1901           refreshDetailsRoutes_ = java.util.Collections.unmodifiableList(refreshDetailsRoutes_);
1902           bitField0_ = (bitField0_ & ~0x00000100);
1903         }
1904         result.refreshDetailsRoutes_ = refreshDetailsRoutes_;
1905       } else {
1906         result.refreshDetailsRoutes_ = refreshDetailsRoutesBuilder_.build();
1907       }
1908     }
1909 
buildPartial0(com.google.cloud.optimization.v1.OptimizeToursRequest result)1910     private void buildPartial0(com.google.cloud.optimization.v1.OptimizeToursRequest result) {
1911       int from_bitField0_ = bitField0_;
1912       if (((from_bitField0_ & 0x00000001) != 0)) {
1913         result.parent_ = parent_;
1914       }
1915       if (((from_bitField0_ & 0x00000002) != 0)) {
1916         result.timeout_ = timeoutBuilder_ == null ? timeout_ : timeoutBuilder_.build();
1917       }
1918       if (((from_bitField0_ & 0x00000004) != 0)) {
1919         result.model_ = modelBuilder_ == null ? model_ : modelBuilder_.build();
1920       }
1921       if (((from_bitField0_ & 0x00000008) != 0)) {
1922         result.solvingMode_ = solvingMode_;
1923       }
1924       int to_bitField0_ = 0;
1925       if (((from_bitField0_ & 0x00000010) != 0)) {
1926         result.maxValidationErrors_ = maxValidationErrors_;
1927         to_bitField0_ |= 0x00000001;
1928       }
1929       if (((from_bitField0_ & 0x00000020) != 0)) {
1930         result.searchMode_ = searchMode_;
1931       }
1932       if (((from_bitField0_ & 0x00000080) != 0)) {
1933         result.injectedSolutionConstraint_ =
1934             injectedSolutionConstraintBuilder_ == null
1935                 ? injectedSolutionConstraint_
1936                 : injectedSolutionConstraintBuilder_.build();
1937       }
1938       if (((from_bitField0_ & 0x00000200) != 0)) {
1939         result.interpretInjectedSolutionsUsingLabels_ = interpretInjectedSolutionsUsingLabels_;
1940       }
1941       if (((from_bitField0_ & 0x00000400) != 0)) {
1942         result.considerRoadTraffic_ = considerRoadTraffic_;
1943       }
1944       if (((from_bitField0_ & 0x00000800) != 0)) {
1945         result.populatePolylines_ = populatePolylines_;
1946       }
1947       if (((from_bitField0_ & 0x00001000) != 0)) {
1948         result.populateTransitionPolylines_ = populateTransitionPolylines_;
1949       }
1950       if (((from_bitField0_ & 0x00002000) != 0)) {
1951         result.allowLargeDeadlineDespiteInterruptionRisk_ =
1952             allowLargeDeadlineDespiteInterruptionRisk_;
1953       }
1954       if (((from_bitField0_ & 0x00004000) != 0)) {
1955         result.useGeodesicDistances_ = useGeodesicDistances_;
1956       }
1957       if (((from_bitField0_ & 0x00008000) != 0)) {
1958         result.geodesicMetersPerSecond_ = geodesicMetersPerSecond_;
1959         to_bitField0_ |= 0x00000002;
1960       }
1961       if (((from_bitField0_ & 0x00010000) != 0)) {
1962         result.label_ = label_;
1963       }
1964       if (((from_bitField0_ & 0x00020000) != 0)) {
1965         result.populateTravelStepPolylines_ = populateTravelStepPolylines_;
1966       }
1967       result.bitField0_ |= to_bitField0_;
1968     }
1969 
1970     @java.lang.Override
clone()1971     public Builder clone() {
1972       return super.clone();
1973     }
1974 
1975     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1976     public Builder setField(
1977         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1978       return super.setField(field, value);
1979     }
1980 
1981     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1982     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1983       return super.clearField(field);
1984     }
1985 
1986     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1987     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1988       return super.clearOneof(oneof);
1989     }
1990 
1991     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1992     public Builder setRepeatedField(
1993         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1994       return super.setRepeatedField(field, index, value);
1995     }
1996 
1997     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1998     public Builder addRepeatedField(
1999         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2000       return super.addRepeatedField(field, value);
2001     }
2002 
2003     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2004     public Builder mergeFrom(com.google.protobuf.Message other) {
2005       if (other instanceof com.google.cloud.optimization.v1.OptimizeToursRequest) {
2006         return mergeFrom((com.google.cloud.optimization.v1.OptimizeToursRequest) other);
2007       } else {
2008         super.mergeFrom(other);
2009         return this;
2010       }
2011     }
2012 
mergeFrom(com.google.cloud.optimization.v1.OptimizeToursRequest other)2013     public Builder mergeFrom(com.google.cloud.optimization.v1.OptimizeToursRequest other) {
2014       if (other == com.google.cloud.optimization.v1.OptimizeToursRequest.getDefaultInstance())
2015         return this;
2016       if (!other.getParent().isEmpty()) {
2017         parent_ = other.parent_;
2018         bitField0_ |= 0x00000001;
2019         onChanged();
2020       }
2021       if (other.hasTimeout()) {
2022         mergeTimeout(other.getTimeout());
2023       }
2024       if (other.hasModel()) {
2025         mergeModel(other.getModel());
2026       }
2027       if (other.solvingMode_ != 0) {
2028         setSolvingModeValue(other.getSolvingModeValue());
2029       }
2030       if (other.hasMaxValidationErrors()) {
2031         setMaxValidationErrors(other.getMaxValidationErrors());
2032       }
2033       if (other.searchMode_ != 0) {
2034         setSearchModeValue(other.getSearchModeValue());
2035       }
2036       if (injectedFirstSolutionRoutesBuilder_ == null) {
2037         if (!other.injectedFirstSolutionRoutes_.isEmpty()) {
2038           if (injectedFirstSolutionRoutes_.isEmpty()) {
2039             injectedFirstSolutionRoutes_ = other.injectedFirstSolutionRoutes_;
2040             bitField0_ = (bitField0_ & ~0x00000040);
2041           } else {
2042             ensureInjectedFirstSolutionRoutesIsMutable();
2043             injectedFirstSolutionRoutes_.addAll(other.injectedFirstSolutionRoutes_);
2044           }
2045           onChanged();
2046         }
2047       } else {
2048         if (!other.injectedFirstSolutionRoutes_.isEmpty()) {
2049           if (injectedFirstSolutionRoutesBuilder_.isEmpty()) {
2050             injectedFirstSolutionRoutesBuilder_.dispose();
2051             injectedFirstSolutionRoutesBuilder_ = null;
2052             injectedFirstSolutionRoutes_ = other.injectedFirstSolutionRoutes_;
2053             bitField0_ = (bitField0_ & ~0x00000040);
2054             injectedFirstSolutionRoutesBuilder_ =
2055                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2056                     ? getInjectedFirstSolutionRoutesFieldBuilder()
2057                     : null;
2058           } else {
2059             injectedFirstSolutionRoutesBuilder_.addAllMessages(other.injectedFirstSolutionRoutes_);
2060           }
2061         }
2062       }
2063       if (other.hasInjectedSolutionConstraint()) {
2064         mergeInjectedSolutionConstraint(other.getInjectedSolutionConstraint());
2065       }
2066       if (refreshDetailsRoutesBuilder_ == null) {
2067         if (!other.refreshDetailsRoutes_.isEmpty()) {
2068           if (refreshDetailsRoutes_.isEmpty()) {
2069             refreshDetailsRoutes_ = other.refreshDetailsRoutes_;
2070             bitField0_ = (bitField0_ & ~0x00000100);
2071           } else {
2072             ensureRefreshDetailsRoutesIsMutable();
2073             refreshDetailsRoutes_.addAll(other.refreshDetailsRoutes_);
2074           }
2075           onChanged();
2076         }
2077       } else {
2078         if (!other.refreshDetailsRoutes_.isEmpty()) {
2079           if (refreshDetailsRoutesBuilder_.isEmpty()) {
2080             refreshDetailsRoutesBuilder_.dispose();
2081             refreshDetailsRoutesBuilder_ = null;
2082             refreshDetailsRoutes_ = other.refreshDetailsRoutes_;
2083             bitField0_ = (bitField0_ & ~0x00000100);
2084             refreshDetailsRoutesBuilder_ =
2085                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2086                     ? getRefreshDetailsRoutesFieldBuilder()
2087                     : null;
2088           } else {
2089             refreshDetailsRoutesBuilder_.addAllMessages(other.refreshDetailsRoutes_);
2090           }
2091         }
2092       }
2093       if (other.getInterpretInjectedSolutionsUsingLabels() != false) {
2094         setInterpretInjectedSolutionsUsingLabels(other.getInterpretInjectedSolutionsUsingLabels());
2095       }
2096       if (other.getConsiderRoadTraffic() != false) {
2097         setConsiderRoadTraffic(other.getConsiderRoadTraffic());
2098       }
2099       if (other.getPopulatePolylines() != false) {
2100         setPopulatePolylines(other.getPopulatePolylines());
2101       }
2102       if (other.getPopulateTransitionPolylines() != false) {
2103         setPopulateTransitionPolylines(other.getPopulateTransitionPolylines());
2104       }
2105       if (other.getAllowLargeDeadlineDespiteInterruptionRisk() != false) {
2106         setAllowLargeDeadlineDespiteInterruptionRisk(
2107             other.getAllowLargeDeadlineDespiteInterruptionRisk());
2108       }
2109       if (other.getUseGeodesicDistances() != false) {
2110         setUseGeodesicDistances(other.getUseGeodesicDistances());
2111       }
2112       if (other.hasGeodesicMetersPerSecond()) {
2113         setGeodesicMetersPerSecond(other.getGeodesicMetersPerSecond());
2114       }
2115       if (!other.getLabel().isEmpty()) {
2116         label_ = other.label_;
2117         bitField0_ |= 0x00010000;
2118         onChanged();
2119       }
2120       if (other.getPopulateTravelStepPolylines() != false) {
2121         setPopulateTravelStepPolylines(other.getPopulateTravelStepPolylines());
2122       }
2123       this.mergeUnknownFields(other.getUnknownFields());
2124       onChanged();
2125       return this;
2126     }
2127 
2128     @java.lang.Override
isInitialized()2129     public final boolean isInitialized() {
2130       return true;
2131     }
2132 
2133     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2134     public Builder mergeFrom(
2135         com.google.protobuf.CodedInputStream input,
2136         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2137         throws java.io.IOException {
2138       if (extensionRegistry == null) {
2139         throw new java.lang.NullPointerException();
2140       }
2141       try {
2142         boolean done = false;
2143         while (!done) {
2144           int tag = input.readTag();
2145           switch (tag) {
2146             case 0:
2147               done = true;
2148               break;
2149             case 10:
2150               {
2151                 parent_ = input.readStringRequireUtf8();
2152                 bitField0_ |= 0x00000001;
2153                 break;
2154               } // case 10
2155             case 18:
2156               {
2157                 input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry);
2158                 bitField0_ |= 0x00000002;
2159                 break;
2160               } // case 18
2161             case 26:
2162               {
2163                 input.readMessage(getModelFieldBuilder().getBuilder(), extensionRegistry);
2164                 bitField0_ |= 0x00000004;
2165                 break;
2166               } // case 26
2167             case 32:
2168               {
2169                 solvingMode_ = input.readEnum();
2170                 bitField0_ |= 0x00000008;
2171                 break;
2172               } // case 32
2173             case 40:
2174               {
2175                 maxValidationErrors_ = input.readInt32();
2176                 bitField0_ |= 0x00000010;
2177                 break;
2178               } // case 40
2179             case 48:
2180               {
2181                 searchMode_ = input.readEnum();
2182                 bitField0_ |= 0x00000020;
2183                 break;
2184               } // case 48
2185             case 58:
2186               {
2187                 com.google.cloud.optimization.v1.ShipmentRoute m =
2188                     input.readMessage(
2189                         com.google.cloud.optimization.v1.ShipmentRoute.parser(), extensionRegistry);
2190                 if (injectedFirstSolutionRoutesBuilder_ == null) {
2191                   ensureInjectedFirstSolutionRoutesIsMutable();
2192                   injectedFirstSolutionRoutes_.add(m);
2193                 } else {
2194                   injectedFirstSolutionRoutesBuilder_.addMessage(m);
2195                 }
2196                 break;
2197               } // case 58
2198             case 66:
2199               {
2200                 input.readMessage(
2201                     getInjectedSolutionConstraintFieldBuilder().getBuilder(), extensionRegistry);
2202                 bitField0_ |= 0x00000080;
2203                 break;
2204               } // case 66
2205             case 74:
2206               {
2207                 com.google.cloud.optimization.v1.ShipmentRoute m =
2208                     input.readMessage(
2209                         com.google.cloud.optimization.v1.ShipmentRoute.parser(), extensionRegistry);
2210                 if (refreshDetailsRoutesBuilder_ == null) {
2211                   ensureRefreshDetailsRoutesIsMutable();
2212                   refreshDetailsRoutes_.add(m);
2213                 } else {
2214                   refreshDetailsRoutesBuilder_.addMessage(m);
2215                 }
2216                 break;
2217               } // case 74
2218             case 80:
2219               {
2220                 interpretInjectedSolutionsUsingLabels_ = input.readBool();
2221                 bitField0_ |= 0x00000200;
2222                 break;
2223               } // case 80
2224             case 88:
2225               {
2226                 considerRoadTraffic_ = input.readBool();
2227                 bitField0_ |= 0x00000400;
2228                 break;
2229               } // case 88
2230             case 96:
2231               {
2232                 populatePolylines_ = input.readBool();
2233                 bitField0_ |= 0x00000800;
2234                 break;
2235               } // case 96
2236             case 104:
2237               {
2238                 populateTransitionPolylines_ = input.readBool();
2239                 bitField0_ |= 0x00001000;
2240                 break;
2241               } // case 104
2242             case 112:
2243               {
2244                 allowLargeDeadlineDespiteInterruptionRisk_ = input.readBool();
2245                 bitField0_ |= 0x00002000;
2246                 break;
2247               } // case 112
2248             case 120:
2249               {
2250                 useGeodesicDistances_ = input.readBool();
2251                 bitField0_ |= 0x00004000;
2252                 break;
2253               } // case 120
2254             case 129:
2255               {
2256                 geodesicMetersPerSecond_ = input.readDouble();
2257                 bitField0_ |= 0x00008000;
2258                 break;
2259               } // case 129
2260             case 138:
2261               {
2262                 label_ = input.readStringRequireUtf8();
2263                 bitField0_ |= 0x00010000;
2264                 break;
2265               } // case 138
2266             case 160:
2267               {
2268                 populateTravelStepPolylines_ = input.readBool();
2269                 bitField0_ |= 0x00020000;
2270                 break;
2271               } // case 160
2272             default:
2273               {
2274                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2275                   done = true; // was an endgroup tag
2276                 }
2277                 break;
2278               } // default:
2279           } // switch (tag)
2280         } // while (!done)
2281       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2282         throw e.unwrapIOException();
2283       } finally {
2284         onChanged();
2285       } // finally
2286       return this;
2287     }
2288 
2289     private int bitField0_;
2290 
2291     private java.lang.Object parent_ = "";
2292     /**
2293      *
2294      *
2295      * <pre>
2296      * Required. Target project and location to make a call.
2297      * Format: `projects/{project-id}/locations/{location-id}`.
2298      * If no location is specified, a region will be chosen automatically.
2299      * </pre>
2300      *
2301      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
2302      *
2303      * @return The parent.
2304      */
getParent()2305     public java.lang.String getParent() {
2306       java.lang.Object ref = parent_;
2307       if (!(ref instanceof java.lang.String)) {
2308         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2309         java.lang.String s = bs.toStringUtf8();
2310         parent_ = s;
2311         return s;
2312       } else {
2313         return (java.lang.String) ref;
2314       }
2315     }
2316     /**
2317      *
2318      *
2319      * <pre>
2320      * Required. Target project and location to make a call.
2321      * Format: `projects/{project-id}/locations/{location-id}`.
2322      * If no location is specified, a region will be chosen automatically.
2323      * </pre>
2324      *
2325      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
2326      *
2327      * @return The bytes for parent.
2328      */
getParentBytes()2329     public com.google.protobuf.ByteString getParentBytes() {
2330       java.lang.Object ref = parent_;
2331       if (ref instanceof String) {
2332         com.google.protobuf.ByteString b =
2333             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2334         parent_ = b;
2335         return b;
2336       } else {
2337         return (com.google.protobuf.ByteString) ref;
2338       }
2339     }
2340     /**
2341      *
2342      *
2343      * <pre>
2344      * Required. Target project and location to make a call.
2345      * Format: `projects/{project-id}/locations/{location-id}`.
2346      * If no location is specified, a region will be chosen automatically.
2347      * </pre>
2348      *
2349      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
2350      *
2351      * @param value The parent to set.
2352      * @return This builder for chaining.
2353      */
setParent(java.lang.String value)2354     public Builder setParent(java.lang.String value) {
2355       if (value == null) {
2356         throw new NullPointerException();
2357       }
2358       parent_ = value;
2359       bitField0_ |= 0x00000001;
2360       onChanged();
2361       return this;
2362     }
2363     /**
2364      *
2365      *
2366      * <pre>
2367      * Required. Target project and location to make a call.
2368      * Format: `projects/{project-id}/locations/{location-id}`.
2369      * If no location is specified, a region will be chosen automatically.
2370      * </pre>
2371      *
2372      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
2373      *
2374      * @return This builder for chaining.
2375      */
clearParent()2376     public Builder clearParent() {
2377       parent_ = getDefaultInstance().getParent();
2378       bitField0_ = (bitField0_ & ~0x00000001);
2379       onChanged();
2380       return this;
2381     }
2382     /**
2383      *
2384      *
2385      * <pre>
2386      * Required. Target project and location to make a call.
2387      * Format: `projects/{project-id}/locations/{location-id}`.
2388      * If no location is specified, a region will be chosen automatically.
2389      * </pre>
2390      *
2391      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
2392      *
2393      * @param value The bytes for parent to set.
2394      * @return This builder for chaining.
2395      */
setParentBytes(com.google.protobuf.ByteString value)2396     public Builder setParentBytes(com.google.protobuf.ByteString value) {
2397       if (value == null) {
2398         throw new NullPointerException();
2399       }
2400       checkByteStringIsUtf8(value);
2401       parent_ = value;
2402       bitField0_ |= 0x00000001;
2403       onChanged();
2404       return this;
2405     }
2406 
2407     private com.google.protobuf.Duration timeout_;
2408     private com.google.protobuf.SingleFieldBuilderV3<
2409             com.google.protobuf.Duration,
2410             com.google.protobuf.Duration.Builder,
2411             com.google.protobuf.DurationOrBuilder>
2412         timeoutBuilder_;
2413     /**
2414      *
2415      *
2416      * <pre>
2417      * If this timeout is set, the server returns a response before the timeout
2418      * period has elapsed or the server deadline for synchronous requests is
2419      * reached, whichever is sooner.
2420      * For asynchronous requests, the server will generate a solution (if
2421      * possible) before the timeout has elapsed.
2422      * </pre>
2423      *
2424      * <code>.google.protobuf.Duration timeout = 2;</code>
2425      *
2426      * @return Whether the timeout field is set.
2427      */
hasTimeout()2428     public boolean hasTimeout() {
2429       return ((bitField0_ & 0x00000002) != 0);
2430     }
2431     /**
2432      *
2433      *
2434      * <pre>
2435      * If this timeout is set, the server returns a response before the timeout
2436      * period has elapsed or the server deadline for synchronous requests is
2437      * reached, whichever is sooner.
2438      * For asynchronous requests, the server will generate a solution (if
2439      * possible) before the timeout has elapsed.
2440      * </pre>
2441      *
2442      * <code>.google.protobuf.Duration timeout = 2;</code>
2443      *
2444      * @return The timeout.
2445      */
getTimeout()2446     public com.google.protobuf.Duration getTimeout() {
2447       if (timeoutBuilder_ == null) {
2448         return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
2449       } else {
2450         return timeoutBuilder_.getMessage();
2451       }
2452     }
2453     /**
2454      *
2455      *
2456      * <pre>
2457      * If this timeout is set, the server returns a response before the timeout
2458      * period has elapsed or the server deadline for synchronous requests is
2459      * reached, whichever is sooner.
2460      * For asynchronous requests, the server will generate a solution (if
2461      * possible) before the timeout has elapsed.
2462      * </pre>
2463      *
2464      * <code>.google.protobuf.Duration timeout = 2;</code>
2465      */
setTimeout(com.google.protobuf.Duration value)2466     public Builder setTimeout(com.google.protobuf.Duration value) {
2467       if (timeoutBuilder_ == null) {
2468         if (value == null) {
2469           throw new NullPointerException();
2470         }
2471         timeout_ = value;
2472       } else {
2473         timeoutBuilder_.setMessage(value);
2474       }
2475       bitField0_ |= 0x00000002;
2476       onChanged();
2477       return this;
2478     }
2479     /**
2480      *
2481      *
2482      * <pre>
2483      * If this timeout is set, the server returns a response before the timeout
2484      * period has elapsed or the server deadline for synchronous requests is
2485      * reached, whichever is sooner.
2486      * For asynchronous requests, the server will generate a solution (if
2487      * possible) before the timeout has elapsed.
2488      * </pre>
2489      *
2490      * <code>.google.protobuf.Duration timeout = 2;</code>
2491      */
setTimeout(com.google.protobuf.Duration.Builder builderForValue)2492     public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) {
2493       if (timeoutBuilder_ == null) {
2494         timeout_ = builderForValue.build();
2495       } else {
2496         timeoutBuilder_.setMessage(builderForValue.build());
2497       }
2498       bitField0_ |= 0x00000002;
2499       onChanged();
2500       return this;
2501     }
2502     /**
2503      *
2504      *
2505      * <pre>
2506      * If this timeout is set, the server returns a response before the timeout
2507      * period has elapsed or the server deadline for synchronous requests is
2508      * reached, whichever is sooner.
2509      * For asynchronous requests, the server will generate a solution (if
2510      * possible) before the timeout has elapsed.
2511      * </pre>
2512      *
2513      * <code>.google.protobuf.Duration timeout = 2;</code>
2514      */
mergeTimeout(com.google.protobuf.Duration value)2515     public Builder mergeTimeout(com.google.protobuf.Duration value) {
2516       if (timeoutBuilder_ == null) {
2517         if (((bitField0_ & 0x00000002) != 0)
2518             && timeout_ != null
2519             && timeout_ != com.google.protobuf.Duration.getDefaultInstance()) {
2520           getTimeoutBuilder().mergeFrom(value);
2521         } else {
2522           timeout_ = value;
2523         }
2524       } else {
2525         timeoutBuilder_.mergeFrom(value);
2526       }
2527       bitField0_ |= 0x00000002;
2528       onChanged();
2529       return this;
2530     }
2531     /**
2532      *
2533      *
2534      * <pre>
2535      * If this timeout is set, the server returns a response before the timeout
2536      * period has elapsed or the server deadline for synchronous requests is
2537      * reached, whichever is sooner.
2538      * For asynchronous requests, the server will generate a solution (if
2539      * possible) before the timeout has elapsed.
2540      * </pre>
2541      *
2542      * <code>.google.protobuf.Duration timeout = 2;</code>
2543      */
clearTimeout()2544     public Builder clearTimeout() {
2545       bitField0_ = (bitField0_ & ~0x00000002);
2546       timeout_ = null;
2547       if (timeoutBuilder_ != null) {
2548         timeoutBuilder_.dispose();
2549         timeoutBuilder_ = null;
2550       }
2551       onChanged();
2552       return this;
2553     }
2554     /**
2555      *
2556      *
2557      * <pre>
2558      * If this timeout is set, the server returns a response before the timeout
2559      * period has elapsed or the server deadline for synchronous requests is
2560      * reached, whichever is sooner.
2561      * For asynchronous requests, the server will generate a solution (if
2562      * possible) before the timeout has elapsed.
2563      * </pre>
2564      *
2565      * <code>.google.protobuf.Duration timeout = 2;</code>
2566      */
getTimeoutBuilder()2567     public com.google.protobuf.Duration.Builder getTimeoutBuilder() {
2568       bitField0_ |= 0x00000002;
2569       onChanged();
2570       return getTimeoutFieldBuilder().getBuilder();
2571     }
2572     /**
2573      *
2574      *
2575      * <pre>
2576      * If this timeout is set, the server returns a response before the timeout
2577      * period has elapsed or the server deadline for synchronous requests is
2578      * reached, whichever is sooner.
2579      * For asynchronous requests, the server will generate a solution (if
2580      * possible) before the timeout has elapsed.
2581      * </pre>
2582      *
2583      * <code>.google.protobuf.Duration timeout = 2;</code>
2584      */
getTimeoutOrBuilder()2585     public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
2586       if (timeoutBuilder_ != null) {
2587         return timeoutBuilder_.getMessageOrBuilder();
2588       } else {
2589         return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
2590       }
2591     }
2592     /**
2593      *
2594      *
2595      * <pre>
2596      * If this timeout is set, the server returns a response before the timeout
2597      * period has elapsed or the server deadline for synchronous requests is
2598      * reached, whichever is sooner.
2599      * For asynchronous requests, the server will generate a solution (if
2600      * possible) before the timeout has elapsed.
2601      * </pre>
2602      *
2603      * <code>.google.protobuf.Duration timeout = 2;</code>
2604      */
2605     private com.google.protobuf.SingleFieldBuilderV3<
2606             com.google.protobuf.Duration,
2607             com.google.protobuf.Duration.Builder,
2608             com.google.protobuf.DurationOrBuilder>
getTimeoutFieldBuilder()2609         getTimeoutFieldBuilder() {
2610       if (timeoutBuilder_ == null) {
2611         timeoutBuilder_ =
2612             new com.google.protobuf.SingleFieldBuilderV3<
2613                 com.google.protobuf.Duration,
2614                 com.google.protobuf.Duration.Builder,
2615                 com.google.protobuf.DurationOrBuilder>(
2616                 getTimeout(), getParentForChildren(), isClean());
2617         timeout_ = null;
2618       }
2619       return timeoutBuilder_;
2620     }
2621 
2622     private com.google.cloud.optimization.v1.ShipmentModel model_;
2623     private com.google.protobuf.SingleFieldBuilderV3<
2624             com.google.cloud.optimization.v1.ShipmentModel,
2625             com.google.cloud.optimization.v1.ShipmentModel.Builder,
2626             com.google.cloud.optimization.v1.ShipmentModelOrBuilder>
2627         modelBuilder_;
2628     /**
2629      *
2630      *
2631      * <pre>
2632      * Shipment model to solve.
2633      * </pre>
2634      *
2635      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2636      *
2637      * @return Whether the model field is set.
2638      */
hasModel()2639     public boolean hasModel() {
2640       return ((bitField0_ & 0x00000004) != 0);
2641     }
2642     /**
2643      *
2644      *
2645      * <pre>
2646      * Shipment model to solve.
2647      * </pre>
2648      *
2649      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2650      *
2651      * @return The model.
2652      */
getModel()2653     public com.google.cloud.optimization.v1.ShipmentModel getModel() {
2654       if (modelBuilder_ == null) {
2655         return model_ == null
2656             ? com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()
2657             : model_;
2658       } else {
2659         return modelBuilder_.getMessage();
2660       }
2661     }
2662     /**
2663      *
2664      *
2665      * <pre>
2666      * Shipment model to solve.
2667      * </pre>
2668      *
2669      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2670      */
setModel(com.google.cloud.optimization.v1.ShipmentModel value)2671     public Builder setModel(com.google.cloud.optimization.v1.ShipmentModel value) {
2672       if (modelBuilder_ == null) {
2673         if (value == null) {
2674           throw new NullPointerException();
2675         }
2676         model_ = value;
2677       } else {
2678         modelBuilder_.setMessage(value);
2679       }
2680       bitField0_ |= 0x00000004;
2681       onChanged();
2682       return this;
2683     }
2684     /**
2685      *
2686      *
2687      * <pre>
2688      * Shipment model to solve.
2689      * </pre>
2690      *
2691      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2692      */
setModel( com.google.cloud.optimization.v1.ShipmentModel.Builder builderForValue)2693     public Builder setModel(
2694         com.google.cloud.optimization.v1.ShipmentModel.Builder builderForValue) {
2695       if (modelBuilder_ == null) {
2696         model_ = builderForValue.build();
2697       } else {
2698         modelBuilder_.setMessage(builderForValue.build());
2699       }
2700       bitField0_ |= 0x00000004;
2701       onChanged();
2702       return this;
2703     }
2704     /**
2705      *
2706      *
2707      * <pre>
2708      * Shipment model to solve.
2709      * </pre>
2710      *
2711      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2712      */
mergeModel(com.google.cloud.optimization.v1.ShipmentModel value)2713     public Builder mergeModel(com.google.cloud.optimization.v1.ShipmentModel value) {
2714       if (modelBuilder_ == null) {
2715         if (((bitField0_ & 0x00000004) != 0)
2716             && model_ != null
2717             && model_ != com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()) {
2718           getModelBuilder().mergeFrom(value);
2719         } else {
2720           model_ = value;
2721         }
2722       } else {
2723         modelBuilder_.mergeFrom(value);
2724       }
2725       bitField0_ |= 0x00000004;
2726       onChanged();
2727       return this;
2728     }
2729     /**
2730      *
2731      *
2732      * <pre>
2733      * Shipment model to solve.
2734      * </pre>
2735      *
2736      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2737      */
clearModel()2738     public Builder clearModel() {
2739       bitField0_ = (bitField0_ & ~0x00000004);
2740       model_ = null;
2741       if (modelBuilder_ != null) {
2742         modelBuilder_.dispose();
2743         modelBuilder_ = null;
2744       }
2745       onChanged();
2746       return this;
2747     }
2748     /**
2749      *
2750      *
2751      * <pre>
2752      * Shipment model to solve.
2753      * </pre>
2754      *
2755      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2756      */
getModelBuilder()2757     public com.google.cloud.optimization.v1.ShipmentModel.Builder getModelBuilder() {
2758       bitField0_ |= 0x00000004;
2759       onChanged();
2760       return getModelFieldBuilder().getBuilder();
2761     }
2762     /**
2763      *
2764      *
2765      * <pre>
2766      * Shipment model to solve.
2767      * </pre>
2768      *
2769      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2770      */
getModelOrBuilder()2771     public com.google.cloud.optimization.v1.ShipmentModelOrBuilder getModelOrBuilder() {
2772       if (modelBuilder_ != null) {
2773         return modelBuilder_.getMessageOrBuilder();
2774       } else {
2775         return model_ == null
2776             ? com.google.cloud.optimization.v1.ShipmentModel.getDefaultInstance()
2777             : model_;
2778       }
2779     }
2780     /**
2781      *
2782      *
2783      * <pre>
2784      * Shipment model to solve.
2785      * </pre>
2786      *
2787      * <code>.google.cloud.optimization.v1.ShipmentModel model = 3;</code>
2788      */
2789     private com.google.protobuf.SingleFieldBuilderV3<
2790             com.google.cloud.optimization.v1.ShipmentModel,
2791             com.google.cloud.optimization.v1.ShipmentModel.Builder,
2792             com.google.cloud.optimization.v1.ShipmentModelOrBuilder>
getModelFieldBuilder()2793         getModelFieldBuilder() {
2794       if (modelBuilder_ == null) {
2795         modelBuilder_ =
2796             new com.google.protobuf.SingleFieldBuilderV3<
2797                 com.google.cloud.optimization.v1.ShipmentModel,
2798                 com.google.cloud.optimization.v1.ShipmentModel.Builder,
2799                 com.google.cloud.optimization.v1.ShipmentModelOrBuilder>(
2800                 getModel(), getParentForChildren(), isClean());
2801         model_ = null;
2802       }
2803       return modelBuilder_;
2804     }
2805 
2806     private int solvingMode_ = 0;
2807     /**
2808      *
2809      *
2810      * <pre>
2811      * By default, the solving mode is `DEFAULT_SOLVE` (0).
2812      * </pre>
2813      *
2814      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
2815      *
2816      * @return The enum numeric value on the wire for solvingMode.
2817      */
2818     @java.lang.Override
getSolvingModeValue()2819     public int getSolvingModeValue() {
2820       return solvingMode_;
2821     }
2822     /**
2823      *
2824      *
2825      * <pre>
2826      * By default, the solving mode is `DEFAULT_SOLVE` (0).
2827      * </pre>
2828      *
2829      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
2830      *
2831      * @param value The enum numeric value on the wire for solvingMode to set.
2832      * @return This builder for chaining.
2833      */
setSolvingModeValue(int value)2834     public Builder setSolvingModeValue(int value) {
2835       solvingMode_ = value;
2836       bitField0_ |= 0x00000008;
2837       onChanged();
2838       return this;
2839     }
2840     /**
2841      *
2842      *
2843      * <pre>
2844      * By default, the solving mode is `DEFAULT_SOLVE` (0).
2845      * </pre>
2846      *
2847      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
2848      *
2849      * @return The solvingMode.
2850      */
2851     @java.lang.Override
getSolvingMode()2852     public com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode getSolvingMode() {
2853       com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode result =
2854           com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.forNumber(solvingMode_);
2855       return result == null
2856           ? com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode.UNRECOGNIZED
2857           : result;
2858     }
2859     /**
2860      *
2861      *
2862      * <pre>
2863      * By default, the solving mode is `DEFAULT_SOLVE` (0).
2864      * </pre>
2865      *
2866      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
2867      *
2868      * @param value The solvingMode to set.
2869      * @return This builder for chaining.
2870      */
setSolvingMode( com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode value)2871     public Builder setSolvingMode(
2872         com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode value) {
2873       if (value == null) {
2874         throw new NullPointerException();
2875       }
2876       bitField0_ |= 0x00000008;
2877       solvingMode_ = value.getNumber();
2878       onChanged();
2879       return this;
2880     }
2881     /**
2882      *
2883      *
2884      * <pre>
2885      * By default, the solving mode is `DEFAULT_SOLVE` (0).
2886      * </pre>
2887      *
2888      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;</code>
2889      *
2890      * @return This builder for chaining.
2891      */
clearSolvingMode()2892     public Builder clearSolvingMode() {
2893       bitField0_ = (bitField0_ & ~0x00000008);
2894       solvingMode_ = 0;
2895       onChanged();
2896       return this;
2897     }
2898 
2899     private int maxValidationErrors_;
2900     /**
2901      *
2902      *
2903      * <pre>
2904      * Truncates the number of validation errors returned. These errors are
2905      * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
2906      * error detail (https://cloud.google.com/apis/design/errors#error_details),
2907      * unless solving_mode=VALIDATE_ONLY: see the
2908      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
2909      * field.
2910      * This defaults to 100 and is capped at 10,000.
2911      * </pre>
2912      *
2913      * <code>optional int32 max_validation_errors = 5;</code>
2914      *
2915      * @return Whether the maxValidationErrors field is set.
2916      */
2917     @java.lang.Override
hasMaxValidationErrors()2918     public boolean hasMaxValidationErrors() {
2919       return ((bitField0_ & 0x00000010) != 0);
2920     }
2921     /**
2922      *
2923      *
2924      * <pre>
2925      * Truncates the number of validation errors returned. These errors are
2926      * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
2927      * error detail (https://cloud.google.com/apis/design/errors#error_details),
2928      * unless solving_mode=VALIDATE_ONLY: see the
2929      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
2930      * field.
2931      * This defaults to 100 and is capped at 10,000.
2932      * </pre>
2933      *
2934      * <code>optional int32 max_validation_errors = 5;</code>
2935      *
2936      * @return The maxValidationErrors.
2937      */
2938     @java.lang.Override
getMaxValidationErrors()2939     public int getMaxValidationErrors() {
2940       return maxValidationErrors_;
2941     }
2942     /**
2943      *
2944      *
2945      * <pre>
2946      * Truncates the number of validation errors returned. These errors are
2947      * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
2948      * error detail (https://cloud.google.com/apis/design/errors#error_details),
2949      * unless solving_mode=VALIDATE_ONLY: see the
2950      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
2951      * field.
2952      * This defaults to 100 and is capped at 10,000.
2953      * </pre>
2954      *
2955      * <code>optional int32 max_validation_errors = 5;</code>
2956      *
2957      * @param value The maxValidationErrors to set.
2958      * @return This builder for chaining.
2959      */
setMaxValidationErrors(int value)2960     public Builder setMaxValidationErrors(int value) {
2961 
2962       maxValidationErrors_ = value;
2963       bitField0_ |= 0x00000010;
2964       onChanged();
2965       return this;
2966     }
2967     /**
2968      *
2969      *
2970      * <pre>
2971      * Truncates the number of validation errors returned. These errors are
2972      * typically attached to an INVALID_ARGUMENT error payload as a BadRequest
2973      * error detail (https://cloud.google.com/apis/design/errors#error_details),
2974      * unless solving_mode=VALIDATE_ONLY: see the
2975      * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
2976      * field.
2977      * This defaults to 100 and is capped at 10,000.
2978      * </pre>
2979      *
2980      * <code>optional int32 max_validation_errors = 5;</code>
2981      *
2982      * @return This builder for chaining.
2983      */
clearMaxValidationErrors()2984     public Builder clearMaxValidationErrors() {
2985       bitField0_ = (bitField0_ & ~0x00000010);
2986       maxValidationErrors_ = 0;
2987       onChanged();
2988       return this;
2989     }
2990 
2991     private int searchMode_ = 0;
2992     /**
2993      *
2994      *
2995      * <pre>
2996      * Search mode used to solve the request.
2997      * </pre>
2998      *
2999      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
3000      *
3001      * @return The enum numeric value on the wire for searchMode.
3002      */
3003     @java.lang.Override
getSearchModeValue()3004     public int getSearchModeValue() {
3005       return searchMode_;
3006     }
3007     /**
3008      *
3009      *
3010      * <pre>
3011      * Search mode used to solve the request.
3012      * </pre>
3013      *
3014      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
3015      *
3016      * @param value The enum numeric value on the wire for searchMode to set.
3017      * @return This builder for chaining.
3018      */
setSearchModeValue(int value)3019     public Builder setSearchModeValue(int value) {
3020       searchMode_ = value;
3021       bitField0_ |= 0x00000020;
3022       onChanged();
3023       return this;
3024     }
3025     /**
3026      *
3027      *
3028      * <pre>
3029      * Search mode used to solve the request.
3030      * </pre>
3031      *
3032      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
3033      *
3034      * @return The searchMode.
3035      */
3036     @java.lang.Override
getSearchMode()3037     public com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode getSearchMode() {
3038       com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode result =
3039           com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.forNumber(searchMode_);
3040       return result == null
3041           ? com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode.UNRECOGNIZED
3042           : result;
3043     }
3044     /**
3045      *
3046      *
3047      * <pre>
3048      * Search mode used to solve the request.
3049      * </pre>
3050      *
3051      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
3052      *
3053      * @param value The searchMode to set.
3054      * @return This builder for chaining.
3055      */
setSearchMode( com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode value)3056     public Builder setSearchMode(
3057         com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode value) {
3058       if (value == null) {
3059         throw new NullPointerException();
3060       }
3061       bitField0_ |= 0x00000020;
3062       searchMode_ = value.getNumber();
3063       onChanged();
3064       return this;
3065     }
3066     /**
3067      *
3068      *
3069      * <pre>
3070      * Search mode used to solve the request.
3071      * </pre>
3072      *
3073      * <code>.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;</code>
3074      *
3075      * @return This builder for chaining.
3076      */
clearSearchMode()3077     public Builder clearSearchMode() {
3078       bitField0_ = (bitField0_ & ~0x00000020);
3079       searchMode_ = 0;
3080       onChanged();
3081       return this;
3082     }
3083 
3084     private java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
3085         injectedFirstSolutionRoutes_ = java.util.Collections.emptyList();
3086 
ensureInjectedFirstSolutionRoutesIsMutable()3087     private void ensureInjectedFirstSolutionRoutesIsMutable() {
3088       if (!((bitField0_ & 0x00000040) != 0)) {
3089         injectedFirstSolutionRoutes_ =
3090             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentRoute>(
3091                 injectedFirstSolutionRoutes_);
3092         bitField0_ |= 0x00000040;
3093       }
3094     }
3095 
3096     private com.google.protobuf.RepeatedFieldBuilderV3<
3097             com.google.cloud.optimization.v1.ShipmentRoute,
3098             com.google.cloud.optimization.v1.ShipmentRoute.Builder,
3099             com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
3100         injectedFirstSolutionRoutesBuilder_;
3101 
3102     /**
3103      *
3104      *
3105      * <pre>
3106      * Guide the optimization algorithm in finding a first solution that is
3107      * similar to a previous solution.
3108      * The model is constrained when the first solution is built.
3109      * Any shipments not performed on a route are implicitly skipped in the first
3110      * solution, but they may be performed in successive solutions.
3111      * The solution must satisfy some basic validity assumptions:
3112      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3113      *   * for all visits, `shipment_index` and `visit_request_index` must be
3114      *     in range.
3115      *   * a shipment may only be referenced on one route.
3116      *   * the pickup of a pickup-delivery shipment must be performed before
3117      *     the delivery.
3118      *   * no more than one pickup alternative or delivery alternative of
3119      *     a shipment may be performed.
3120      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3121      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3122      *     &lt;= vehicle_end_time`).
3123      *   * a shipment may only be performed on a vehicle that is allowed. A
3124      *     vehicle is allowed if
3125      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3126      *     is empty or its `vehicle_index` is included in
3127      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3128      * If the injected solution is not feasible, a validation error is not
3129      * necessarily returned and an error indicating infeasibility may be returned
3130      * instead.
3131      * </pre>
3132      *
3133      * <code>
3134      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3135      * </code>
3136      */
3137     public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
getInjectedFirstSolutionRoutesList()3138         getInjectedFirstSolutionRoutesList() {
3139       if (injectedFirstSolutionRoutesBuilder_ == null) {
3140         return java.util.Collections.unmodifiableList(injectedFirstSolutionRoutes_);
3141       } else {
3142         return injectedFirstSolutionRoutesBuilder_.getMessageList();
3143       }
3144     }
3145     /**
3146      *
3147      *
3148      * <pre>
3149      * Guide the optimization algorithm in finding a first solution that is
3150      * similar to a previous solution.
3151      * The model is constrained when the first solution is built.
3152      * Any shipments not performed on a route are implicitly skipped in the first
3153      * solution, but they may be performed in successive solutions.
3154      * The solution must satisfy some basic validity assumptions:
3155      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3156      *   * for all visits, `shipment_index` and `visit_request_index` must be
3157      *     in range.
3158      *   * a shipment may only be referenced on one route.
3159      *   * the pickup of a pickup-delivery shipment must be performed before
3160      *     the delivery.
3161      *   * no more than one pickup alternative or delivery alternative of
3162      *     a shipment may be performed.
3163      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3164      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3165      *     &lt;= vehicle_end_time`).
3166      *   * a shipment may only be performed on a vehicle that is allowed. A
3167      *     vehicle is allowed if
3168      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3169      *     is empty or its `vehicle_index` is included in
3170      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3171      * If the injected solution is not feasible, a validation error is not
3172      * necessarily returned and an error indicating infeasibility may be returned
3173      * instead.
3174      * </pre>
3175      *
3176      * <code>
3177      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3178      * </code>
3179      */
getInjectedFirstSolutionRoutesCount()3180     public int getInjectedFirstSolutionRoutesCount() {
3181       if (injectedFirstSolutionRoutesBuilder_ == null) {
3182         return injectedFirstSolutionRoutes_.size();
3183       } else {
3184         return injectedFirstSolutionRoutesBuilder_.getCount();
3185       }
3186     }
3187     /**
3188      *
3189      *
3190      * <pre>
3191      * Guide the optimization algorithm in finding a first solution that is
3192      * similar to a previous solution.
3193      * The model is constrained when the first solution is built.
3194      * Any shipments not performed on a route are implicitly skipped in the first
3195      * solution, but they may be performed in successive solutions.
3196      * The solution must satisfy some basic validity assumptions:
3197      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3198      *   * for all visits, `shipment_index` and `visit_request_index` must be
3199      *     in range.
3200      *   * a shipment may only be referenced on one route.
3201      *   * the pickup of a pickup-delivery shipment must be performed before
3202      *     the delivery.
3203      *   * no more than one pickup alternative or delivery alternative of
3204      *     a shipment may be performed.
3205      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3206      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3207      *     &lt;= vehicle_end_time`).
3208      *   * a shipment may only be performed on a vehicle that is allowed. A
3209      *     vehicle is allowed if
3210      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3211      *     is empty or its `vehicle_index` is included in
3212      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3213      * If the injected solution is not feasible, a validation error is not
3214      * necessarily returned and an error indicating infeasibility may be returned
3215      * instead.
3216      * </pre>
3217      *
3218      * <code>
3219      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3220      * </code>
3221      */
getInjectedFirstSolutionRoutes( int index)3222     public com.google.cloud.optimization.v1.ShipmentRoute getInjectedFirstSolutionRoutes(
3223         int index) {
3224       if (injectedFirstSolutionRoutesBuilder_ == null) {
3225         return injectedFirstSolutionRoutes_.get(index);
3226       } else {
3227         return injectedFirstSolutionRoutesBuilder_.getMessage(index);
3228       }
3229     }
3230     /**
3231      *
3232      *
3233      * <pre>
3234      * Guide the optimization algorithm in finding a first solution that is
3235      * similar to a previous solution.
3236      * The model is constrained when the first solution is built.
3237      * Any shipments not performed on a route are implicitly skipped in the first
3238      * solution, but they may be performed in successive solutions.
3239      * The solution must satisfy some basic validity assumptions:
3240      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3241      *   * for all visits, `shipment_index` and `visit_request_index` must be
3242      *     in range.
3243      *   * a shipment may only be referenced on one route.
3244      *   * the pickup of a pickup-delivery shipment must be performed before
3245      *     the delivery.
3246      *   * no more than one pickup alternative or delivery alternative of
3247      *     a shipment may be performed.
3248      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3249      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3250      *     &lt;= vehicle_end_time`).
3251      *   * a shipment may only be performed on a vehicle that is allowed. A
3252      *     vehicle is allowed if
3253      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3254      *     is empty or its `vehicle_index` is included in
3255      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3256      * If the injected solution is not feasible, a validation error is not
3257      * necessarily returned and an error indicating infeasibility may be returned
3258      * instead.
3259      * </pre>
3260      *
3261      * <code>
3262      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3263      * </code>
3264      */
setInjectedFirstSolutionRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute value)3265     public Builder setInjectedFirstSolutionRoutes(
3266         int index, com.google.cloud.optimization.v1.ShipmentRoute value) {
3267       if (injectedFirstSolutionRoutesBuilder_ == null) {
3268         if (value == null) {
3269           throw new NullPointerException();
3270         }
3271         ensureInjectedFirstSolutionRoutesIsMutable();
3272         injectedFirstSolutionRoutes_.set(index, value);
3273         onChanged();
3274       } else {
3275         injectedFirstSolutionRoutesBuilder_.setMessage(index, value);
3276       }
3277       return this;
3278     }
3279     /**
3280      *
3281      *
3282      * <pre>
3283      * Guide the optimization algorithm in finding a first solution that is
3284      * similar to a previous solution.
3285      * The model is constrained when the first solution is built.
3286      * Any shipments not performed on a route are implicitly skipped in the first
3287      * solution, but they may be performed in successive solutions.
3288      * The solution must satisfy some basic validity assumptions:
3289      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3290      *   * for all visits, `shipment_index` and `visit_request_index` must be
3291      *     in range.
3292      *   * a shipment may only be referenced on one route.
3293      *   * the pickup of a pickup-delivery shipment must be performed before
3294      *     the delivery.
3295      *   * no more than one pickup alternative or delivery alternative of
3296      *     a shipment may be performed.
3297      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3298      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3299      *     &lt;= vehicle_end_time`).
3300      *   * a shipment may only be performed on a vehicle that is allowed. A
3301      *     vehicle is allowed if
3302      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3303      *     is empty or its `vehicle_index` is included in
3304      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3305      * If the injected solution is not feasible, a validation error is not
3306      * necessarily returned and an error indicating infeasibility may be returned
3307      * instead.
3308      * </pre>
3309      *
3310      * <code>
3311      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3312      * </code>
3313      */
setInjectedFirstSolutionRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)3314     public Builder setInjectedFirstSolutionRoutes(
3315         int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
3316       if (injectedFirstSolutionRoutesBuilder_ == null) {
3317         ensureInjectedFirstSolutionRoutesIsMutable();
3318         injectedFirstSolutionRoutes_.set(index, builderForValue.build());
3319         onChanged();
3320       } else {
3321         injectedFirstSolutionRoutesBuilder_.setMessage(index, builderForValue.build());
3322       }
3323       return this;
3324     }
3325     /**
3326      *
3327      *
3328      * <pre>
3329      * Guide the optimization algorithm in finding a first solution that is
3330      * similar to a previous solution.
3331      * The model is constrained when the first solution is built.
3332      * Any shipments not performed on a route are implicitly skipped in the first
3333      * solution, but they may be performed in successive solutions.
3334      * The solution must satisfy some basic validity assumptions:
3335      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3336      *   * for all visits, `shipment_index` and `visit_request_index` must be
3337      *     in range.
3338      *   * a shipment may only be referenced on one route.
3339      *   * the pickup of a pickup-delivery shipment must be performed before
3340      *     the delivery.
3341      *   * no more than one pickup alternative or delivery alternative of
3342      *     a shipment may be performed.
3343      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3344      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3345      *     &lt;= vehicle_end_time`).
3346      *   * a shipment may only be performed on a vehicle that is allowed. A
3347      *     vehicle is allowed if
3348      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3349      *     is empty or its `vehicle_index` is included in
3350      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3351      * If the injected solution is not feasible, a validation error is not
3352      * necessarily returned and an error indicating infeasibility may be returned
3353      * instead.
3354      * </pre>
3355      *
3356      * <code>
3357      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3358      * </code>
3359      */
addInjectedFirstSolutionRoutes( com.google.cloud.optimization.v1.ShipmentRoute value)3360     public Builder addInjectedFirstSolutionRoutes(
3361         com.google.cloud.optimization.v1.ShipmentRoute value) {
3362       if (injectedFirstSolutionRoutesBuilder_ == null) {
3363         if (value == null) {
3364           throw new NullPointerException();
3365         }
3366         ensureInjectedFirstSolutionRoutesIsMutable();
3367         injectedFirstSolutionRoutes_.add(value);
3368         onChanged();
3369       } else {
3370         injectedFirstSolutionRoutesBuilder_.addMessage(value);
3371       }
3372       return this;
3373     }
3374     /**
3375      *
3376      *
3377      * <pre>
3378      * Guide the optimization algorithm in finding a first solution that is
3379      * similar to a previous solution.
3380      * The model is constrained when the first solution is built.
3381      * Any shipments not performed on a route are implicitly skipped in the first
3382      * solution, but they may be performed in successive solutions.
3383      * The solution must satisfy some basic validity assumptions:
3384      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3385      *   * for all visits, `shipment_index` and `visit_request_index` must be
3386      *     in range.
3387      *   * a shipment may only be referenced on one route.
3388      *   * the pickup of a pickup-delivery shipment must be performed before
3389      *     the delivery.
3390      *   * no more than one pickup alternative or delivery alternative of
3391      *     a shipment may be performed.
3392      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3393      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3394      *     &lt;= vehicle_end_time`).
3395      *   * a shipment may only be performed on a vehicle that is allowed. A
3396      *     vehicle is allowed if
3397      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3398      *     is empty or its `vehicle_index` is included in
3399      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3400      * If the injected solution is not feasible, a validation error is not
3401      * necessarily returned and an error indicating infeasibility may be returned
3402      * instead.
3403      * </pre>
3404      *
3405      * <code>
3406      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3407      * </code>
3408      */
addInjectedFirstSolutionRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute value)3409     public Builder addInjectedFirstSolutionRoutes(
3410         int index, com.google.cloud.optimization.v1.ShipmentRoute value) {
3411       if (injectedFirstSolutionRoutesBuilder_ == null) {
3412         if (value == null) {
3413           throw new NullPointerException();
3414         }
3415         ensureInjectedFirstSolutionRoutesIsMutable();
3416         injectedFirstSolutionRoutes_.add(index, value);
3417         onChanged();
3418       } else {
3419         injectedFirstSolutionRoutesBuilder_.addMessage(index, value);
3420       }
3421       return this;
3422     }
3423     /**
3424      *
3425      *
3426      * <pre>
3427      * Guide the optimization algorithm in finding a first solution that is
3428      * similar to a previous solution.
3429      * The model is constrained when the first solution is built.
3430      * Any shipments not performed on a route are implicitly skipped in the first
3431      * solution, but they may be performed in successive solutions.
3432      * The solution must satisfy some basic validity assumptions:
3433      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3434      *   * for all visits, `shipment_index` and `visit_request_index` must be
3435      *     in range.
3436      *   * a shipment may only be referenced on one route.
3437      *   * the pickup of a pickup-delivery shipment must be performed before
3438      *     the delivery.
3439      *   * no more than one pickup alternative or delivery alternative of
3440      *     a shipment may be performed.
3441      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3442      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3443      *     &lt;= vehicle_end_time`).
3444      *   * a shipment may only be performed on a vehicle that is allowed. A
3445      *     vehicle is allowed if
3446      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3447      *     is empty or its `vehicle_index` is included in
3448      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3449      * If the injected solution is not feasible, a validation error is not
3450      * necessarily returned and an error indicating infeasibility may be returned
3451      * instead.
3452      * </pre>
3453      *
3454      * <code>
3455      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3456      * </code>
3457      */
addInjectedFirstSolutionRoutes( com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)3458     public Builder addInjectedFirstSolutionRoutes(
3459         com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
3460       if (injectedFirstSolutionRoutesBuilder_ == null) {
3461         ensureInjectedFirstSolutionRoutesIsMutable();
3462         injectedFirstSolutionRoutes_.add(builderForValue.build());
3463         onChanged();
3464       } else {
3465         injectedFirstSolutionRoutesBuilder_.addMessage(builderForValue.build());
3466       }
3467       return this;
3468     }
3469     /**
3470      *
3471      *
3472      * <pre>
3473      * Guide the optimization algorithm in finding a first solution that is
3474      * similar to a previous solution.
3475      * The model is constrained when the first solution is built.
3476      * Any shipments not performed on a route are implicitly skipped in the first
3477      * solution, but they may be performed in successive solutions.
3478      * The solution must satisfy some basic validity assumptions:
3479      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3480      *   * for all visits, `shipment_index` and `visit_request_index` must be
3481      *     in range.
3482      *   * a shipment may only be referenced on one route.
3483      *   * the pickup of a pickup-delivery shipment must be performed before
3484      *     the delivery.
3485      *   * no more than one pickup alternative or delivery alternative of
3486      *     a shipment may be performed.
3487      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3488      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3489      *     &lt;= vehicle_end_time`).
3490      *   * a shipment may only be performed on a vehicle that is allowed. A
3491      *     vehicle is allowed if
3492      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3493      *     is empty or its `vehicle_index` is included in
3494      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3495      * If the injected solution is not feasible, a validation error is not
3496      * necessarily returned and an error indicating infeasibility may be returned
3497      * instead.
3498      * </pre>
3499      *
3500      * <code>
3501      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3502      * </code>
3503      */
addInjectedFirstSolutionRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)3504     public Builder addInjectedFirstSolutionRoutes(
3505         int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
3506       if (injectedFirstSolutionRoutesBuilder_ == null) {
3507         ensureInjectedFirstSolutionRoutesIsMutable();
3508         injectedFirstSolutionRoutes_.add(index, builderForValue.build());
3509         onChanged();
3510       } else {
3511         injectedFirstSolutionRoutesBuilder_.addMessage(index, builderForValue.build());
3512       }
3513       return this;
3514     }
3515     /**
3516      *
3517      *
3518      * <pre>
3519      * Guide the optimization algorithm in finding a first solution that is
3520      * similar to a previous solution.
3521      * The model is constrained when the first solution is built.
3522      * Any shipments not performed on a route are implicitly skipped in the first
3523      * solution, but they may be performed in successive solutions.
3524      * The solution must satisfy some basic validity assumptions:
3525      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3526      *   * for all visits, `shipment_index` and `visit_request_index` must be
3527      *     in range.
3528      *   * a shipment may only be referenced on one route.
3529      *   * the pickup of a pickup-delivery shipment must be performed before
3530      *     the delivery.
3531      *   * no more than one pickup alternative or delivery alternative of
3532      *     a shipment may be performed.
3533      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3534      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3535      *     &lt;= vehicle_end_time`).
3536      *   * a shipment may only be performed on a vehicle that is allowed. A
3537      *     vehicle is allowed if
3538      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3539      *     is empty or its `vehicle_index` is included in
3540      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3541      * If the injected solution is not feasible, a validation error is not
3542      * necessarily returned and an error indicating infeasibility may be returned
3543      * instead.
3544      * </pre>
3545      *
3546      * <code>
3547      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3548      * </code>
3549      */
addAllInjectedFirstSolutionRoutes( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute> values)3550     public Builder addAllInjectedFirstSolutionRoutes(
3551         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute> values) {
3552       if (injectedFirstSolutionRoutesBuilder_ == null) {
3553         ensureInjectedFirstSolutionRoutesIsMutable();
3554         com.google.protobuf.AbstractMessageLite.Builder.addAll(
3555             values, injectedFirstSolutionRoutes_);
3556         onChanged();
3557       } else {
3558         injectedFirstSolutionRoutesBuilder_.addAllMessages(values);
3559       }
3560       return this;
3561     }
3562     /**
3563      *
3564      *
3565      * <pre>
3566      * Guide the optimization algorithm in finding a first solution that is
3567      * similar to a previous solution.
3568      * The model is constrained when the first solution is built.
3569      * Any shipments not performed on a route are implicitly skipped in the first
3570      * solution, but they may be performed in successive solutions.
3571      * The solution must satisfy some basic validity assumptions:
3572      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3573      *   * for all visits, `shipment_index` and `visit_request_index` must be
3574      *     in range.
3575      *   * a shipment may only be referenced on one route.
3576      *   * the pickup of a pickup-delivery shipment must be performed before
3577      *     the delivery.
3578      *   * no more than one pickup alternative or delivery alternative of
3579      *     a shipment may be performed.
3580      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3581      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3582      *     &lt;= vehicle_end_time`).
3583      *   * a shipment may only be performed on a vehicle that is allowed. A
3584      *     vehicle is allowed if
3585      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3586      *     is empty or its `vehicle_index` is included in
3587      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3588      * If the injected solution is not feasible, a validation error is not
3589      * necessarily returned and an error indicating infeasibility may be returned
3590      * instead.
3591      * </pre>
3592      *
3593      * <code>
3594      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3595      * </code>
3596      */
clearInjectedFirstSolutionRoutes()3597     public Builder clearInjectedFirstSolutionRoutes() {
3598       if (injectedFirstSolutionRoutesBuilder_ == null) {
3599         injectedFirstSolutionRoutes_ = java.util.Collections.emptyList();
3600         bitField0_ = (bitField0_ & ~0x00000040);
3601         onChanged();
3602       } else {
3603         injectedFirstSolutionRoutesBuilder_.clear();
3604       }
3605       return this;
3606     }
3607     /**
3608      *
3609      *
3610      * <pre>
3611      * Guide the optimization algorithm in finding a first solution that is
3612      * similar to a previous solution.
3613      * The model is constrained when the first solution is built.
3614      * Any shipments not performed on a route are implicitly skipped in the first
3615      * solution, but they may be performed in successive solutions.
3616      * The solution must satisfy some basic validity assumptions:
3617      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3618      *   * for all visits, `shipment_index` and `visit_request_index` must be
3619      *     in range.
3620      *   * a shipment may only be referenced on one route.
3621      *   * the pickup of a pickup-delivery shipment must be performed before
3622      *     the delivery.
3623      *   * no more than one pickup alternative or delivery alternative of
3624      *     a shipment may be performed.
3625      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3626      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3627      *     &lt;= vehicle_end_time`).
3628      *   * a shipment may only be performed on a vehicle that is allowed. A
3629      *     vehicle is allowed if
3630      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3631      *     is empty or its `vehicle_index` is included in
3632      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3633      * If the injected solution is not feasible, a validation error is not
3634      * necessarily returned and an error indicating infeasibility may be returned
3635      * instead.
3636      * </pre>
3637      *
3638      * <code>
3639      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3640      * </code>
3641      */
removeInjectedFirstSolutionRoutes(int index)3642     public Builder removeInjectedFirstSolutionRoutes(int index) {
3643       if (injectedFirstSolutionRoutesBuilder_ == null) {
3644         ensureInjectedFirstSolutionRoutesIsMutable();
3645         injectedFirstSolutionRoutes_.remove(index);
3646         onChanged();
3647       } else {
3648         injectedFirstSolutionRoutesBuilder_.remove(index);
3649       }
3650       return this;
3651     }
3652     /**
3653      *
3654      *
3655      * <pre>
3656      * Guide the optimization algorithm in finding a first solution that is
3657      * similar to a previous solution.
3658      * The model is constrained when the first solution is built.
3659      * Any shipments not performed on a route are implicitly skipped in the first
3660      * solution, but they may be performed in successive solutions.
3661      * The solution must satisfy some basic validity assumptions:
3662      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3663      *   * for all visits, `shipment_index` and `visit_request_index` must be
3664      *     in range.
3665      *   * a shipment may only be referenced on one route.
3666      *   * the pickup of a pickup-delivery shipment must be performed before
3667      *     the delivery.
3668      *   * no more than one pickup alternative or delivery alternative of
3669      *     a shipment may be performed.
3670      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3671      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3672      *     &lt;= vehicle_end_time`).
3673      *   * a shipment may only be performed on a vehicle that is allowed. A
3674      *     vehicle is allowed if
3675      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3676      *     is empty or its `vehicle_index` is included in
3677      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3678      * If the injected solution is not feasible, a validation error is not
3679      * necessarily returned and an error indicating infeasibility may be returned
3680      * instead.
3681      * </pre>
3682      *
3683      * <code>
3684      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3685      * </code>
3686      */
3687     public com.google.cloud.optimization.v1.ShipmentRoute.Builder
getInjectedFirstSolutionRoutesBuilder(int index)3688         getInjectedFirstSolutionRoutesBuilder(int index) {
3689       return getInjectedFirstSolutionRoutesFieldBuilder().getBuilder(index);
3690     }
3691     /**
3692      *
3693      *
3694      * <pre>
3695      * Guide the optimization algorithm in finding a first solution that is
3696      * similar to a previous solution.
3697      * The model is constrained when the first solution is built.
3698      * Any shipments not performed on a route are implicitly skipped in the first
3699      * solution, but they may be performed in successive solutions.
3700      * The solution must satisfy some basic validity assumptions:
3701      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3702      *   * for all visits, `shipment_index` and `visit_request_index` must be
3703      *     in range.
3704      *   * a shipment may only be referenced on one route.
3705      *   * the pickup of a pickup-delivery shipment must be performed before
3706      *     the delivery.
3707      *   * no more than one pickup alternative or delivery alternative of
3708      *     a shipment may be performed.
3709      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3710      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3711      *     &lt;= vehicle_end_time`).
3712      *   * a shipment may only be performed on a vehicle that is allowed. A
3713      *     vehicle is allowed if
3714      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3715      *     is empty or its `vehicle_index` is included in
3716      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3717      * If the injected solution is not feasible, a validation error is not
3718      * necessarily returned and an error indicating infeasibility may be returned
3719      * instead.
3720      * </pre>
3721      *
3722      * <code>
3723      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3724      * </code>
3725      */
3726     public com.google.cloud.optimization.v1.ShipmentRouteOrBuilder
getInjectedFirstSolutionRoutesOrBuilder(int index)3727         getInjectedFirstSolutionRoutesOrBuilder(int index) {
3728       if (injectedFirstSolutionRoutesBuilder_ == null) {
3729         return injectedFirstSolutionRoutes_.get(index);
3730       } else {
3731         return injectedFirstSolutionRoutesBuilder_.getMessageOrBuilder(index);
3732       }
3733     }
3734     /**
3735      *
3736      *
3737      * <pre>
3738      * Guide the optimization algorithm in finding a first solution that is
3739      * similar to a previous solution.
3740      * The model is constrained when the first solution is built.
3741      * Any shipments not performed on a route are implicitly skipped in the first
3742      * solution, but they may be performed in successive solutions.
3743      * The solution must satisfy some basic validity assumptions:
3744      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3745      *   * for all visits, `shipment_index` and `visit_request_index` must be
3746      *     in range.
3747      *   * a shipment may only be referenced on one route.
3748      *   * the pickup of a pickup-delivery shipment must be performed before
3749      *     the delivery.
3750      *   * no more than one pickup alternative or delivery alternative of
3751      *     a shipment may be performed.
3752      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3753      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3754      *     &lt;= vehicle_end_time`).
3755      *   * a shipment may only be performed on a vehicle that is allowed. A
3756      *     vehicle is allowed if
3757      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3758      *     is empty or its `vehicle_index` is included in
3759      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3760      * If the injected solution is not feasible, a validation error is not
3761      * necessarily returned and an error indicating infeasibility may be returned
3762      * instead.
3763      * </pre>
3764      *
3765      * <code>
3766      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3767      * </code>
3768      */
3769     public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getInjectedFirstSolutionRoutesOrBuilderList()3770         getInjectedFirstSolutionRoutesOrBuilderList() {
3771       if (injectedFirstSolutionRoutesBuilder_ != null) {
3772         return injectedFirstSolutionRoutesBuilder_.getMessageOrBuilderList();
3773       } else {
3774         return java.util.Collections.unmodifiableList(injectedFirstSolutionRoutes_);
3775       }
3776     }
3777     /**
3778      *
3779      *
3780      * <pre>
3781      * Guide the optimization algorithm in finding a first solution that is
3782      * similar to a previous solution.
3783      * The model is constrained when the first solution is built.
3784      * Any shipments not performed on a route are implicitly skipped in the first
3785      * solution, but they may be performed in successive solutions.
3786      * The solution must satisfy some basic validity assumptions:
3787      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3788      *   * for all visits, `shipment_index` and `visit_request_index` must be
3789      *     in range.
3790      *   * a shipment may only be referenced on one route.
3791      *   * the pickup of a pickup-delivery shipment must be performed before
3792      *     the delivery.
3793      *   * no more than one pickup alternative or delivery alternative of
3794      *     a shipment may be performed.
3795      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3796      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3797      *     &lt;= vehicle_end_time`).
3798      *   * a shipment may only be performed on a vehicle that is allowed. A
3799      *     vehicle is allowed if
3800      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3801      *     is empty or its `vehicle_index` is included in
3802      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3803      * If the injected solution is not feasible, a validation error is not
3804      * necessarily returned and an error indicating infeasibility may be returned
3805      * instead.
3806      * </pre>
3807      *
3808      * <code>
3809      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3810      * </code>
3811      */
3812     public com.google.cloud.optimization.v1.ShipmentRoute.Builder
addInjectedFirstSolutionRoutesBuilder()3813         addInjectedFirstSolutionRoutesBuilder() {
3814       return getInjectedFirstSolutionRoutesFieldBuilder()
3815           .addBuilder(com.google.cloud.optimization.v1.ShipmentRoute.getDefaultInstance());
3816     }
3817     /**
3818      *
3819      *
3820      * <pre>
3821      * Guide the optimization algorithm in finding a first solution that is
3822      * similar to a previous solution.
3823      * The model is constrained when the first solution is built.
3824      * Any shipments not performed on a route are implicitly skipped in the first
3825      * solution, but they may be performed in successive solutions.
3826      * The solution must satisfy some basic validity assumptions:
3827      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3828      *   * for all visits, `shipment_index` and `visit_request_index` must be
3829      *     in range.
3830      *   * a shipment may only be referenced on one route.
3831      *   * the pickup of a pickup-delivery shipment must be performed before
3832      *     the delivery.
3833      *   * no more than one pickup alternative or delivery alternative of
3834      *     a shipment may be performed.
3835      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3836      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3837      *     &lt;= vehicle_end_time`).
3838      *   * a shipment may only be performed on a vehicle that is allowed. A
3839      *     vehicle is allowed if
3840      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3841      *     is empty or its `vehicle_index` is included in
3842      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3843      * If the injected solution is not feasible, a validation error is not
3844      * necessarily returned and an error indicating infeasibility may be returned
3845      * instead.
3846      * </pre>
3847      *
3848      * <code>
3849      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3850      * </code>
3851      */
3852     public com.google.cloud.optimization.v1.ShipmentRoute.Builder
addInjectedFirstSolutionRoutesBuilder(int index)3853         addInjectedFirstSolutionRoutesBuilder(int index) {
3854       return getInjectedFirstSolutionRoutesFieldBuilder()
3855           .addBuilder(index, com.google.cloud.optimization.v1.ShipmentRoute.getDefaultInstance());
3856     }
3857     /**
3858      *
3859      *
3860      * <pre>
3861      * Guide the optimization algorithm in finding a first solution that is
3862      * similar to a previous solution.
3863      * The model is constrained when the first solution is built.
3864      * Any shipments not performed on a route are implicitly skipped in the first
3865      * solution, but they may be performed in successive solutions.
3866      * The solution must satisfy some basic validity assumptions:
3867      *   * for all routes, `vehicle_index` must be in range and not be duplicated.
3868      *   * for all visits, `shipment_index` and `visit_request_index` must be
3869      *     in range.
3870      *   * a shipment may only be referenced on one route.
3871      *   * the pickup of a pickup-delivery shipment must be performed before
3872      *     the delivery.
3873      *   * no more than one pickup alternative or delivery alternative of
3874      *     a shipment may be performed.
3875      *   * for all routes, times are increasing (i.e., `vehicle_start_time
3876      *     &lt;= visits[0].start_time &lt;= visits[1].start_time ...
3877      *     &lt;= vehicle_end_time`).
3878      *   * a shipment may only be performed on a vehicle that is allowed. A
3879      *     vehicle is allowed if
3880      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]
3881      *     is empty or its `vehicle_index` is included in
3882      *     [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices].
3883      * If the injected solution is not feasible, a validation error is not
3884      * necessarily returned and an error indicating infeasibility may be returned
3885      * instead.
3886      * </pre>
3887      *
3888      * <code>
3889      * repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
3890      * </code>
3891      */
3892     public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute.Builder>
getInjectedFirstSolutionRoutesBuilderList()3893         getInjectedFirstSolutionRoutesBuilderList() {
3894       return getInjectedFirstSolutionRoutesFieldBuilder().getBuilderList();
3895     }
3896 
3897     private com.google.protobuf.RepeatedFieldBuilderV3<
3898             com.google.cloud.optimization.v1.ShipmentRoute,
3899             com.google.cloud.optimization.v1.ShipmentRoute.Builder,
3900             com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getInjectedFirstSolutionRoutesFieldBuilder()3901         getInjectedFirstSolutionRoutesFieldBuilder() {
3902       if (injectedFirstSolutionRoutesBuilder_ == null) {
3903         injectedFirstSolutionRoutesBuilder_ =
3904             new com.google.protobuf.RepeatedFieldBuilderV3<
3905                 com.google.cloud.optimization.v1.ShipmentRoute,
3906                 com.google.cloud.optimization.v1.ShipmentRoute.Builder,
3907                 com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>(
3908                 injectedFirstSolutionRoutes_,
3909                 ((bitField0_ & 0x00000040) != 0),
3910                 getParentForChildren(),
3911                 isClean());
3912         injectedFirstSolutionRoutes_ = null;
3913       }
3914       return injectedFirstSolutionRoutesBuilder_;
3915     }
3916 
3917     private com.google.cloud.optimization.v1.InjectedSolutionConstraint injectedSolutionConstraint_;
3918     private com.google.protobuf.SingleFieldBuilderV3<
3919             com.google.cloud.optimization.v1.InjectedSolutionConstraint,
3920             com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder,
3921             com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder>
3922         injectedSolutionConstraintBuilder_;
3923     /**
3924      *
3925      *
3926      * <pre>
3927      * Constrain the optimization algorithm to find a final solution that is
3928      * similar to a previous solution. For example, this may be used to freeze
3929      * portions of routes which have already been completed or which are to be
3930      * completed but must not be modified.
3931      * If the injected solution is not feasible, a validation error is not
3932      * necessarily returned and an error indicating infeasibility may be returned
3933      * instead.
3934      * </pre>
3935      *
3936      * <code>
3937      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
3938      * </code>
3939      *
3940      * @return Whether the injectedSolutionConstraint field is set.
3941      */
hasInjectedSolutionConstraint()3942     public boolean hasInjectedSolutionConstraint() {
3943       return ((bitField0_ & 0x00000080) != 0);
3944     }
3945     /**
3946      *
3947      *
3948      * <pre>
3949      * Constrain the optimization algorithm to find a final solution that is
3950      * similar to a previous solution. For example, this may be used to freeze
3951      * portions of routes which have already been completed or which are to be
3952      * completed but must not be modified.
3953      * If the injected solution is not feasible, a validation error is not
3954      * necessarily returned and an error indicating infeasibility may be returned
3955      * instead.
3956      * </pre>
3957      *
3958      * <code>
3959      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
3960      * </code>
3961      *
3962      * @return The injectedSolutionConstraint.
3963      */
3964     public com.google.cloud.optimization.v1.InjectedSolutionConstraint
getInjectedSolutionConstraint()3965         getInjectedSolutionConstraint() {
3966       if (injectedSolutionConstraintBuilder_ == null) {
3967         return injectedSolutionConstraint_ == null
3968             ? com.google.cloud.optimization.v1.InjectedSolutionConstraint.getDefaultInstance()
3969             : injectedSolutionConstraint_;
3970       } else {
3971         return injectedSolutionConstraintBuilder_.getMessage();
3972       }
3973     }
3974     /**
3975      *
3976      *
3977      * <pre>
3978      * Constrain the optimization algorithm to find a final solution that is
3979      * similar to a previous solution. For example, this may be used to freeze
3980      * portions of routes which have already been completed or which are to be
3981      * completed but must not be modified.
3982      * If the injected solution is not feasible, a validation error is not
3983      * necessarily returned and an error indicating infeasibility may be returned
3984      * instead.
3985      * </pre>
3986      *
3987      * <code>
3988      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
3989      * </code>
3990      */
setInjectedSolutionConstraint( com.google.cloud.optimization.v1.InjectedSolutionConstraint value)3991     public Builder setInjectedSolutionConstraint(
3992         com.google.cloud.optimization.v1.InjectedSolutionConstraint value) {
3993       if (injectedSolutionConstraintBuilder_ == null) {
3994         if (value == null) {
3995           throw new NullPointerException();
3996         }
3997         injectedSolutionConstraint_ = value;
3998       } else {
3999         injectedSolutionConstraintBuilder_.setMessage(value);
4000       }
4001       bitField0_ |= 0x00000080;
4002       onChanged();
4003       return this;
4004     }
4005     /**
4006      *
4007      *
4008      * <pre>
4009      * Constrain the optimization algorithm to find a final solution that is
4010      * similar to a previous solution. For example, this may be used to freeze
4011      * portions of routes which have already been completed or which are to be
4012      * completed but must not be modified.
4013      * If the injected solution is not feasible, a validation error is not
4014      * necessarily returned and an error indicating infeasibility may be returned
4015      * instead.
4016      * </pre>
4017      *
4018      * <code>
4019      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4020      * </code>
4021      */
setInjectedSolutionConstraint( com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder builderForValue)4022     public Builder setInjectedSolutionConstraint(
4023         com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder builderForValue) {
4024       if (injectedSolutionConstraintBuilder_ == null) {
4025         injectedSolutionConstraint_ = builderForValue.build();
4026       } else {
4027         injectedSolutionConstraintBuilder_.setMessage(builderForValue.build());
4028       }
4029       bitField0_ |= 0x00000080;
4030       onChanged();
4031       return this;
4032     }
4033     /**
4034      *
4035      *
4036      * <pre>
4037      * Constrain the optimization algorithm to find a final solution that is
4038      * similar to a previous solution. For example, this may be used to freeze
4039      * portions of routes which have already been completed or which are to be
4040      * completed but must not be modified.
4041      * If the injected solution is not feasible, a validation error is not
4042      * necessarily returned and an error indicating infeasibility may be returned
4043      * instead.
4044      * </pre>
4045      *
4046      * <code>
4047      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4048      * </code>
4049      */
mergeInjectedSolutionConstraint( com.google.cloud.optimization.v1.InjectedSolutionConstraint value)4050     public Builder mergeInjectedSolutionConstraint(
4051         com.google.cloud.optimization.v1.InjectedSolutionConstraint value) {
4052       if (injectedSolutionConstraintBuilder_ == null) {
4053         if (((bitField0_ & 0x00000080) != 0)
4054             && injectedSolutionConstraint_ != null
4055             && injectedSolutionConstraint_
4056                 != com.google.cloud.optimization.v1.InjectedSolutionConstraint
4057                     .getDefaultInstance()) {
4058           getInjectedSolutionConstraintBuilder().mergeFrom(value);
4059         } else {
4060           injectedSolutionConstraint_ = value;
4061         }
4062       } else {
4063         injectedSolutionConstraintBuilder_.mergeFrom(value);
4064       }
4065       bitField0_ |= 0x00000080;
4066       onChanged();
4067       return this;
4068     }
4069     /**
4070      *
4071      *
4072      * <pre>
4073      * Constrain the optimization algorithm to find a final solution that is
4074      * similar to a previous solution. For example, this may be used to freeze
4075      * portions of routes which have already been completed or which are to be
4076      * completed but must not be modified.
4077      * If the injected solution is not feasible, a validation error is not
4078      * necessarily returned and an error indicating infeasibility may be returned
4079      * instead.
4080      * </pre>
4081      *
4082      * <code>
4083      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4084      * </code>
4085      */
clearInjectedSolutionConstraint()4086     public Builder clearInjectedSolutionConstraint() {
4087       bitField0_ = (bitField0_ & ~0x00000080);
4088       injectedSolutionConstraint_ = null;
4089       if (injectedSolutionConstraintBuilder_ != null) {
4090         injectedSolutionConstraintBuilder_.dispose();
4091         injectedSolutionConstraintBuilder_ = null;
4092       }
4093       onChanged();
4094       return this;
4095     }
4096     /**
4097      *
4098      *
4099      * <pre>
4100      * Constrain the optimization algorithm to find a final solution that is
4101      * similar to a previous solution. For example, this may be used to freeze
4102      * portions of routes which have already been completed or which are to be
4103      * completed but must not be modified.
4104      * If the injected solution is not feasible, a validation error is not
4105      * necessarily returned and an error indicating infeasibility may be returned
4106      * instead.
4107      * </pre>
4108      *
4109      * <code>
4110      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4111      * </code>
4112      */
4113     public com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder
getInjectedSolutionConstraintBuilder()4114         getInjectedSolutionConstraintBuilder() {
4115       bitField0_ |= 0x00000080;
4116       onChanged();
4117       return getInjectedSolutionConstraintFieldBuilder().getBuilder();
4118     }
4119     /**
4120      *
4121      *
4122      * <pre>
4123      * Constrain the optimization algorithm to find a final solution that is
4124      * similar to a previous solution. For example, this may be used to freeze
4125      * portions of routes which have already been completed or which are to be
4126      * completed but must not be modified.
4127      * If the injected solution is not feasible, a validation error is not
4128      * necessarily returned and an error indicating infeasibility may be returned
4129      * instead.
4130      * </pre>
4131      *
4132      * <code>
4133      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4134      * </code>
4135      */
4136     public com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder
getInjectedSolutionConstraintOrBuilder()4137         getInjectedSolutionConstraintOrBuilder() {
4138       if (injectedSolutionConstraintBuilder_ != null) {
4139         return injectedSolutionConstraintBuilder_.getMessageOrBuilder();
4140       } else {
4141         return injectedSolutionConstraint_ == null
4142             ? com.google.cloud.optimization.v1.InjectedSolutionConstraint.getDefaultInstance()
4143             : injectedSolutionConstraint_;
4144       }
4145     }
4146     /**
4147      *
4148      *
4149      * <pre>
4150      * Constrain the optimization algorithm to find a final solution that is
4151      * similar to a previous solution. For example, this may be used to freeze
4152      * portions of routes which have already been completed or which are to be
4153      * completed but must not be modified.
4154      * If the injected solution is not feasible, a validation error is not
4155      * necessarily returned and an error indicating infeasibility may be returned
4156      * instead.
4157      * </pre>
4158      *
4159      * <code>
4160      * .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
4161      * </code>
4162      */
4163     private com.google.protobuf.SingleFieldBuilderV3<
4164             com.google.cloud.optimization.v1.InjectedSolutionConstraint,
4165             com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder,
4166             com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder>
getInjectedSolutionConstraintFieldBuilder()4167         getInjectedSolutionConstraintFieldBuilder() {
4168       if (injectedSolutionConstraintBuilder_ == null) {
4169         injectedSolutionConstraintBuilder_ =
4170             new com.google.protobuf.SingleFieldBuilderV3<
4171                 com.google.cloud.optimization.v1.InjectedSolutionConstraint,
4172                 com.google.cloud.optimization.v1.InjectedSolutionConstraint.Builder,
4173                 com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder>(
4174                 getInjectedSolutionConstraint(), getParentForChildren(), isClean());
4175         injectedSolutionConstraint_ = null;
4176       }
4177       return injectedSolutionConstraintBuilder_;
4178     }
4179 
4180     private java.util.List<com.google.cloud.optimization.v1.ShipmentRoute> refreshDetailsRoutes_ =
4181         java.util.Collections.emptyList();
4182 
ensureRefreshDetailsRoutesIsMutable()4183     private void ensureRefreshDetailsRoutesIsMutable() {
4184       if (!((bitField0_ & 0x00000100) != 0)) {
4185         refreshDetailsRoutes_ =
4186             new java.util.ArrayList<com.google.cloud.optimization.v1.ShipmentRoute>(
4187                 refreshDetailsRoutes_);
4188         bitField0_ |= 0x00000100;
4189       }
4190     }
4191 
4192     private com.google.protobuf.RepeatedFieldBuilderV3<
4193             com.google.cloud.optimization.v1.ShipmentRoute,
4194             com.google.cloud.optimization.v1.ShipmentRoute.Builder,
4195             com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
4196         refreshDetailsRoutesBuilder_;
4197 
4198     /**
4199      *
4200      *
4201      * <pre>
4202      * If non-empty, the given routes will be refreshed, without modifying their
4203      * underlying sequence of visits or travel times: only other details will be
4204      * updated. This does not solve the model.
4205      * As of 2020/11, this only populates the polylines of non-empty routes and
4206      * requires that `populate_polylines` is true.
4207      * The `route_polyline` fields of the passed-in routes may be inconsistent
4208      * with route `transitions`.
4209      * This field must not be used together with `injected_first_solution_routes`
4210      * or `injected_solution_constraint`.
4211      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4212      * Polylines are still populated between all visits in all non-empty routes
4213      * regardless of whether the related shipments or vehicles are ignored.
4214      * </pre>
4215      *
4216      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4217      */
4218     public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute>
getRefreshDetailsRoutesList()4219         getRefreshDetailsRoutesList() {
4220       if (refreshDetailsRoutesBuilder_ == null) {
4221         return java.util.Collections.unmodifiableList(refreshDetailsRoutes_);
4222       } else {
4223         return refreshDetailsRoutesBuilder_.getMessageList();
4224       }
4225     }
4226     /**
4227      *
4228      *
4229      * <pre>
4230      * If non-empty, the given routes will be refreshed, without modifying their
4231      * underlying sequence of visits or travel times: only other details will be
4232      * updated. This does not solve the model.
4233      * As of 2020/11, this only populates the polylines of non-empty routes and
4234      * requires that `populate_polylines` is true.
4235      * The `route_polyline` fields of the passed-in routes may be inconsistent
4236      * with route `transitions`.
4237      * This field must not be used together with `injected_first_solution_routes`
4238      * or `injected_solution_constraint`.
4239      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4240      * Polylines are still populated between all visits in all non-empty routes
4241      * regardless of whether the related shipments or vehicles are ignored.
4242      * </pre>
4243      *
4244      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4245      */
getRefreshDetailsRoutesCount()4246     public int getRefreshDetailsRoutesCount() {
4247       if (refreshDetailsRoutesBuilder_ == null) {
4248         return refreshDetailsRoutes_.size();
4249       } else {
4250         return refreshDetailsRoutesBuilder_.getCount();
4251       }
4252     }
4253     /**
4254      *
4255      *
4256      * <pre>
4257      * If non-empty, the given routes will be refreshed, without modifying their
4258      * underlying sequence of visits or travel times: only other details will be
4259      * updated. This does not solve the model.
4260      * As of 2020/11, this only populates the polylines of non-empty routes and
4261      * requires that `populate_polylines` is true.
4262      * The `route_polyline` fields of the passed-in routes may be inconsistent
4263      * with route `transitions`.
4264      * This field must not be used together with `injected_first_solution_routes`
4265      * or `injected_solution_constraint`.
4266      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4267      * Polylines are still populated between all visits in all non-empty routes
4268      * regardless of whether the related shipments or vehicles are ignored.
4269      * </pre>
4270      *
4271      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4272      */
getRefreshDetailsRoutes(int index)4273     public com.google.cloud.optimization.v1.ShipmentRoute getRefreshDetailsRoutes(int index) {
4274       if (refreshDetailsRoutesBuilder_ == null) {
4275         return refreshDetailsRoutes_.get(index);
4276       } else {
4277         return refreshDetailsRoutesBuilder_.getMessage(index);
4278       }
4279     }
4280     /**
4281      *
4282      *
4283      * <pre>
4284      * If non-empty, the given routes will be refreshed, without modifying their
4285      * underlying sequence of visits or travel times: only other details will be
4286      * updated. This does not solve the model.
4287      * As of 2020/11, this only populates the polylines of non-empty routes and
4288      * requires that `populate_polylines` is true.
4289      * The `route_polyline` fields of the passed-in routes may be inconsistent
4290      * with route `transitions`.
4291      * This field must not be used together with `injected_first_solution_routes`
4292      * or `injected_solution_constraint`.
4293      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4294      * Polylines are still populated between all visits in all non-empty routes
4295      * regardless of whether the related shipments or vehicles are ignored.
4296      * </pre>
4297      *
4298      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4299      */
setRefreshDetailsRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute value)4300     public Builder setRefreshDetailsRoutes(
4301         int index, com.google.cloud.optimization.v1.ShipmentRoute value) {
4302       if (refreshDetailsRoutesBuilder_ == null) {
4303         if (value == null) {
4304           throw new NullPointerException();
4305         }
4306         ensureRefreshDetailsRoutesIsMutable();
4307         refreshDetailsRoutes_.set(index, value);
4308         onChanged();
4309       } else {
4310         refreshDetailsRoutesBuilder_.setMessage(index, value);
4311       }
4312       return this;
4313     }
4314     /**
4315      *
4316      *
4317      * <pre>
4318      * If non-empty, the given routes will be refreshed, without modifying their
4319      * underlying sequence of visits or travel times: only other details will be
4320      * updated. This does not solve the model.
4321      * As of 2020/11, this only populates the polylines of non-empty routes and
4322      * requires that `populate_polylines` is true.
4323      * The `route_polyline` fields of the passed-in routes may be inconsistent
4324      * with route `transitions`.
4325      * This field must not be used together with `injected_first_solution_routes`
4326      * or `injected_solution_constraint`.
4327      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4328      * Polylines are still populated between all visits in all non-empty routes
4329      * regardless of whether the related shipments or vehicles are ignored.
4330      * </pre>
4331      *
4332      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4333      */
setRefreshDetailsRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)4334     public Builder setRefreshDetailsRoutes(
4335         int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
4336       if (refreshDetailsRoutesBuilder_ == null) {
4337         ensureRefreshDetailsRoutesIsMutable();
4338         refreshDetailsRoutes_.set(index, builderForValue.build());
4339         onChanged();
4340       } else {
4341         refreshDetailsRoutesBuilder_.setMessage(index, builderForValue.build());
4342       }
4343       return this;
4344     }
4345     /**
4346      *
4347      *
4348      * <pre>
4349      * If non-empty, the given routes will be refreshed, without modifying their
4350      * underlying sequence of visits or travel times: only other details will be
4351      * updated. This does not solve the model.
4352      * As of 2020/11, this only populates the polylines of non-empty routes and
4353      * requires that `populate_polylines` is true.
4354      * The `route_polyline` fields of the passed-in routes may be inconsistent
4355      * with route `transitions`.
4356      * This field must not be used together with `injected_first_solution_routes`
4357      * or `injected_solution_constraint`.
4358      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4359      * Polylines are still populated between all visits in all non-empty routes
4360      * regardless of whether the related shipments or vehicles are ignored.
4361      * </pre>
4362      *
4363      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4364      */
addRefreshDetailsRoutes(com.google.cloud.optimization.v1.ShipmentRoute value)4365     public Builder addRefreshDetailsRoutes(com.google.cloud.optimization.v1.ShipmentRoute value) {
4366       if (refreshDetailsRoutesBuilder_ == null) {
4367         if (value == null) {
4368           throw new NullPointerException();
4369         }
4370         ensureRefreshDetailsRoutesIsMutable();
4371         refreshDetailsRoutes_.add(value);
4372         onChanged();
4373       } else {
4374         refreshDetailsRoutesBuilder_.addMessage(value);
4375       }
4376       return this;
4377     }
4378     /**
4379      *
4380      *
4381      * <pre>
4382      * If non-empty, the given routes will be refreshed, without modifying their
4383      * underlying sequence of visits or travel times: only other details will be
4384      * updated. This does not solve the model.
4385      * As of 2020/11, this only populates the polylines of non-empty routes and
4386      * requires that `populate_polylines` is true.
4387      * The `route_polyline` fields of the passed-in routes may be inconsistent
4388      * with route `transitions`.
4389      * This field must not be used together with `injected_first_solution_routes`
4390      * or `injected_solution_constraint`.
4391      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4392      * Polylines are still populated between all visits in all non-empty routes
4393      * regardless of whether the related shipments or vehicles are ignored.
4394      * </pre>
4395      *
4396      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4397      */
addRefreshDetailsRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute value)4398     public Builder addRefreshDetailsRoutes(
4399         int index, com.google.cloud.optimization.v1.ShipmentRoute value) {
4400       if (refreshDetailsRoutesBuilder_ == null) {
4401         if (value == null) {
4402           throw new NullPointerException();
4403         }
4404         ensureRefreshDetailsRoutesIsMutable();
4405         refreshDetailsRoutes_.add(index, value);
4406         onChanged();
4407       } else {
4408         refreshDetailsRoutesBuilder_.addMessage(index, value);
4409       }
4410       return this;
4411     }
4412     /**
4413      *
4414      *
4415      * <pre>
4416      * If non-empty, the given routes will be refreshed, without modifying their
4417      * underlying sequence of visits or travel times: only other details will be
4418      * updated. This does not solve the model.
4419      * As of 2020/11, this only populates the polylines of non-empty routes and
4420      * requires that `populate_polylines` is true.
4421      * The `route_polyline` fields of the passed-in routes may be inconsistent
4422      * with route `transitions`.
4423      * This field must not be used together with `injected_first_solution_routes`
4424      * or `injected_solution_constraint`.
4425      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4426      * Polylines are still populated between all visits in all non-empty routes
4427      * regardless of whether the related shipments or vehicles are ignored.
4428      * </pre>
4429      *
4430      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4431      */
addRefreshDetailsRoutes( com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)4432     public Builder addRefreshDetailsRoutes(
4433         com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
4434       if (refreshDetailsRoutesBuilder_ == null) {
4435         ensureRefreshDetailsRoutesIsMutable();
4436         refreshDetailsRoutes_.add(builderForValue.build());
4437         onChanged();
4438       } else {
4439         refreshDetailsRoutesBuilder_.addMessage(builderForValue.build());
4440       }
4441       return this;
4442     }
4443     /**
4444      *
4445      *
4446      * <pre>
4447      * If non-empty, the given routes will be refreshed, without modifying their
4448      * underlying sequence of visits or travel times: only other details will be
4449      * updated. This does not solve the model.
4450      * As of 2020/11, this only populates the polylines of non-empty routes and
4451      * requires that `populate_polylines` is true.
4452      * The `route_polyline` fields of the passed-in routes may be inconsistent
4453      * with route `transitions`.
4454      * This field must not be used together with `injected_first_solution_routes`
4455      * or `injected_solution_constraint`.
4456      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4457      * Polylines are still populated between all visits in all non-empty routes
4458      * regardless of whether the related shipments or vehicles are ignored.
4459      * </pre>
4460      *
4461      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4462      */
addRefreshDetailsRoutes( int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue)4463     public Builder addRefreshDetailsRoutes(
4464         int index, com.google.cloud.optimization.v1.ShipmentRoute.Builder builderForValue) {
4465       if (refreshDetailsRoutesBuilder_ == null) {
4466         ensureRefreshDetailsRoutesIsMutable();
4467         refreshDetailsRoutes_.add(index, builderForValue.build());
4468         onChanged();
4469       } else {
4470         refreshDetailsRoutesBuilder_.addMessage(index, builderForValue.build());
4471       }
4472       return this;
4473     }
4474     /**
4475      *
4476      *
4477      * <pre>
4478      * If non-empty, the given routes will be refreshed, without modifying their
4479      * underlying sequence of visits or travel times: only other details will be
4480      * updated. This does not solve the model.
4481      * As of 2020/11, this only populates the polylines of non-empty routes and
4482      * requires that `populate_polylines` is true.
4483      * The `route_polyline` fields of the passed-in routes may be inconsistent
4484      * with route `transitions`.
4485      * This field must not be used together with `injected_first_solution_routes`
4486      * or `injected_solution_constraint`.
4487      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4488      * Polylines are still populated between all visits in all non-empty routes
4489      * regardless of whether the related shipments or vehicles are ignored.
4490      * </pre>
4491      *
4492      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4493      */
addAllRefreshDetailsRoutes( java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute> values)4494     public Builder addAllRefreshDetailsRoutes(
4495         java.lang.Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute> values) {
4496       if (refreshDetailsRoutesBuilder_ == null) {
4497         ensureRefreshDetailsRoutesIsMutable();
4498         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, refreshDetailsRoutes_);
4499         onChanged();
4500       } else {
4501         refreshDetailsRoutesBuilder_.addAllMessages(values);
4502       }
4503       return this;
4504     }
4505     /**
4506      *
4507      *
4508      * <pre>
4509      * If non-empty, the given routes will be refreshed, without modifying their
4510      * underlying sequence of visits or travel times: only other details will be
4511      * updated. This does not solve the model.
4512      * As of 2020/11, this only populates the polylines of non-empty routes and
4513      * requires that `populate_polylines` is true.
4514      * The `route_polyline` fields of the passed-in routes may be inconsistent
4515      * with route `transitions`.
4516      * This field must not be used together with `injected_first_solution_routes`
4517      * or `injected_solution_constraint`.
4518      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4519      * Polylines are still populated between all visits in all non-empty routes
4520      * regardless of whether the related shipments or vehicles are ignored.
4521      * </pre>
4522      *
4523      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4524      */
clearRefreshDetailsRoutes()4525     public Builder clearRefreshDetailsRoutes() {
4526       if (refreshDetailsRoutesBuilder_ == null) {
4527         refreshDetailsRoutes_ = java.util.Collections.emptyList();
4528         bitField0_ = (bitField0_ & ~0x00000100);
4529         onChanged();
4530       } else {
4531         refreshDetailsRoutesBuilder_.clear();
4532       }
4533       return this;
4534     }
4535     /**
4536      *
4537      *
4538      * <pre>
4539      * If non-empty, the given routes will be refreshed, without modifying their
4540      * underlying sequence of visits or travel times: only other details will be
4541      * updated. This does not solve the model.
4542      * As of 2020/11, this only populates the polylines of non-empty routes and
4543      * requires that `populate_polylines` is true.
4544      * The `route_polyline` fields of the passed-in routes may be inconsistent
4545      * with route `transitions`.
4546      * This field must not be used together with `injected_first_solution_routes`
4547      * or `injected_solution_constraint`.
4548      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4549      * Polylines are still populated between all visits in all non-empty routes
4550      * regardless of whether the related shipments or vehicles are ignored.
4551      * </pre>
4552      *
4553      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4554      */
removeRefreshDetailsRoutes(int index)4555     public Builder removeRefreshDetailsRoutes(int index) {
4556       if (refreshDetailsRoutesBuilder_ == null) {
4557         ensureRefreshDetailsRoutesIsMutable();
4558         refreshDetailsRoutes_.remove(index);
4559         onChanged();
4560       } else {
4561         refreshDetailsRoutesBuilder_.remove(index);
4562       }
4563       return this;
4564     }
4565     /**
4566      *
4567      *
4568      * <pre>
4569      * If non-empty, the given routes will be refreshed, without modifying their
4570      * underlying sequence of visits or travel times: only other details will be
4571      * updated. This does not solve the model.
4572      * As of 2020/11, this only populates the polylines of non-empty routes and
4573      * requires that `populate_polylines` is true.
4574      * The `route_polyline` fields of the passed-in routes may be inconsistent
4575      * with route `transitions`.
4576      * This field must not be used together with `injected_first_solution_routes`
4577      * or `injected_solution_constraint`.
4578      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4579      * Polylines are still populated between all visits in all non-empty routes
4580      * regardless of whether the related shipments or vehicles are ignored.
4581      * </pre>
4582      *
4583      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4584      */
getRefreshDetailsRoutesBuilder( int index)4585     public com.google.cloud.optimization.v1.ShipmentRoute.Builder getRefreshDetailsRoutesBuilder(
4586         int index) {
4587       return getRefreshDetailsRoutesFieldBuilder().getBuilder(index);
4588     }
4589     /**
4590      *
4591      *
4592      * <pre>
4593      * If non-empty, the given routes will be refreshed, without modifying their
4594      * underlying sequence of visits or travel times: only other details will be
4595      * updated. This does not solve the model.
4596      * As of 2020/11, this only populates the polylines of non-empty routes and
4597      * requires that `populate_polylines` is true.
4598      * The `route_polyline` fields of the passed-in routes may be inconsistent
4599      * with route `transitions`.
4600      * This field must not be used together with `injected_first_solution_routes`
4601      * or `injected_solution_constraint`.
4602      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4603      * Polylines are still populated between all visits in all non-empty routes
4604      * regardless of whether the related shipments or vehicles are ignored.
4605      * </pre>
4606      *
4607      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4608      */
getRefreshDetailsRoutesOrBuilder( int index)4609     public com.google.cloud.optimization.v1.ShipmentRouteOrBuilder getRefreshDetailsRoutesOrBuilder(
4610         int index) {
4611       if (refreshDetailsRoutesBuilder_ == null) {
4612         return refreshDetailsRoutes_.get(index);
4613       } else {
4614         return refreshDetailsRoutesBuilder_.getMessageOrBuilder(index);
4615       }
4616     }
4617     /**
4618      *
4619      *
4620      * <pre>
4621      * If non-empty, the given routes will be refreshed, without modifying their
4622      * underlying sequence of visits or travel times: only other details will be
4623      * updated. This does not solve the model.
4624      * As of 2020/11, this only populates the polylines of non-empty routes and
4625      * requires that `populate_polylines` is true.
4626      * The `route_polyline` fields of the passed-in routes may be inconsistent
4627      * with route `transitions`.
4628      * This field must not be used together with `injected_first_solution_routes`
4629      * or `injected_solution_constraint`.
4630      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4631      * Polylines are still populated between all visits in all non-empty routes
4632      * regardless of whether the related shipments or vehicles are ignored.
4633      * </pre>
4634      *
4635      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4636      */
4637     public java.util.List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getRefreshDetailsRoutesOrBuilderList()4638         getRefreshDetailsRoutesOrBuilderList() {
4639       if (refreshDetailsRoutesBuilder_ != null) {
4640         return refreshDetailsRoutesBuilder_.getMessageOrBuilderList();
4641       } else {
4642         return java.util.Collections.unmodifiableList(refreshDetailsRoutes_);
4643       }
4644     }
4645     /**
4646      *
4647      *
4648      * <pre>
4649      * If non-empty, the given routes will be refreshed, without modifying their
4650      * underlying sequence of visits or travel times: only other details will be
4651      * updated. This does not solve the model.
4652      * As of 2020/11, this only populates the polylines of non-empty routes and
4653      * requires that `populate_polylines` is true.
4654      * The `route_polyline` fields of the passed-in routes may be inconsistent
4655      * with route `transitions`.
4656      * This field must not be used together with `injected_first_solution_routes`
4657      * or `injected_solution_constraint`.
4658      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4659      * Polylines are still populated between all visits in all non-empty routes
4660      * regardless of whether the related shipments or vehicles are ignored.
4661      * </pre>
4662      *
4663      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4664      */
addRefreshDetailsRoutesBuilder()4665     public com.google.cloud.optimization.v1.ShipmentRoute.Builder addRefreshDetailsRoutesBuilder() {
4666       return getRefreshDetailsRoutesFieldBuilder()
4667           .addBuilder(com.google.cloud.optimization.v1.ShipmentRoute.getDefaultInstance());
4668     }
4669     /**
4670      *
4671      *
4672      * <pre>
4673      * If non-empty, the given routes will be refreshed, without modifying their
4674      * underlying sequence of visits or travel times: only other details will be
4675      * updated. This does not solve the model.
4676      * As of 2020/11, this only populates the polylines of non-empty routes and
4677      * requires that `populate_polylines` is true.
4678      * The `route_polyline` fields of the passed-in routes may be inconsistent
4679      * with route `transitions`.
4680      * This field must not be used together with `injected_first_solution_routes`
4681      * or `injected_solution_constraint`.
4682      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4683      * Polylines are still populated between all visits in all non-empty routes
4684      * regardless of whether the related shipments or vehicles are ignored.
4685      * </pre>
4686      *
4687      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4688      */
addRefreshDetailsRoutesBuilder( int index)4689     public com.google.cloud.optimization.v1.ShipmentRoute.Builder addRefreshDetailsRoutesBuilder(
4690         int index) {
4691       return getRefreshDetailsRoutesFieldBuilder()
4692           .addBuilder(index, com.google.cloud.optimization.v1.ShipmentRoute.getDefaultInstance());
4693     }
4694     /**
4695      *
4696      *
4697      * <pre>
4698      * If non-empty, the given routes will be refreshed, without modifying their
4699      * underlying sequence of visits or travel times: only other details will be
4700      * updated. This does not solve the model.
4701      * As of 2020/11, this only populates the polylines of non-empty routes and
4702      * requires that `populate_polylines` is true.
4703      * The `route_polyline` fields of the passed-in routes may be inconsistent
4704      * with route `transitions`.
4705      * This field must not be used together with `injected_first_solution_routes`
4706      * or `injected_solution_constraint`.
4707      * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
4708      * Polylines are still populated between all visits in all non-empty routes
4709      * regardless of whether the related shipments or vehicles are ignored.
4710      * </pre>
4711      *
4712      * <code>repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;</code>
4713      */
4714     public java.util.List<com.google.cloud.optimization.v1.ShipmentRoute.Builder>
getRefreshDetailsRoutesBuilderList()4715         getRefreshDetailsRoutesBuilderList() {
4716       return getRefreshDetailsRoutesFieldBuilder().getBuilderList();
4717     }
4718 
4719     private com.google.protobuf.RepeatedFieldBuilderV3<
4720             com.google.cloud.optimization.v1.ShipmentRoute,
4721             com.google.cloud.optimization.v1.ShipmentRoute.Builder,
4722             com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>
getRefreshDetailsRoutesFieldBuilder()4723         getRefreshDetailsRoutesFieldBuilder() {
4724       if (refreshDetailsRoutesBuilder_ == null) {
4725         refreshDetailsRoutesBuilder_ =
4726             new com.google.protobuf.RepeatedFieldBuilderV3<
4727                 com.google.cloud.optimization.v1.ShipmentRoute,
4728                 com.google.cloud.optimization.v1.ShipmentRoute.Builder,
4729                 com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>(
4730                 refreshDetailsRoutes_,
4731                 ((bitField0_ & 0x00000100) != 0),
4732                 getParentForChildren(),
4733                 isClean());
4734         refreshDetailsRoutes_ = null;
4735       }
4736       return refreshDetailsRoutesBuilder_;
4737     }
4738 
4739     private boolean interpretInjectedSolutionsUsingLabels_;
4740     /**
4741      *
4742      *
4743      * <pre>
4744      * If true:
4745      *   * uses
4746      *   [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label]
4747      *   instead of `vehicle_index` to
4748      *     match routes in an injected solution with vehicles in the request;
4749      *     reuses the mapping of original
4750      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4751      *     to new
4752      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4753      *     to update
4754      *     [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices]
4755      *     if non-empty, but the mapping must be unambiguous (i.e., multiple
4756      *     `ShipmentRoute`s must not share the same original `vehicle_index`).
4757      *   * uses
4758      *   [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label]
4759      *   instead of `shipment_index`
4760      *     to match visits in an injected solution with shipments in the request;
4761      *   * uses
4762      *   [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4763      *   instead of
4764      *   [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index]
4765      *   to
4766      *     match skipped shipments in the injected solution with request
4767      *     shipments.
4768      * This interpretation applies to the `injected_first_solution_routes`,
4769      * `injected_solution_constraint`, and `refresh_details_routes` fields.
4770      * It can be used when shipment or vehicle indices in the request have
4771      * changed since the solution was created, perhaps because shipments or
4772      * vehicles have been removed from or added to the request.
4773      * If true, labels in the following categories must appear at most once in
4774      * their category:
4775      *   * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the
4776      *   request;
4777      *   * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the
4778      *   request;
4779      *   * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution;
4780      *   * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in
4781      *     the injected solution (except pickup/delivery visit pairs, whose
4782      *     `shipment_label` must appear twice).
4783      * If a `vehicle_label` in the injected solution does not correspond to a
4784      * request vehicle, the corresponding route is removed from the solution
4785      * along with its visits. If a `shipment_label` in the injected solution does
4786      * not correspond to a request shipment, the corresponding visit is removed
4787      * from the solution. If a
4788      * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4789      * in the injected solution does not correspond to a request shipment, the
4790      * `SkippedShipment` is removed from the solution.
4791      * Removing route visits or entire routes from an injected solution may
4792      * have an effect on the implied constraints, which may lead to change in
4793      * solution, validation errors, or infeasibility.
4794      * NOTE: The caller must ensure that each
4795      * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp.
4796      * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely
4797      * identifies a vehicle (resp. shipment) entity used across the two relevant
4798      * requests: the past request that produced the `OptimizeToursResponse` used
4799      * in the injected solution and the current request that includes the injected
4800      * solution. The uniqueness checks described above are not enough to guarantee
4801      * this requirement.
4802      * </pre>
4803      *
4804      * <code>bool interpret_injected_solutions_using_labels = 10;</code>
4805      *
4806      * @return The interpretInjectedSolutionsUsingLabels.
4807      */
4808     @java.lang.Override
getInterpretInjectedSolutionsUsingLabels()4809     public boolean getInterpretInjectedSolutionsUsingLabels() {
4810       return interpretInjectedSolutionsUsingLabels_;
4811     }
4812     /**
4813      *
4814      *
4815      * <pre>
4816      * If true:
4817      *   * uses
4818      *   [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label]
4819      *   instead of `vehicle_index` to
4820      *     match routes in an injected solution with vehicles in the request;
4821      *     reuses the mapping of original
4822      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4823      *     to new
4824      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4825      *     to update
4826      *     [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices]
4827      *     if non-empty, but the mapping must be unambiguous (i.e., multiple
4828      *     `ShipmentRoute`s must not share the same original `vehicle_index`).
4829      *   * uses
4830      *   [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label]
4831      *   instead of `shipment_index`
4832      *     to match visits in an injected solution with shipments in the request;
4833      *   * uses
4834      *   [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4835      *   instead of
4836      *   [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index]
4837      *   to
4838      *     match skipped shipments in the injected solution with request
4839      *     shipments.
4840      * This interpretation applies to the `injected_first_solution_routes`,
4841      * `injected_solution_constraint`, and `refresh_details_routes` fields.
4842      * It can be used when shipment or vehicle indices in the request have
4843      * changed since the solution was created, perhaps because shipments or
4844      * vehicles have been removed from or added to the request.
4845      * If true, labels in the following categories must appear at most once in
4846      * their category:
4847      *   * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the
4848      *   request;
4849      *   * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the
4850      *   request;
4851      *   * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution;
4852      *   * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in
4853      *     the injected solution (except pickup/delivery visit pairs, whose
4854      *     `shipment_label` must appear twice).
4855      * If a `vehicle_label` in the injected solution does not correspond to a
4856      * request vehicle, the corresponding route is removed from the solution
4857      * along with its visits. If a `shipment_label` in the injected solution does
4858      * not correspond to a request shipment, the corresponding visit is removed
4859      * from the solution. If a
4860      * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4861      * in the injected solution does not correspond to a request shipment, the
4862      * `SkippedShipment` is removed from the solution.
4863      * Removing route visits or entire routes from an injected solution may
4864      * have an effect on the implied constraints, which may lead to change in
4865      * solution, validation errors, or infeasibility.
4866      * NOTE: The caller must ensure that each
4867      * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp.
4868      * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely
4869      * identifies a vehicle (resp. shipment) entity used across the two relevant
4870      * requests: the past request that produced the `OptimizeToursResponse` used
4871      * in the injected solution and the current request that includes the injected
4872      * solution. The uniqueness checks described above are not enough to guarantee
4873      * this requirement.
4874      * </pre>
4875      *
4876      * <code>bool interpret_injected_solutions_using_labels = 10;</code>
4877      *
4878      * @param value The interpretInjectedSolutionsUsingLabels to set.
4879      * @return This builder for chaining.
4880      */
setInterpretInjectedSolutionsUsingLabels(boolean value)4881     public Builder setInterpretInjectedSolutionsUsingLabels(boolean value) {
4882 
4883       interpretInjectedSolutionsUsingLabels_ = value;
4884       bitField0_ |= 0x00000200;
4885       onChanged();
4886       return this;
4887     }
4888     /**
4889      *
4890      *
4891      * <pre>
4892      * If true:
4893      *   * uses
4894      *   [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label]
4895      *   instead of `vehicle_index` to
4896      *     match routes in an injected solution with vehicles in the request;
4897      *     reuses the mapping of original
4898      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4899      *     to new
4900      *     [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index]
4901      *     to update
4902      *     [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices]
4903      *     if non-empty, but the mapping must be unambiguous (i.e., multiple
4904      *     `ShipmentRoute`s must not share the same original `vehicle_index`).
4905      *   * uses
4906      *   [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label]
4907      *   instead of `shipment_index`
4908      *     to match visits in an injected solution with shipments in the request;
4909      *   * uses
4910      *   [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4911      *   instead of
4912      *   [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index]
4913      *   to
4914      *     match skipped shipments in the injected solution with request
4915      *     shipments.
4916      * This interpretation applies to the `injected_first_solution_routes`,
4917      * `injected_solution_constraint`, and `refresh_details_routes` fields.
4918      * It can be used when shipment or vehicle indices in the request have
4919      * changed since the solution was created, perhaps because shipments or
4920      * vehicles have been removed from or added to the request.
4921      * If true, labels in the following categories must appear at most once in
4922      * their category:
4923      *   * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the
4924      *   request;
4925      *   * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the
4926      *   request;
4927      *   * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution;
4928      *   * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in
4929      *     the injected solution (except pickup/delivery visit pairs, whose
4930      *     `shipment_label` must appear twice).
4931      * If a `vehicle_label` in the injected solution does not correspond to a
4932      * request vehicle, the corresponding route is removed from the solution
4933      * along with its visits. If a `shipment_label` in the injected solution does
4934      * not correspond to a request shipment, the corresponding visit is removed
4935      * from the solution. If a
4936      * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label]
4937      * in the injected solution does not correspond to a request shipment, the
4938      * `SkippedShipment` is removed from the solution.
4939      * Removing route visits or entire routes from an injected solution may
4940      * have an effect on the implied constraints, which may lead to change in
4941      * solution, validation errors, or infeasibility.
4942      * NOTE: The caller must ensure that each
4943      * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp.
4944      * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely
4945      * identifies a vehicle (resp. shipment) entity used across the two relevant
4946      * requests: the past request that produced the `OptimizeToursResponse` used
4947      * in the injected solution and the current request that includes the injected
4948      * solution. The uniqueness checks described above are not enough to guarantee
4949      * this requirement.
4950      * </pre>
4951      *
4952      * <code>bool interpret_injected_solutions_using_labels = 10;</code>
4953      *
4954      * @return This builder for chaining.
4955      */
clearInterpretInjectedSolutionsUsingLabels()4956     public Builder clearInterpretInjectedSolutionsUsingLabels() {
4957       bitField0_ = (bitField0_ & ~0x00000200);
4958       interpretInjectedSolutionsUsingLabels_ = false;
4959       onChanged();
4960       return this;
4961     }
4962 
4963     private boolean considerRoadTraffic_;
4964     /**
4965      *
4966      *
4967      * <pre>
4968      * Consider traffic estimation in calculating `ShipmentRoute` fields
4969      * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration],
4970      * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time],
4971      * and `vehicle_end_time`; in setting the
4972      * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities]
4973      * field, and in calculating the
4974      * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost]
4975      * field.
4976      * </pre>
4977      *
4978      * <code>bool consider_road_traffic = 11;</code>
4979      *
4980      * @return The considerRoadTraffic.
4981      */
4982     @java.lang.Override
getConsiderRoadTraffic()4983     public boolean getConsiderRoadTraffic() {
4984       return considerRoadTraffic_;
4985     }
4986     /**
4987      *
4988      *
4989      * <pre>
4990      * Consider traffic estimation in calculating `ShipmentRoute` fields
4991      * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration],
4992      * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time],
4993      * and `vehicle_end_time`; in setting the
4994      * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities]
4995      * field, and in calculating the
4996      * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost]
4997      * field.
4998      * </pre>
4999      *
5000      * <code>bool consider_road_traffic = 11;</code>
5001      *
5002      * @param value The considerRoadTraffic to set.
5003      * @return This builder for chaining.
5004      */
setConsiderRoadTraffic(boolean value)5005     public Builder setConsiderRoadTraffic(boolean value) {
5006 
5007       considerRoadTraffic_ = value;
5008       bitField0_ |= 0x00000400;
5009       onChanged();
5010       return this;
5011     }
5012     /**
5013      *
5014      *
5015      * <pre>
5016      * Consider traffic estimation in calculating `ShipmentRoute` fields
5017      * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration],
5018      * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time],
5019      * and `vehicle_end_time`; in setting the
5020      * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities]
5021      * field, and in calculating the
5022      * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost]
5023      * field.
5024      * </pre>
5025      *
5026      * <code>bool consider_road_traffic = 11;</code>
5027      *
5028      * @return This builder for chaining.
5029      */
clearConsiderRoadTraffic()5030     public Builder clearConsiderRoadTraffic() {
5031       bitField0_ = (bitField0_ & ~0x00000400);
5032       considerRoadTraffic_ = false;
5033       onChanged();
5034       return this;
5035     }
5036 
5037     private boolean populatePolylines_;
5038     /**
5039      *
5040      *
5041      * <pre>
5042      * If true, polylines will be populated in response `ShipmentRoute`s.
5043      * </pre>
5044      *
5045      * <code>bool populate_polylines = 12;</code>
5046      *
5047      * @return The populatePolylines.
5048      */
5049     @java.lang.Override
getPopulatePolylines()5050     public boolean getPopulatePolylines() {
5051       return populatePolylines_;
5052     }
5053     /**
5054      *
5055      *
5056      * <pre>
5057      * If true, polylines will be populated in response `ShipmentRoute`s.
5058      * </pre>
5059      *
5060      * <code>bool populate_polylines = 12;</code>
5061      *
5062      * @param value The populatePolylines to set.
5063      * @return This builder for chaining.
5064      */
setPopulatePolylines(boolean value)5065     public Builder setPopulatePolylines(boolean value) {
5066 
5067       populatePolylines_ = value;
5068       bitField0_ |= 0x00000800;
5069       onChanged();
5070       return this;
5071     }
5072     /**
5073      *
5074      *
5075      * <pre>
5076      * If true, polylines will be populated in response `ShipmentRoute`s.
5077      * </pre>
5078      *
5079      * <code>bool populate_polylines = 12;</code>
5080      *
5081      * @return This builder for chaining.
5082      */
clearPopulatePolylines()5083     public Builder clearPopulatePolylines() {
5084       bitField0_ = (bitField0_ & ~0x00000800);
5085       populatePolylines_ = false;
5086       onChanged();
5087       return this;
5088     }
5089 
5090     private boolean populateTransitionPolylines_;
5091     /**
5092      *
5093      *
5094      * <pre>
5095      * If true, polylines will be populated in response
5096      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5097      * Note that in this case, the polylines will also be populated in the
5098      * deprecated `travel_steps`.
5099      * </pre>
5100      *
5101      * <code>bool populate_transition_polylines = 13;</code>
5102      *
5103      * @return The populateTransitionPolylines.
5104      */
5105     @java.lang.Override
getPopulateTransitionPolylines()5106     public boolean getPopulateTransitionPolylines() {
5107       return populateTransitionPolylines_;
5108     }
5109     /**
5110      *
5111      *
5112      * <pre>
5113      * If true, polylines will be populated in response
5114      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5115      * Note that in this case, the polylines will also be populated in the
5116      * deprecated `travel_steps`.
5117      * </pre>
5118      *
5119      * <code>bool populate_transition_polylines = 13;</code>
5120      *
5121      * @param value The populateTransitionPolylines to set.
5122      * @return This builder for chaining.
5123      */
setPopulateTransitionPolylines(boolean value)5124     public Builder setPopulateTransitionPolylines(boolean value) {
5125 
5126       populateTransitionPolylines_ = value;
5127       bitField0_ |= 0x00001000;
5128       onChanged();
5129       return this;
5130     }
5131     /**
5132      *
5133      *
5134      * <pre>
5135      * If true, polylines will be populated in response
5136      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5137      * Note that in this case, the polylines will also be populated in the
5138      * deprecated `travel_steps`.
5139      * </pre>
5140      *
5141      * <code>bool populate_transition_polylines = 13;</code>
5142      *
5143      * @return This builder for chaining.
5144      */
clearPopulateTransitionPolylines()5145     public Builder clearPopulateTransitionPolylines() {
5146       bitField0_ = (bitField0_ & ~0x00001000);
5147       populateTransitionPolylines_ = false;
5148       onChanged();
5149       return this;
5150     }
5151 
5152     private boolean allowLargeDeadlineDespiteInterruptionRisk_;
5153     /**
5154      *
5155      *
5156      * <pre>
5157      * If this is set, then the request can have a deadline
5158      * (see https://grpc.io/blog/deadlines) of up to 60 minutes.
5159      * Otherwise, the maximum deadline is only 30 minutes.
5160      * Note that long-lived requests have a significantly larger (but still small)
5161      * risk of interruption.
5162      * </pre>
5163      *
5164      * <code>bool allow_large_deadline_despite_interruption_risk = 14;</code>
5165      *
5166      * @return The allowLargeDeadlineDespiteInterruptionRisk.
5167      */
5168     @java.lang.Override
getAllowLargeDeadlineDespiteInterruptionRisk()5169     public boolean getAllowLargeDeadlineDespiteInterruptionRisk() {
5170       return allowLargeDeadlineDespiteInterruptionRisk_;
5171     }
5172     /**
5173      *
5174      *
5175      * <pre>
5176      * If this is set, then the request can have a deadline
5177      * (see https://grpc.io/blog/deadlines) of up to 60 minutes.
5178      * Otherwise, the maximum deadline is only 30 minutes.
5179      * Note that long-lived requests have a significantly larger (but still small)
5180      * risk of interruption.
5181      * </pre>
5182      *
5183      * <code>bool allow_large_deadline_despite_interruption_risk = 14;</code>
5184      *
5185      * @param value The allowLargeDeadlineDespiteInterruptionRisk to set.
5186      * @return This builder for chaining.
5187      */
setAllowLargeDeadlineDespiteInterruptionRisk(boolean value)5188     public Builder setAllowLargeDeadlineDespiteInterruptionRisk(boolean value) {
5189 
5190       allowLargeDeadlineDespiteInterruptionRisk_ = value;
5191       bitField0_ |= 0x00002000;
5192       onChanged();
5193       return this;
5194     }
5195     /**
5196      *
5197      *
5198      * <pre>
5199      * If this is set, then the request can have a deadline
5200      * (see https://grpc.io/blog/deadlines) of up to 60 minutes.
5201      * Otherwise, the maximum deadline is only 30 minutes.
5202      * Note that long-lived requests have a significantly larger (but still small)
5203      * risk of interruption.
5204      * </pre>
5205      *
5206      * <code>bool allow_large_deadline_despite_interruption_risk = 14;</code>
5207      *
5208      * @return This builder for chaining.
5209      */
clearAllowLargeDeadlineDespiteInterruptionRisk()5210     public Builder clearAllowLargeDeadlineDespiteInterruptionRisk() {
5211       bitField0_ = (bitField0_ & ~0x00002000);
5212       allowLargeDeadlineDespiteInterruptionRisk_ = false;
5213       onChanged();
5214       return this;
5215     }
5216 
5217     private boolean useGeodesicDistances_;
5218     /**
5219      *
5220      *
5221      * <pre>
5222      * If true, travel distances will be computed using geodesic distances instead
5223      * of Google Maps distances, and travel times will be computed using geodesic
5224      * distances with a speed defined by `geodesic_meters_per_second`.
5225      * </pre>
5226      *
5227      * <code>bool use_geodesic_distances = 15;</code>
5228      *
5229      * @return The useGeodesicDistances.
5230      */
5231     @java.lang.Override
getUseGeodesicDistances()5232     public boolean getUseGeodesicDistances() {
5233       return useGeodesicDistances_;
5234     }
5235     /**
5236      *
5237      *
5238      * <pre>
5239      * If true, travel distances will be computed using geodesic distances instead
5240      * of Google Maps distances, and travel times will be computed using geodesic
5241      * distances with a speed defined by `geodesic_meters_per_second`.
5242      * </pre>
5243      *
5244      * <code>bool use_geodesic_distances = 15;</code>
5245      *
5246      * @param value The useGeodesicDistances to set.
5247      * @return This builder for chaining.
5248      */
setUseGeodesicDistances(boolean value)5249     public Builder setUseGeodesicDistances(boolean value) {
5250 
5251       useGeodesicDistances_ = value;
5252       bitField0_ |= 0x00004000;
5253       onChanged();
5254       return this;
5255     }
5256     /**
5257      *
5258      *
5259      * <pre>
5260      * If true, travel distances will be computed using geodesic distances instead
5261      * of Google Maps distances, and travel times will be computed using geodesic
5262      * distances with a speed defined by `geodesic_meters_per_second`.
5263      * </pre>
5264      *
5265      * <code>bool use_geodesic_distances = 15;</code>
5266      *
5267      * @return This builder for chaining.
5268      */
clearUseGeodesicDistances()5269     public Builder clearUseGeodesicDistances() {
5270       bitField0_ = (bitField0_ & ~0x00004000);
5271       useGeodesicDistances_ = false;
5272       onChanged();
5273       return this;
5274     }
5275 
5276     private double geodesicMetersPerSecond_;
5277     /**
5278      *
5279      *
5280      * <pre>
5281      * When `use_geodesic_distances` is true, this field must be set and defines
5282      * the speed applied to compute travel times. Its value must be at least 1.0
5283      * meters/seconds.
5284      * </pre>
5285      *
5286      * <code>optional double geodesic_meters_per_second = 16;</code>
5287      *
5288      * @return Whether the geodesicMetersPerSecond field is set.
5289      */
5290     @java.lang.Override
hasGeodesicMetersPerSecond()5291     public boolean hasGeodesicMetersPerSecond() {
5292       return ((bitField0_ & 0x00008000) != 0);
5293     }
5294     /**
5295      *
5296      *
5297      * <pre>
5298      * When `use_geodesic_distances` is true, this field must be set and defines
5299      * the speed applied to compute travel times. Its value must be at least 1.0
5300      * meters/seconds.
5301      * </pre>
5302      *
5303      * <code>optional double geodesic_meters_per_second = 16;</code>
5304      *
5305      * @return The geodesicMetersPerSecond.
5306      */
5307     @java.lang.Override
getGeodesicMetersPerSecond()5308     public double getGeodesicMetersPerSecond() {
5309       return geodesicMetersPerSecond_;
5310     }
5311     /**
5312      *
5313      *
5314      * <pre>
5315      * When `use_geodesic_distances` is true, this field must be set and defines
5316      * the speed applied to compute travel times. Its value must be at least 1.0
5317      * meters/seconds.
5318      * </pre>
5319      *
5320      * <code>optional double geodesic_meters_per_second = 16;</code>
5321      *
5322      * @param value The geodesicMetersPerSecond to set.
5323      * @return This builder for chaining.
5324      */
setGeodesicMetersPerSecond(double value)5325     public Builder setGeodesicMetersPerSecond(double value) {
5326 
5327       geodesicMetersPerSecond_ = value;
5328       bitField0_ |= 0x00008000;
5329       onChanged();
5330       return this;
5331     }
5332     /**
5333      *
5334      *
5335      * <pre>
5336      * When `use_geodesic_distances` is true, this field must be set and defines
5337      * the speed applied to compute travel times. Its value must be at least 1.0
5338      * meters/seconds.
5339      * </pre>
5340      *
5341      * <code>optional double geodesic_meters_per_second = 16;</code>
5342      *
5343      * @return This builder for chaining.
5344      */
clearGeodesicMetersPerSecond()5345     public Builder clearGeodesicMetersPerSecond() {
5346       bitField0_ = (bitField0_ & ~0x00008000);
5347       geodesicMetersPerSecond_ = 0D;
5348       onChanged();
5349       return this;
5350     }
5351 
5352     private java.lang.Object label_ = "";
5353     /**
5354      *
5355      *
5356      * <pre>
5357      * Label that may be used to identify this request, reported back in the
5358      * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
5359      * </pre>
5360      *
5361      * <code>string label = 17;</code>
5362      *
5363      * @return The label.
5364      */
getLabel()5365     public java.lang.String getLabel() {
5366       java.lang.Object ref = label_;
5367       if (!(ref instanceof java.lang.String)) {
5368         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5369         java.lang.String s = bs.toStringUtf8();
5370         label_ = s;
5371         return s;
5372       } else {
5373         return (java.lang.String) ref;
5374       }
5375     }
5376     /**
5377      *
5378      *
5379      * <pre>
5380      * Label that may be used to identify this request, reported back in the
5381      * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
5382      * </pre>
5383      *
5384      * <code>string label = 17;</code>
5385      *
5386      * @return The bytes for label.
5387      */
getLabelBytes()5388     public com.google.protobuf.ByteString getLabelBytes() {
5389       java.lang.Object ref = label_;
5390       if (ref instanceof String) {
5391         com.google.protobuf.ByteString b =
5392             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5393         label_ = b;
5394         return b;
5395       } else {
5396         return (com.google.protobuf.ByteString) ref;
5397       }
5398     }
5399     /**
5400      *
5401      *
5402      * <pre>
5403      * Label that may be used to identify this request, reported back in the
5404      * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
5405      * </pre>
5406      *
5407      * <code>string label = 17;</code>
5408      *
5409      * @param value The label to set.
5410      * @return This builder for chaining.
5411      */
setLabel(java.lang.String value)5412     public Builder setLabel(java.lang.String value) {
5413       if (value == null) {
5414         throw new NullPointerException();
5415       }
5416       label_ = value;
5417       bitField0_ |= 0x00010000;
5418       onChanged();
5419       return this;
5420     }
5421     /**
5422      *
5423      *
5424      * <pre>
5425      * Label that may be used to identify this request, reported back in the
5426      * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
5427      * </pre>
5428      *
5429      * <code>string label = 17;</code>
5430      *
5431      * @return This builder for chaining.
5432      */
clearLabel()5433     public Builder clearLabel() {
5434       label_ = getDefaultInstance().getLabel();
5435       bitField0_ = (bitField0_ & ~0x00010000);
5436       onChanged();
5437       return this;
5438     }
5439     /**
5440      *
5441      *
5442      * <pre>
5443      * Label that may be used to identify this request, reported back in the
5444      * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label].
5445      * </pre>
5446      *
5447      * <code>string label = 17;</code>
5448      *
5449      * @param value The bytes for label to set.
5450      * @return This builder for chaining.
5451      */
setLabelBytes(com.google.protobuf.ByteString value)5452     public Builder setLabelBytes(com.google.protobuf.ByteString value) {
5453       if (value == null) {
5454         throw new NullPointerException();
5455       }
5456       checkByteStringIsUtf8(value);
5457       label_ = value;
5458       bitField0_ |= 0x00010000;
5459       onChanged();
5460       return this;
5461     }
5462 
5463     private boolean populateTravelStepPolylines_;
5464     /**
5465      *
5466      *
5467      * <pre>
5468      * Deprecated: Use
5469      * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
5470      * instead. If true, polylines will be populated in response
5471      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5472      * Note that in this case, the polylines will also be populated in the
5473      * deprecated `travel_steps`.
5474      * </pre>
5475      *
5476      * <code>bool populate_travel_step_polylines = 20 [deprecated = true];</code>
5477      *
5478      * @deprecated google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines
5479      *     is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=351
5480      * @return The populateTravelStepPolylines.
5481      */
5482     @java.lang.Override
5483     @java.lang.Deprecated
getPopulateTravelStepPolylines()5484     public boolean getPopulateTravelStepPolylines() {
5485       return populateTravelStepPolylines_;
5486     }
5487     /**
5488      *
5489      *
5490      * <pre>
5491      * Deprecated: Use
5492      * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
5493      * instead. If true, polylines will be populated in response
5494      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5495      * Note that in this case, the polylines will also be populated in the
5496      * deprecated `travel_steps`.
5497      * </pre>
5498      *
5499      * <code>bool populate_travel_step_polylines = 20 [deprecated = true];</code>
5500      *
5501      * @deprecated google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines
5502      *     is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=351
5503      * @param value The populateTravelStepPolylines to set.
5504      * @return This builder for chaining.
5505      */
5506     @java.lang.Deprecated
setPopulateTravelStepPolylines(boolean value)5507     public Builder setPopulateTravelStepPolylines(boolean value) {
5508 
5509       populateTravelStepPolylines_ = value;
5510       bitField0_ |= 0x00020000;
5511       onChanged();
5512       return this;
5513     }
5514     /**
5515      *
5516      *
5517      * <pre>
5518      * Deprecated: Use
5519      * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
5520      * instead. If true, polylines will be populated in response
5521      * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions].
5522      * Note that in this case, the polylines will also be populated in the
5523      * deprecated `travel_steps`.
5524      * </pre>
5525      *
5526      * <code>bool populate_travel_step_polylines = 20 [deprecated = true];</code>
5527      *
5528      * @deprecated google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines
5529      *     is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=351
5530      * @return This builder for chaining.
5531      */
5532     @java.lang.Deprecated
clearPopulateTravelStepPolylines()5533     public Builder clearPopulateTravelStepPolylines() {
5534       bitField0_ = (bitField0_ & ~0x00020000);
5535       populateTravelStepPolylines_ = false;
5536       onChanged();
5537       return this;
5538     }
5539 
5540     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5541     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
5542       return super.setUnknownFields(unknownFields);
5543     }
5544 
5545     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5546     public final Builder mergeUnknownFields(
5547         final com.google.protobuf.UnknownFieldSet unknownFields) {
5548       return super.mergeUnknownFields(unknownFields);
5549     }
5550 
5551     // @@protoc_insertion_point(builder_scope:google.cloud.optimization.v1.OptimizeToursRequest)
5552   }
5553 
5554   // @@protoc_insertion_point(class_scope:google.cloud.optimization.v1.OptimizeToursRequest)
5555   private static final com.google.cloud.optimization.v1.OptimizeToursRequest DEFAULT_INSTANCE;
5556 
5557   static {
5558     DEFAULT_INSTANCE = new com.google.cloud.optimization.v1.OptimizeToursRequest();
5559   }
5560 
getDefaultInstance()5561   public static com.google.cloud.optimization.v1.OptimizeToursRequest getDefaultInstance() {
5562     return DEFAULT_INSTANCE;
5563   }
5564 
5565   private static final com.google.protobuf.Parser<OptimizeToursRequest> PARSER =
5566       new com.google.protobuf.AbstractParser<OptimizeToursRequest>() {
5567         @java.lang.Override
5568         public OptimizeToursRequest parsePartialFrom(
5569             com.google.protobuf.CodedInputStream input,
5570             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5571             throws com.google.protobuf.InvalidProtocolBufferException {
5572           Builder builder = newBuilder();
5573           try {
5574             builder.mergeFrom(input, extensionRegistry);
5575           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5576             throw e.setUnfinishedMessage(builder.buildPartial());
5577           } catch (com.google.protobuf.UninitializedMessageException e) {
5578             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
5579           } catch (java.io.IOException e) {
5580             throw new com.google.protobuf.InvalidProtocolBufferException(e)
5581                 .setUnfinishedMessage(builder.buildPartial());
5582           }
5583           return builder.buildPartial();
5584         }
5585       };
5586 
parser()5587   public static com.google.protobuf.Parser<OptimizeToursRequest> parser() {
5588     return PARSER;
5589   }
5590 
5591   @java.lang.Override
getParserForType()5592   public com.google.protobuf.Parser<OptimizeToursRequest> getParserForType() {
5593     return PARSER;
5594   }
5595 
5596   @java.lang.Override
getDefaultInstanceForType()5597   public com.google.cloud.optimization.v1.OptimizeToursRequest getDefaultInstanceForType() {
5598     return DEFAULT_INSTANCE;
5599   }
5600 }
5601