Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ConstraintProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/cp_model.proto
4// Protobuf Java Version: 4.33.1
5
6package com.google.ortools.sat;
7
15@com.google.protobuf.Generated
16public final class ConstraintProto extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.sat.ConstraintProto)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 33,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 "ConstraintProto");
29 }
30 // Use ConstraintProto.newBuilder() to construct.
31 private ConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private ConstraintProto() {
35 name_ = "";
36 enforcementLiteral_ = emptyIntList();
37 }
38
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
42 }
43
44 @java.lang.Override
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.ConstraintProto.class, com.google.ortools.sat.ConstraintProto.Builder.class);
50 }
51
52 private int constraintCase_ = 0;
53 @SuppressWarnings("serial")
54 private java.lang.Object constraint_;
55 public enum ConstraintCase
56 implements com.google.protobuf.Internal.EnumLite,
57 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
67 LINEAR(12),
71 ROUTES(23),
72 TABLE(16),
82 private final int value;
83 private ConstraintCase(int value) {
84 this.value = value;
85 }
91 @java.lang.Deprecated
92 public static ConstraintCase valueOf(int value) {
93 return forNumber(value);
94 }
95
96 public static ConstraintCase forNumber(int value) {
97 switch (value) {
98 case 3: return BOOL_OR;
99 case 4: return BOOL_AND;
100 case 26: return AT_MOST_ONE;
101 case 29: return EXACTLY_ONE;
102 case 5: return BOOL_XOR;
103 case 7: return INT_DIV;
104 case 8: return INT_MOD;
105 case 11: return INT_PROD;
106 case 27: return LIN_MAX;
107 case 12: return LINEAR;
108 case 13: return ALL_DIFF;
109 case 14: return ELEMENT;
110 case 15: return CIRCUIT;
111 case 23: return ROUTES;
112 case 16: return TABLE;
113 case 17: return AUTOMATON;
114 case 18: return INVERSE;
115 case 24: return RESERVOIR;
116 case 19: return INTERVAL;
117 case 20: return NO_OVERLAP;
118 case 21: return NO_OVERLAP_2D;
119 case 22: return CUMULATIVE;
120 case 30: return DUMMY_CONSTRAINT;
121 case 0: return CONSTRAINT_NOT_SET;
122 default: return null;
123 }
124 }
125 public int getNumber() {
126 return this.value;
127 }
128 };
129
130 public ConstraintCase
133 constraintCase_);
134 }
135
136 public static final int NAME_FIELD_NUMBER = 1;
137 @SuppressWarnings("serial")
138 private volatile java.lang.Object name_ = "";
147 @java.lang.Override
148 public java.lang.String getName() {
149 java.lang.Object ref = name_;
150 if (ref instanceof java.lang.String) {
151 return (java.lang.String) ref;
152 } else {
153 com.google.protobuf.ByteString bs =
154 (com.google.protobuf.ByteString) ref;
155 java.lang.String s = bs.toStringUtf8();
156 name_ = s;
157 return s;
158 }
159 }
160
168 @java.lang.Override
169 public com.google.protobuf.ByteString
171 java.lang.Object ref = name_;
172 if (ref instanceof java.lang.String) {
173 com.google.protobuf.ByteString b =
174 com.google.protobuf.ByteString.copyFromUtf8(
175 (java.lang.String) ref);
176 name_ = b;
177 return b;
178 } else {
179 return (com.google.protobuf.ByteString) ref;
180 }
181 }
182
183 public static final int ENFORCEMENT_LITERAL_FIELD_NUMBER = 2;
184 @SuppressWarnings("serial")
185 private com.google.protobuf.Internal.IntList enforcementLiteral_ =
186 emptyIntList();
208 @java.lang.Override
209 public java.util.List<java.lang.Integer>
211 return enforcementLiteral_;
212 }
213
235 return enforcementLiteral_.size();
236 }
237
259 public int getEnforcementLiteral(int index) {
260 return enforcementLiteral_.getInt(index);
261 }
262 private int enforcementLiteralMemoizedSerializedSize = -1;
263
264 public static final int BOOL_OR_FIELD_NUMBER = 3;
273 @java.lang.Override
274 public boolean hasBoolOr() {
275 return constraintCase_ == 3;
276 }
277
285 @java.lang.Override
287 if (constraintCase_ == 3) {
288 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
289 }
290 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
291 }
292
299 @java.lang.Override
301 if (constraintCase_ == 3) {
302 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
303 }
304 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
305 }
306
307 public static final int BOOL_AND_FIELD_NUMBER = 4;
320 @java.lang.Override
321 public boolean hasBoolAnd() {
322 return constraintCase_ == 4;
323 }
324
336 @java.lang.Override
338 if (constraintCase_ == 4) {
339 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
340 }
341 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
342 }
343
354 @java.lang.Override
356 if (constraintCase_ == 4) {
357 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
358 }
359 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
360 }
361
362 public static final int AT_MOST_ONE_FIELD_NUMBER = 26;
377 @java.lang.Override
378 public boolean hasAtMostOne() {
379 return constraintCase_ == 26;
380 }
381
395 @java.lang.Override
397 if (constraintCase_ == 26) {
398 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
399 }
400 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
401 }
402
415 @java.lang.Override
417 if (constraintCase_ == 26) {
418 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
419 }
420 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
421 }
422
423 public static final int EXACTLY_ONE_FIELD_NUMBER = 29;
439 @java.lang.Override
440 public boolean hasExactlyOne() {
441 return constraintCase_ == 29;
442 }
443
458 @java.lang.Override
460 if (constraintCase_ == 29) {
461 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
462 }
463 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
464 }
465
479 @java.lang.Override
481 if (constraintCase_ == 29) {
482 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
483 }
484 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
485 }
486
487 public static final int BOOL_XOR_FIELD_NUMBER = 5;
496 @java.lang.Override
497 public boolean hasBoolXor() {
498 return constraintCase_ == 5;
499 }
500
508 @java.lang.Override
510 if (constraintCase_ == 5) {
511 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
512 }
513 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
514 }
515
522 @java.lang.Override
524 if (constraintCase_ == 5) {
525 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
526 }
527 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
528 }
529
530 public static final int INT_DIV_FIELD_NUMBER = 7;
545 @java.lang.Override
546 public boolean hasIntDiv() {
547 return constraintCase_ == 7;
548 }
549
563 @java.lang.Override
565 if (constraintCase_ == 7) {
566 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
567 }
568 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
569 }
570
583 @java.lang.Override
585 if (constraintCase_ == 7) {
586 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
587 }
588 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
589 }
590
591 public static final int INT_MOD_FIELD_NUMBER = 8;
602 @java.lang.Override
603 public boolean hasIntMod() {
604 return constraintCase_ == 8;
605 }
606
616 @java.lang.Override
618 if (constraintCase_ == 8) {
619 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
620 }
621 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
622 }
623
632 @java.lang.Override
634 if (constraintCase_ == 8) {
635 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
636 }
637 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
638 }
639
640 public static final int INT_PROD_FIELD_NUMBER = 11;
656 @java.lang.Override
657 public boolean hasIntProd() {
658 return constraintCase_ == 11;
659 }
660
675 @java.lang.Override
677 if (constraintCase_ == 11) {
678 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
679 }
680 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
681 }
682
696 @java.lang.Override
698 if (constraintCase_ == 11) {
699 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
700 }
701 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
702 }
703
704 public static final int LIN_MAX_FIELD_NUMBER = 27;
715 @java.lang.Override
716 public boolean hasLinMax() {
717 return constraintCase_ == 27;
718 }
719
729 @java.lang.Override
731 if (constraintCase_ == 27) {
732 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
733 }
734 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
735 }
736
745 @java.lang.Override
747 if (constraintCase_ == 27) {
748 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
749 }
750 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
751 }
752
753 public static final int LINEAR_FIELD_NUMBER = 12;
763 @java.lang.Override
764 public boolean hasLinear() {
765 return constraintCase_ == 12;
766 }
767
776 @java.lang.Override
778 if (constraintCase_ == 12) {
779 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
780 }
781 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
782 }
783
791 @java.lang.Override
793 if (constraintCase_ == 12) {
794 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
795 }
796 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
797 }
798
799 public static final int ALL_DIFF_FIELD_NUMBER = 13;
808 @java.lang.Override
809 public boolean hasAllDiff() {
810 return constraintCase_ == 13;
811 }
812
820 @java.lang.Override
822 if (constraintCase_ == 13) {
823 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
824 }
825 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
826 }
827
834 @java.lang.Override
836 if (constraintCase_ == 13) {
837 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
838 }
839 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
840 }
841
842 public static final int ELEMENT_FIELD_NUMBER = 14;
852 @java.lang.Override
853 public boolean hasElement() {
854 return constraintCase_ == 14;
855 }
856
865 @java.lang.Override
867 if (constraintCase_ == 14) {
868 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
869 }
870 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
871 }
872
880 @java.lang.Override
882 if (constraintCase_ == 14) {
883 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
884 }
885 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
886 }
887
888 public static final int CIRCUIT_FIELD_NUMBER = 15;
898 @java.lang.Override
899 public boolean hasCircuit() {
900 return constraintCase_ == 15;
901 }
902
911 @java.lang.Override
913 if (constraintCase_ == 15) {
914 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
915 }
916 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
917 }
918
926 @java.lang.Override
928 if (constraintCase_ == 15) {
929 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
930 }
931 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
932 }
933
934 public static final int ROUTES_FIELD_NUMBER = 23;
943 @java.lang.Override
944 public boolean hasRoutes() {
945 return constraintCase_ == 23;
946 }
947
955 @java.lang.Override
957 if (constraintCase_ == 23) {
958 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
959 }
960 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
961 }
962
969 @java.lang.Override
971 if (constraintCase_ == 23) {
972 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
973 }
974 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
975 }
976
977 public static final int TABLE_FIELD_NUMBER = 16;
987 @java.lang.Override
988 public boolean hasTable() {
989 return constraintCase_ == 16;
990 }
991
1000 @java.lang.Override
1002 if (constraintCase_ == 16) {
1003 return (com.google.ortools.sat.TableConstraintProto) constraint_;
1004 }
1005 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
1006 }
1007
1015 @java.lang.Override
1017 if (constraintCase_ == 16) {
1018 return (com.google.ortools.sat.TableConstraintProto) constraint_;
1019 }
1020 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
1021 }
1022
1023 public static final int AUTOMATON_FIELD_NUMBER = 17;
1033 @java.lang.Override
1034 public boolean hasAutomaton() {
1035 return constraintCase_ == 17;
1036 }
1037
1046 @java.lang.Override
1048 if (constraintCase_ == 17) {
1049 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
1050 }
1051 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
1052 }
1053
1061 @java.lang.Override
1063 if (constraintCase_ == 17) {
1064 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
1065 }
1066 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
1067 }
1068
1069 public static final int INVERSE_FIELD_NUMBER = 18;
1079 @java.lang.Override
1080 public boolean hasInverse() {
1081 return constraintCase_ == 18;
1082 }
1083
1092 @java.lang.Override
1094 if (constraintCase_ == 18) {
1095 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
1096 }
1097 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
1098 }
1099
1107 @java.lang.Override
1109 if (constraintCase_ == 18) {
1110 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
1111 }
1112 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
1113 }
1114
1115 public static final int RESERVOIR_FIELD_NUMBER = 24;
1126 @java.lang.Override
1127 public boolean hasReservoir() {
1128 return constraintCase_ == 24;
1129 }
1130
1140 @java.lang.Override
1142 if (constraintCase_ == 24) {
1143 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
1144 }
1145 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
1146 }
1147
1156 @java.lang.Override
1158 if (constraintCase_ == 24) {
1159 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
1160 }
1161 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
1162 }
1163
1164 public static final int INTERVAL_FIELD_NUMBER = 19;
1174 @java.lang.Override
1175 public boolean hasInterval() {
1176 return constraintCase_ == 19;
1177 }
1178
1187 @java.lang.Override
1189 if (constraintCase_ == 19) {
1190 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
1191 }
1192 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
1193 }
1194
1202 @java.lang.Override
1204 if (constraintCase_ == 19) {
1205 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
1206 }
1207 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
1208 }
1209
1210 public static final int NO_OVERLAP_FIELD_NUMBER = 20;
1221 @java.lang.Override
1222 public boolean hasNoOverlap() {
1223 return constraintCase_ == 20;
1224 }
1225
1235 @java.lang.Override
1237 if (constraintCase_ == 20) {
1238 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
1239 }
1240 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
1241 }
1242
1251 @java.lang.Override
1253 if (constraintCase_ == 20) {
1254 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
1255 }
1256 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
1257 }
1258
1259 public static final int NO_OVERLAP_2D_FIELD_NUMBER = 21;
1268 @java.lang.Override
1269 public boolean hasNoOverlap2D() {
1270 return constraintCase_ == 21;
1271 }
1272
1280 @java.lang.Override
1282 if (constraintCase_ == 21) {
1283 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
1284 }
1285 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
1286 }
1287
1294 @java.lang.Override
1296 if (constraintCase_ == 21) {
1297 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
1298 }
1299 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
1300 }
1301
1302 public static final int CUMULATIVE_FIELD_NUMBER = 22;
1313 @java.lang.Override
1314 public boolean hasCumulative() {
1315 return constraintCase_ == 22;
1316 }
1317
1327 @java.lang.Override
1329 if (constraintCase_ == 22) {
1330 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
1331 }
1332 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
1333 }
1334
1343 @java.lang.Override
1345 if (constraintCase_ == 22) {
1346 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
1347 }
1348 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
1349 }
1350
1351 public static final int DUMMY_CONSTRAINT_FIELD_NUMBER = 30;
1361 @java.lang.Override
1362 public boolean hasDummyConstraint() {
1363 return constraintCase_ == 30;
1364 }
1365
1374 @java.lang.Override
1376 if (constraintCase_ == 30) {
1377 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
1378 }
1379 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
1380 }
1381
1389 @java.lang.Override
1391 if (constraintCase_ == 30) {
1392 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
1393 }
1394 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
1395 }
1396
1397 private byte memoizedIsInitialized = -1;
1398 @java.lang.Override
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
1409 public void writeTo(com.google.protobuf.CodedOutputStream output)
1410 throws java.io.IOException {
1412 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
1413 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
1414 }
1415 if (getEnforcementLiteralList().size() > 0) {
1416 output.writeUInt32NoTag(18);
1417 output.writeUInt32NoTag(enforcementLiteralMemoizedSerializedSize);
1418 }
1419 for (int i = 0; i < enforcementLiteral_.size(); i++) {
1420 output.writeInt32NoTag(enforcementLiteral_.getInt(i));
1421 }
1422 if (constraintCase_ == 3) {
1423 output.writeMessage(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1424 }
1425 if (constraintCase_ == 4) {
1426 output.writeMessage(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1427 }
1428 if (constraintCase_ == 5) {
1429 output.writeMessage(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1430 }
1431 if (constraintCase_ == 7) {
1432 output.writeMessage(7, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1433 }
1434 if (constraintCase_ == 8) {
1435 output.writeMessage(8, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1436 }
1437 if (constraintCase_ == 11) {
1438 output.writeMessage(11, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1439 }
1440 if (constraintCase_ == 12) {
1441 output.writeMessage(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
1442 }
1443 if (constraintCase_ == 13) {
1444 output.writeMessage(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
1445 }
1446 if (constraintCase_ == 14) {
1447 output.writeMessage(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
1448 }
1449 if (constraintCase_ == 15) {
1450 output.writeMessage(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
1451 }
1452 if (constraintCase_ == 16) {
1453 output.writeMessage(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
1454 }
1455 if (constraintCase_ == 17) {
1456 output.writeMessage(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
1457 }
1458 if (constraintCase_ == 18) {
1459 output.writeMessage(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
1460 }
1461 if (constraintCase_ == 19) {
1462 output.writeMessage(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
1463 }
1464 if (constraintCase_ == 20) {
1465 output.writeMessage(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
1466 }
1467 if (constraintCase_ == 21) {
1468 output.writeMessage(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
1469 }
1470 if (constraintCase_ == 22) {
1471 output.writeMessage(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
1472 }
1473 if (constraintCase_ == 23) {
1474 output.writeMessage(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
1475 }
1476 if (constraintCase_ == 24) {
1477 output.writeMessage(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
1478 }
1479 if (constraintCase_ == 26) {
1480 output.writeMessage(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1481 }
1482 if (constraintCase_ == 27) {
1483 output.writeMessage(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1484 }
1485 if (constraintCase_ == 29) {
1486 output.writeMessage(29, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1487 }
1488 if (constraintCase_ == 30) {
1489 output.writeMessage(30, (com.google.ortools.sat.ListOfVariablesProto) constraint_);
1490 }
1491 getUnknownFields().writeTo(output);
1492 }
1493
1494 @java.lang.Override
1495 public int getSerializedSize() {
1496 int size = memoizedSize;
1497 if (size != -1) return size;
1498
1499 size = 0;
1500 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
1501 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
1502 }
1503 {
1504 int dataSize = 0;
1505 for (int i = 0; i < enforcementLiteral_.size(); i++) {
1506 dataSize += com.google.protobuf.CodedOutputStream
1507 .computeInt32SizeNoTag(enforcementLiteral_.getInt(i));
1508 }
1509 size += dataSize;
1510 if (!getEnforcementLiteralList().isEmpty()) {
1511 size += 1;
1512 size += com.google.protobuf.CodedOutputStream
1513 .computeInt32SizeNoTag(dataSize);
1514 }
1515 enforcementLiteralMemoizedSerializedSize = dataSize;
1516 }
1517 if (constraintCase_ == 3) {
1518 size += com.google.protobuf.CodedOutputStream
1519 .computeMessageSize(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1520 }
1521 if (constraintCase_ == 4) {
1522 size += com.google.protobuf.CodedOutputStream
1523 .computeMessageSize(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1524 }
1525 if (constraintCase_ == 5) {
1526 size += com.google.protobuf.CodedOutputStream
1527 .computeMessageSize(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1528 }
1529 if (constraintCase_ == 7) {
1530 size += com.google.protobuf.CodedOutputStream
1531 .computeMessageSize(7, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1532 }
1533 if (constraintCase_ == 8) {
1534 size += com.google.protobuf.CodedOutputStream
1535 .computeMessageSize(8, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1536 }
1537 if (constraintCase_ == 11) {
1538 size += com.google.protobuf.CodedOutputStream
1539 .computeMessageSize(11, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1540 }
1541 if (constraintCase_ == 12) {
1542 size += com.google.protobuf.CodedOutputStream
1543 .computeMessageSize(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
1544 }
1545 if (constraintCase_ == 13) {
1546 size += com.google.protobuf.CodedOutputStream
1547 .computeMessageSize(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
1548 }
1549 if (constraintCase_ == 14) {
1550 size += com.google.protobuf.CodedOutputStream
1551 .computeMessageSize(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
1552 }
1553 if (constraintCase_ == 15) {
1554 size += com.google.protobuf.CodedOutputStream
1555 .computeMessageSize(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
1556 }
1557 if (constraintCase_ == 16) {
1558 size += com.google.protobuf.CodedOutputStream
1559 .computeMessageSize(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
1560 }
1561 if (constraintCase_ == 17) {
1562 size += com.google.protobuf.CodedOutputStream
1563 .computeMessageSize(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
1564 }
1565 if (constraintCase_ == 18) {
1566 size += com.google.protobuf.CodedOutputStream
1567 .computeMessageSize(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
1568 }
1569 if (constraintCase_ == 19) {
1570 size += com.google.protobuf.CodedOutputStream
1571 .computeMessageSize(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
1572 }
1573 if (constraintCase_ == 20) {
1574 size += com.google.protobuf.CodedOutputStream
1575 .computeMessageSize(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
1576 }
1577 if (constraintCase_ == 21) {
1578 size += com.google.protobuf.CodedOutputStream
1579 .computeMessageSize(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
1580 }
1581 if (constraintCase_ == 22) {
1582 size += com.google.protobuf.CodedOutputStream
1583 .computeMessageSize(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
1584 }
1585 if (constraintCase_ == 23) {
1586 size += com.google.protobuf.CodedOutputStream
1587 .computeMessageSize(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
1588 }
1589 if (constraintCase_ == 24) {
1590 size += com.google.protobuf.CodedOutputStream
1591 .computeMessageSize(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
1592 }
1593 if (constraintCase_ == 26) {
1594 size += com.google.protobuf.CodedOutputStream
1595 .computeMessageSize(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1596 }
1597 if (constraintCase_ == 27) {
1598 size += com.google.protobuf.CodedOutputStream
1599 .computeMessageSize(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1600 }
1601 if (constraintCase_ == 29) {
1602 size += com.google.protobuf.CodedOutputStream
1603 .computeMessageSize(29, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1604 }
1605 if (constraintCase_ == 30) {
1606 size += com.google.protobuf.CodedOutputStream
1607 .computeMessageSize(30, (com.google.ortools.sat.ListOfVariablesProto) constraint_);
1608 }
1609 size += getUnknownFields().getSerializedSize();
1610 memoizedSize = size;
1611 return size;
1612 }
1613
1614 @java.lang.Override
1615 public boolean equals(final java.lang.Object obj) {
1616 if (obj == this) {
1617 return true;
1618 }
1619 if (!(obj instanceof com.google.ortools.sat.ConstraintProto)) {
1620 return super.equals(obj);
1621 }
1622 com.google.ortools.sat.ConstraintProto other = (com.google.ortools.sat.ConstraintProto) obj;
1623
1624 if (!getName()
1625 .equals(other.getName())) return false;
1627 .equals(other.getEnforcementLiteralList())) return false;
1628 if (!getConstraintCase().equals(other.getConstraintCase())) return false;
1629 switch (constraintCase_) {
1630 case 3:
1631 if (!getBoolOr()
1632 .equals(other.getBoolOr())) return false;
1633 break;
1634 case 4:
1635 if (!getBoolAnd()
1636 .equals(other.getBoolAnd())) return false;
1637 break;
1638 case 26:
1639 if (!getAtMostOne()
1640 .equals(other.getAtMostOne())) return false;
1641 break;
1642 case 29:
1643 if (!getExactlyOne()
1644 .equals(other.getExactlyOne())) return false;
1645 break;
1646 case 5:
1647 if (!getBoolXor()
1648 .equals(other.getBoolXor())) return false;
1649 break;
1650 case 7:
1651 if (!getIntDiv()
1652 .equals(other.getIntDiv())) return false;
1653 break;
1654 case 8:
1655 if (!getIntMod()
1656 .equals(other.getIntMod())) return false;
1657 break;
1658 case 11:
1659 if (!getIntProd()
1660 .equals(other.getIntProd())) return false;
1661 break;
1662 case 27:
1663 if (!getLinMax()
1664 .equals(other.getLinMax())) return false;
1665 break;
1666 case 12:
1667 if (!getLinear()
1668 .equals(other.getLinear())) return false;
1669 break;
1670 case 13:
1671 if (!getAllDiff()
1672 .equals(other.getAllDiff())) return false;
1673 break;
1674 case 14:
1675 if (!getElement()
1676 .equals(other.getElement())) return false;
1677 break;
1678 case 15:
1679 if (!getCircuit()
1680 .equals(other.getCircuit())) return false;
1681 break;
1682 case 23:
1683 if (!getRoutes()
1684 .equals(other.getRoutes())) return false;
1685 break;
1686 case 16:
1687 if (!getTable()
1688 .equals(other.getTable())) return false;
1689 break;
1690 case 17:
1691 if (!getAutomaton()
1692 .equals(other.getAutomaton())) return false;
1693 break;
1694 case 18:
1695 if (!getInverse()
1696 .equals(other.getInverse())) return false;
1697 break;
1698 case 24:
1699 if (!getReservoir()
1700 .equals(other.getReservoir())) return false;
1701 break;
1702 case 19:
1703 if (!getInterval()
1704 .equals(other.getInterval())) return false;
1705 break;
1706 case 20:
1707 if (!getNoOverlap()
1708 .equals(other.getNoOverlap())) return false;
1709 break;
1710 case 21:
1711 if (!getNoOverlap2D()
1712 .equals(other.getNoOverlap2D())) return false;
1713 break;
1714 case 22:
1715 if (!getCumulative()
1716 .equals(other.getCumulative())) return false;
1717 break;
1718 case 30:
1719 if (!getDummyConstraint()
1720 .equals(other.getDummyConstraint())) return false;
1721 break;
1722 case 0:
1723 default:
1724 }
1725 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1726 return true;
1727 }
1728
1729 @java.lang.Override
1730 public int hashCode() {
1731 if (memoizedHashCode != 0) {
1732 return memoizedHashCode;
1733 }
1734 int hash = 41;
1735 hash = (19 * hash) + getDescriptor().hashCode();
1736 hash = (37 * hash) + NAME_FIELD_NUMBER;
1737 hash = (53 * hash) + getName().hashCode();
1738 if (getEnforcementLiteralCount() > 0) {
1739 hash = (37 * hash) + ENFORCEMENT_LITERAL_FIELD_NUMBER;
1740 hash = (53 * hash) + getEnforcementLiteralList().hashCode();
1741 }
1742 switch (constraintCase_) {
1743 case 3:
1744 hash = (37 * hash) + BOOL_OR_FIELD_NUMBER;
1745 hash = (53 * hash) + getBoolOr().hashCode();
1746 break;
1747 case 4:
1748 hash = (37 * hash) + BOOL_AND_FIELD_NUMBER;
1749 hash = (53 * hash) + getBoolAnd().hashCode();
1750 break;
1751 case 26:
1752 hash = (37 * hash) + AT_MOST_ONE_FIELD_NUMBER;
1753 hash = (53 * hash) + getAtMostOne().hashCode();
1754 break;
1755 case 29:
1756 hash = (37 * hash) + EXACTLY_ONE_FIELD_NUMBER;
1757 hash = (53 * hash) + getExactlyOne().hashCode();
1758 break;
1759 case 5:
1760 hash = (37 * hash) + BOOL_XOR_FIELD_NUMBER;
1761 hash = (53 * hash) + getBoolXor().hashCode();
1762 break;
1763 case 7:
1764 hash = (37 * hash) + INT_DIV_FIELD_NUMBER;
1765 hash = (53 * hash) + getIntDiv().hashCode();
1766 break;
1767 case 8:
1768 hash = (37 * hash) + INT_MOD_FIELD_NUMBER;
1769 hash = (53 * hash) + getIntMod().hashCode();
1770 break;
1771 case 11:
1772 hash = (37 * hash) + INT_PROD_FIELD_NUMBER;
1773 hash = (53 * hash) + getIntProd().hashCode();
1774 break;
1775 case 27:
1776 hash = (37 * hash) + LIN_MAX_FIELD_NUMBER;
1777 hash = (53 * hash) + getLinMax().hashCode();
1778 break;
1779 case 12:
1780 hash = (37 * hash) + LINEAR_FIELD_NUMBER;
1781 hash = (53 * hash) + getLinear().hashCode();
1782 break;
1783 case 13:
1784 hash = (37 * hash) + ALL_DIFF_FIELD_NUMBER;
1785 hash = (53 * hash) + getAllDiff().hashCode();
1786 break;
1787 case 14:
1788 hash = (37 * hash) + ELEMENT_FIELD_NUMBER;
1789 hash = (53 * hash) + getElement().hashCode();
1790 break;
1791 case 15:
1792 hash = (37 * hash) + CIRCUIT_FIELD_NUMBER;
1793 hash = (53 * hash) + getCircuit().hashCode();
1794 break;
1795 case 23:
1796 hash = (37 * hash) + ROUTES_FIELD_NUMBER;
1797 hash = (53 * hash) + getRoutes().hashCode();
1798 break;
1799 case 16:
1800 hash = (37 * hash) + TABLE_FIELD_NUMBER;
1801 hash = (53 * hash) + getTable().hashCode();
1802 break;
1803 case 17:
1804 hash = (37 * hash) + AUTOMATON_FIELD_NUMBER;
1805 hash = (53 * hash) + getAutomaton().hashCode();
1806 break;
1807 case 18:
1808 hash = (37 * hash) + INVERSE_FIELD_NUMBER;
1809 hash = (53 * hash) + getInverse().hashCode();
1810 break;
1811 case 24:
1812 hash = (37 * hash) + RESERVOIR_FIELD_NUMBER;
1813 hash = (53 * hash) + getReservoir().hashCode();
1814 break;
1815 case 19:
1816 hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
1817 hash = (53 * hash) + getInterval().hashCode();
1818 break;
1819 case 20:
1820 hash = (37 * hash) + NO_OVERLAP_FIELD_NUMBER;
1821 hash = (53 * hash) + getNoOverlap().hashCode();
1822 break;
1823 case 21:
1824 hash = (37 * hash) + NO_OVERLAP_2D_FIELD_NUMBER;
1825 hash = (53 * hash) + getNoOverlap2D().hashCode();
1826 break;
1827 case 22:
1828 hash = (37 * hash) + CUMULATIVE_FIELD_NUMBER;
1829 hash = (53 * hash) + getCumulative().hashCode();
1830 break;
1831 case 30:
1832 hash = (37 * hash) + DUMMY_CONSTRAINT_FIELD_NUMBER;
1833 hash = (53 * hash) + getDummyConstraint().hashCode();
1834 break;
1835 case 0:
1836 default:
1837 }
1838 hash = (29 * hash) + getUnknownFields().hashCode();
1839 memoizedHashCode = hash;
1840 return hash;
1841 }
1842
1844 java.nio.ByteBuffer data)
1845 throws com.google.protobuf.InvalidProtocolBufferException {
1846 return PARSER.parseFrom(data);
1847 }
1849 java.nio.ByteBuffer data,
1850 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1851 throws com.google.protobuf.InvalidProtocolBufferException {
1852 return PARSER.parseFrom(data, extensionRegistry);
1853 }
1855 com.google.protobuf.ByteString data)
1856 throws com.google.protobuf.InvalidProtocolBufferException {
1857 return PARSER.parseFrom(data);
1858 }
1860 com.google.protobuf.ByteString data,
1861 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1862 throws com.google.protobuf.InvalidProtocolBufferException {
1863 return PARSER.parseFrom(data, extensionRegistry);
1864 }
1866 throws com.google.protobuf.InvalidProtocolBufferException {
1867 return PARSER.parseFrom(data);
1868 }
1870 byte[] data,
1871 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1872 throws com.google.protobuf.InvalidProtocolBufferException {
1873 return PARSER.parseFrom(data, extensionRegistry);
1874 }
1875 public static com.google.ortools.sat.ConstraintProto parseFrom(java.io.InputStream input)
1876 throws java.io.IOException {
1877 return com.google.protobuf.GeneratedMessage
1878 .parseWithIOException(PARSER, input);
1879 }
1881 java.io.InputStream input,
1882 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1883 throws java.io.IOException {
1884 return com.google.protobuf.GeneratedMessage
1885 .parseWithIOException(PARSER, input, extensionRegistry);
1886 }
1887
1888 public static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(java.io.InputStream input)
1889 throws java.io.IOException {
1890 return com.google.protobuf.GeneratedMessage
1891 .parseDelimitedWithIOException(PARSER, input);
1892 }
1893
1895 java.io.InputStream input,
1896 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1897 throws java.io.IOException {
1898 return com.google.protobuf.GeneratedMessage
1899 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1900 }
1902 com.google.protobuf.CodedInputStream input)
1903 throws java.io.IOException {
1904 return com.google.protobuf.GeneratedMessage
1905 .parseWithIOException(PARSER, input);
1906 }
1908 com.google.protobuf.CodedInputStream input,
1909 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1910 throws java.io.IOException {
1911 return com.google.protobuf.GeneratedMessage
1912 .parseWithIOException(PARSER, input, extensionRegistry);
1913 }
1914
1915 @java.lang.Override
1916 public Builder newBuilderForType() { return newBuilder(); }
1917 public static Builder newBuilder() {
1918 return DEFAULT_INSTANCE.toBuilder();
1919 }
1920 public static Builder newBuilder(com.google.ortools.sat.ConstraintProto prototype) {
1921 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1922 }
1923 @java.lang.Override
1925 return this == DEFAULT_INSTANCE
1926 ? new Builder() : new Builder().mergeFrom(this);
1927 }
1928
1929 @java.lang.Override
1931 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1932 Builder builder = new Builder(parent);
1933 return builder;
1934 }
1935
1942 public static final class Builder extends
1943 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
1944 // @@protoc_insertion_point(builder_implements:operations_research.sat.ConstraintProto)
1946 public static final com.google.protobuf.Descriptors.Descriptor
1948 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
1949 }
1950
1951 @java.lang.Override
1952 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1954 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_fieldAccessorTable
1955 .ensureFieldAccessorsInitialized(
1956 com.google.ortools.sat.ConstraintProto.class, com.google.ortools.sat.ConstraintProto.Builder.class);
1957 }
1958
1959 // Construct using com.google.ortools.sat.ConstraintProto.newBuilder()
1960 private Builder() {
1961
1962 }
1963
1964 private Builder(
1965 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1966 super(parent);
1967
1968 }
1969 @java.lang.Override
1970 public Builder clear() {
1971 super.clear();
1972 bitField0_ = 0;
1973 name_ = "";
1974 enforcementLiteral_ = emptyIntList();
1975 if (boolOrBuilder_ != null) {
1976 boolOrBuilder_.clear();
1977 }
1978 if (boolAndBuilder_ != null) {
1979 boolAndBuilder_.clear();
1980 }
1981 if (atMostOneBuilder_ != null) {
1982 atMostOneBuilder_.clear();
1983 }
1984 if (exactlyOneBuilder_ != null) {
1985 exactlyOneBuilder_.clear();
1986 }
1987 if (boolXorBuilder_ != null) {
1988 boolXorBuilder_.clear();
1989 }
1990 if (intDivBuilder_ != null) {
1991 intDivBuilder_.clear();
1992 }
1993 if (intModBuilder_ != null) {
1994 intModBuilder_.clear();
1995 }
1996 if (intProdBuilder_ != null) {
1997 intProdBuilder_.clear();
1998 }
1999 if (linMaxBuilder_ != null) {
2000 linMaxBuilder_.clear();
2001 }
2002 if (linearBuilder_ != null) {
2003 linearBuilder_.clear();
2004 }
2005 if (allDiffBuilder_ != null) {
2006 allDiffBuilder_.clear();
2007 }
2008 if (elementBuilder_ != null) {
2009 elementBuilder_.clear();
2010 }
2011 if (circuitBuilder_ != null) {
2012 circuitBuilder_.clear();
2013 }
2014 if (routesBuilder_ != null) {
2015 routesBuilder_.clear();
2016 }
2017 if (tableBuilder_ != null) {
2018 tableBuilder_.clear();
2019 }
2020 if (automatonBuilder_ != null) {
2021 automatonBuilder_.clear();
2022 }
2023 if (inverseBuilder_ != null) {
2024 inverseBuilder_.clear();
2025 }
2026 if (reservoirBuilder_ != null) {
2027 reservoirBuilder_.clear();
2028 }
2029 if (intervalBuilder_ != null) {
2030 intervalBuilder_.clear();
2031 }
2032 if (noOverlapBuilder_ != null) {
2033 noOverlapBuilder_.clear();
2034 }
2035 if (noOverlap2DBuilder_ != null) {
2036 noOverlap2DBuilder_.clear();
2037 }
2038 if (cumulativeBuilder_ != null) {
2039 cumulativeBuilder_.clear();
2040 }
2041 if (dummyConstraintBuilder_ != null) {
2042 dummyConstraintBuilder_.clear();
2043 }
2044 constraintCase_ = 0;
2045 constraint_ = null;
2046 return this;
2047 }
2048
2049 @java.lang.Override
2050 public com.google.protobuf.Descriptors.Descriptor
2052 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
2053 }
2054
2055 @java.lang.Override
2057 return com.google.ortools.sat.ConstraintProto.getDefaultInstance();
2058 }
2059
2060 @java.lang.Override
2063 if (!result.isInitialized()) {
2064 throw newUninitializedMessageException(result);
2065 }
2066 return result;
2067 }
2068
2069 @java.lang.Override
2071 com.google.ortools.sat.ConstraintProto result = new com.google.ortools.sat.ConstraintProto(this);
2072 if (bitField0_ != 0) { buildPartial0(result); }
2073 buildPartialOneofs(result);
2074 onBuilt();
2075 return result;
2076 }
2077
2078 private void buildPartial0(com.google.ortools.sat.ConstraintProto result) {
2079 int from_bitField0_ = bitField0_;
2080 if (((from_bitField0_ & 0x00000001) != 0)) {
2081 result.name_ = name_;
2082 }
2083 if (((from_bitField0_ & 0x00000002) != 0)) {
2084 enforcementLiteral_.makeImmutable();
2085 result.enforcementLiteral_ = enforcementLiteral_;
2086 }
2087 }
2088
2089 private void buildPartialOneofs(com.google.ortools.sat.ConstraintProto result) {
2090 result.constraintCase_ = constraintCase_;
2091 result.constraint_ = this.constraint_;
2092 if (constraintCase_ == 3 &&
2093 boolOrBuilder_ != null) {
2094 result.constraint_ = boolOrBuilder_.build();
2095 }
2096 if (constraintCase_ == 4 &&
2097 boolAndBuilder_ != null) {
2098 result.constraint_ = boolAndBuilder_.build();
2099 }
2100 if (constraintCase_ == 26 &&
2101 atMostOneBuilder_ != null) {
2102 result.constraint_ = atMostOneBuilder_.build();
2103 }
2104 if (constraintCase_ == 29 &&
2105 exactlyOneBuilder_ != null) {
2106 result.constraint_ = exactlyOneBuilder_.build();
2107 }
2108 if (constraintCase_ == 5 &&
2109 boolXorBuilder_ != null) {
2110 result.constraint_ = boolXorBuilder_.build();
2111 }
2112 if (constraintCase_ == 7 &&
2113 intDivBuilder_ != null) {
2114 result.constraint_ = intDivBuilder_.build();
2115 }
2116 if (constraintCase_ == 8 &&
2117 intModBuilder_ != null) {
2118 result.constraint_ = intModBuilder_.build();
2119 }
2120 if (constraintCase_ == 11 &&
2121 intProdBuilder_ != null) {
2122 result.constraint_ = intProdBuilder_.build();
2123 }
2124 if (constraintCase_ == 27 &&
2125 linMaxBuilder_ != null) {
2126 result.constraint_ = linMaxBuilder_.build();
2127 }
2128 if (constraintCase_ == 12 &&
2129 linearBuilder_ != null) {
2130 result.constraint_ = linearBuilder_.build();
2131 }
2132 if (constraintCase_ == 13 &&
2133 allDiffBuilder_ != null) {
2134 result.constraint_ = allDiffBuilder_.build();
2135 }
2136 if (constraintCase_ == 14 &&
2137 elementBuilder_ != null) {
2138 result.constraint_ = elementBuilder_.build();
2139 }
2140 if (constraintCase_ == 15 &&
2141 circuitBuilder_ != null) {
2142 result.constraint_ = circuitBuilder_.build();
2143 }
2144 if (constraintCase_ == 23 &&
2145 routesBuilder_ != null) {
2146 result.constraint_ = routesBuilder_.build();
2147 }
2148 if (constraintCase_ == 16 &&
2149 tableBuilder_ != null) {
2150 result.constraint_ = tableBuilder_.build();
2151 }
2152 if (constraintCase_ == 17 &&
2153 automatonBuilder_ != null) {
2154 result.constraint_ = automatonBuilder_.build();
2155 }
2156 if (constraintCase_ == 18 &&
2157 inverseBuilder_ != null) {
2158 result.constraint_ = inverseBuilder_.build();
2159 }
2160 if (constraintCase_ == 24 &&
2161 reservoirBuilder_ != null) {
2162 result.constraint_ = reservoirBuilder_.build();
2163 }
2164 if (constraintCase_ == 19 &&
2165 intervalBuilder_ != null) {
2166 result.constraint_ = intervalBuilder_.build();
2167 }
2168 if (constraintCase_ == 20 &&
2169 noOverlapBuilder_ != null) {
2170 result.constraint_ = noOverlapBuilder_.build();
2171 }
2172 if (constraintCase_ == 21 &&
2173 noOverlap2DBuilder_ != null) {
2174 result.constraint_ = noOverlap2DBuilder_.build();
2175 }
2176 if (constraintCase_ == 22 &&
2177 cumulativeBuilder_ != null) {
2178 result.constraint_ = cumulativeBuilder_.build();
2179 }
2180 if (constraintCase_ == 30 &&
2181 dummyConstraintBuilder_ != null) {
2182 result.constraint_ = dummyConstraintBuilder_.build();
2183 }
2184 }
2185
2186 @java.lang.Override
2187 public Builder mergeFrom(com.google.protobuf.Message other) {
2188 if (other instanceof com.google.ortools.sat.ConstraintProto) {
2189 return mergeFrom((com.google.ortools.sat.ConstraintProto)other);
2190 } else {
2191 super.mergeFrom(other);
2192 return this;
2193 }
2194 }
2195
2196 public Builder mergeFrom(com.google.ortools.sat.ConstraintProto other) {
2197 if (other == com.google.ortools.sat.ConstraintProto.getDefaultInstance()) return this;
2198 if (!other.getName().isEmpty()) {
2199 name_ = other.name_;
2200 bitField0_ |= 0x00000001;
2201 onChanged();
2202 }
2203 if (!other.enforcementLiteral_.isEmpty()) {
2204 if (enforcementLiteral_.isEmpty()) {
2205 enforcementLiteral_ = other.enforcementLiteral_;
2206 enforcementLiteral_.makeImmutable();
2207 bitField0_ |= 0x00000002;
2208 } else {
2209 ensureEnforcementLiteralIsMutable();
2210 enforcementLiteral_.addAll(other.enforcementLiteral_);
2211 }
2212 onChanged();
2213 }
2214 switch (other.getConstraintCase()) {
2215 case BOOL_OR: {
2216 mergeBoolOr(other.getBoolOr());
2217 break;
2218 }
2219 case BOOL_AND: {
2220 mergeBoolAnd(other.getBoolAnd());
2221 break;
2222 }
2223 case AT_MOST_ONE: {
2224 mergeAtMostOne(other.getAtMostOne());
2225 break;
2226 }
2227 case EXACTLY_ONE: {
2228 mergeExactlyOne(other.getExactlyOne());
2229 break;
2230 }
2231 case BOOL_XOR: {
2232 mergeBoolXor(other.getBoolXor());
2233 break;
2234 }
2235 case INT_DIV: {
2236 mergeIntDiv(other.getIntDiv());
2237 break;
2238 }
2239 case INT_MOD: {
2240 mergeIntMod(other.getIntMod());
2241 break;
2242 }
2243 case INT_PROD: {
2244 mergeIntProd(other.getIntProd());
2245 break;
2246 }
2247 case LIN_MAX: {
2248 mergeLinMax(other.getLinMax());
2249 break;
2250 }
2251 case LINEAR: {
2252 mergeLinear(other.getLinear());
2253 break;
2254 }
2255 case ALL_DIFF: {
2256 mergeAllDiff(other.getAllDiff());
2257 break;
2258 }
2259 case ELEMENT: {
2260 mergeElement(other.getElement());
2261 break;
2262 }
2263 case CIRCUIT: {
2264 mergeCircuit(other.getCircuit());
2265 break;
2266 }
2267 case ROUTES: {
2268 mergeRoutes(other.getRoutes());
2269 break;
2270 }
2271 case TABLE: {
2272 mergeTable(other.getTable());
2273 break;
2274 }
2275 case AUTOMATON: {
2276 mergeAutomaton(other.getAutomaton());
2277 break;
2278 }
2279 case INVERSE: {
2280 mergeInverse(other.getInverse());
2281 break;
2282 }
2283 case RESERVOIR: {
2284 mergeReservoir(other.getReservoir());
2285 break;
2286 }
2287 case INTERVAL: {
2288 mergeInterval(other.getInterval());
2289 break;
2290 }
2291 case NO_OVERLAP: {
2292 mergeNoOverlap(other.getNoOverlap());
2293 break;
2294 }
2295 case NO_OVERLAP_2D: {
2296 mergeNoOverlap2D(other.getNoOverlap2D());
2297 break;
2298 }
2299 case CUMULATIVE: {
2300 mergeCumulative(other.getCumulative());
2301 break;
2302 }
2303 case DUMMY_CONSTRAINT: {
2304 mergeDummyConstraint(other.getDummyConstraint());
2305 break;
2306 }
2307 case CONSTRAINT_NOT_SET: {
2308 break;
2309 }
2310 }
2311 this.mergeUnknownFields(other.getUnknownFields());
2312 onChanged();
2313 return this;
2314 }
2315
2316 @java.lang.Override
2317 public final boolean isInitialized() {
2318 return true;
2319 }
2320
2321 @java.lang.Override
2322 public Builder mergeFrom(
2323 com.google.protobuf.CodedInputStream input,
2324 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2325 throws java.io.IOException {
2326 if (extensionRegistry == null) {
2327 throw new java.lang.NullPointerException();
2328 }
2329 try {
2330 boolean done = false;
2331 while (!done) {
2332 int tag = input.readTag();
2333 switch (tag) {
2334 case 0:
2335 done = true;
2336 break;
2337 case 10: {
2338 name_ = input.readStringRequireUtf8();
2339 bitField0_ |= 0x00000001;
2340 break;
2341 } // case 10
2342 case 16: {
2343 int v = input.readInt32();
2344 ensureEnforcementLiteralIsMutable();
2345 enforcementLiteral_.addInt(v);
2346 break;
2347 } // case 16
2348 case 18: {
2349 int length = input.readRawVarint32();
2350 int limit = input.pushLimit(length);
2351 ensureEnforcementLiteralIsMutable();
2352 while (input.getBytesUntilLimit() > 0) {
2353 enforcementLiteral_.addInt(input.readInt32());
2354 }
2355 input.popLimit(limit);
2356 break;
2357 } // case 18
2358 case 26: {
2359 input.readMessage(
2360 internalGetBoolOrFieldBuilder().getBuilder(),
2361 extensionRegistry);
2362 constraintCase_ = 3;
2363 break;
2364 } // case 26
2365 case 34: {
2366 input.readMessage(
2367 internalGetBoolAndFieldBuilder().getBuilder(),
2368 extensionRegistry);
2369 constraintCase_ = 4;
2370 break;
2371 } // case 34
2372 case 42: {
2373 input.readMessage(
2374 internalGetBoolXorFieldBuilder().getBuilder(),
2375 extensionRegistry);
2376 constraintCase_ = 5;
2377 break;
2378 } // case 42
2379 case 58: {
2380 input.readMessage(
2381 internalGetIntDivFieldBuilder().getBuilder(),
2382 extensionRegistry);
2383 constraintCase_ = 7;
2384 break;
2385 } // case 58
2386 case 66: {
2387 input.readMessage(
2388 internalGetIntModFieldBuilder().getBuilder(),
2389 extensionRegistry);
2390 constraintCase_ = 8;
2391 break;
2392 } // case 66
2393 case 90: {
2394 input.readMessage(
2395 internalGetIntProdFieldBuilder().getBuilder(),
2396 extensionRegistry);
2397 constraintCase_ = 11;
2398 break;
2399 } // case 90
2400 case 98: {
2401 input.readMessage(
2402 internalGetLinearFieldBuilder().getBuilder(),
2403 extensionRegistry);
2404 constraintCase_ = 12;
2405 break;
2406 } // case 98
2407 case 106: {
2408 input.readMessage(
2409 internalGetAllDiffFieldBuilder().getBuilder(),
2410 extensionRegistry);
2411 constraintCase_ = 13;
2412 break;
2413 } // case 106
2414 case 114: {
2415 input.readMessage(
2416 internalGetElementFieldBuilder().getBuilder(),
2417 extensionRegistry);
2418 constraintCase_ = 14;
2419 break;
2420 } // case 114
2421 case 122: {
2422 input.readMessage(
2423 internalGetCircuitFieldBuilder().getBuilder(),
2424 extensionRegistry);
2425 constraintCase_ = 15;
2426 break;
2427 } // case 122
2428 case 130: {
2429 input.readMessage(
2430 internalGetTableFieldBuilder().getBuilder(),
2431 extensionRegistry);
2432 constraintCase_ = 16;
2433 break;
2434 } // case 130
2435 case 138: {
2436 input.readMessage(
2437 internalGetAutomatonFieldBuilder().getBuilder(),
2438 extensionRegistry);
2439 constraintCase_ = 17;
2440 break;
2441 } // case 138
2442 case 146: {
2443 input.readMessage(
2444 internalGetInverseFieldBuilder().getBuilder(),
2445 extensionRegistry);
2446 constraintCase_ = 18;
2447 break;
2448 } // case 146
2449 case 154: {
2450 input.readMessage(
2451 internalGetIntervalFieldBuilder().getBuilder(),
2452 extensionRegistry);
2453 constraintCase_ = 19;
2454 break;
2455 } // case 154
2456 case 162: {
2457 input.readMessage(
2458 internalGetNoOverlapFieldBuilder().getBuilder(),
2459 extensionRegistry);
2460 constraintCase_ = 20;
2461 break;
2462 } // case 162
2463 case 170: {
2464 input.readMessage(
2465 internalGetNoOverlap2DFieldBuilder().getBuilder(),
2466 extensionRegistry);
2467 constraintCase_ = 21;
2468 break;
2469 } // case 170
2470 case 178: {
2471 input.readMessage(
2472 internalGetCumulativeFieldBuilder().getBuilder(),
2473 extensionRegistry);
2474 constraintCase_ = 22;
2475 break;
2476 } // case 178
2477 case 186: {
2478 input.readMessage(
2479 internalGetRoutesFieldBuilder().getBuilder(),
2480 extensionRegistry);
2481 constraintCase_ = 23;
2482 break;
2483 } // case 186
2484 case 194: {
2485 input.readMessage(
2486 internalGetReservoirFieldBuilder().getBuilder(),
2487 extensionRegistry);
2488 constraintCase_ = 24;
2489 break;
2490 } // case 194
2491 case 210: {
2492 input.readMessage(
2493 internalGetAtMostOneFieldBuilder().getBuilder(),
2494 extensionRegistry);
2495 constraintCase_ = 26;
2496 break;
2497 } // case 210
2498 case 218: {
2499 input.readMessage(
2500 internalGetLinMaxFieldBuilder().getBuilder(),
2501 extensionRegistry);
2502 constraintCase_ = 27;
2503 break;
2504 } // case 218
2505 case 234: {
2506 input.readMessage(
2507 internalGetExactlyOneFieldBuilder().getBuilder(),
2508 extensionRegistry);
2509 constraintCase_ = 29;
2510 break;
2511 } // case 234
2512 case 242: {
2513 input.readMessage(
2514 internalGetDummyConstraintFieldBuilder().getBuilder(),
2515 extensionRegistry);
2516 constraintCase_ = 30;
2517 break;
2518 } // case 242
2519 default: {
2520 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2521 done = true; // was an endgroup tag
2522 }
2523 break;
2524 } // default:
2525 } // switch (tag)
2526 } // while (!done)
2527 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2528 throw e.unwrapIOException();
2529 } finally {
2530 onChanged();
2531 } // finally
2532 return this;
2533 }
2534 private int constraintCase_ = 0;
2535 private java.lang.Object constraint_;
2536 public ConstraintCase
2539 constraintCase_);
2540 }
2541
2542 public Builder clearConstraint() {
2543 constraintCase_ = 0;
2544 constraint_ = null;
2545 onChanged();
2546 return this;
2547 }
2548
2549 private int bitField0_;
2550
2551 private java.lang.Object name_ = "";
2560 public java.lang.String getName() {
2561 java.lang.Object ref = name_;
2562 if (!(ref instanceof java.lang.String)) {
2563 com.google.protobuf.ByteString bs =
2564 (com.google.protobuf.ByteString) ref;
2565 java.lang.String s = bs.toStringUtf8();
2566 name_ = s;
2567 return s;
2568 } else {
2569 return (java.lang.String) ref;
2570 }
2571 }
2572
2580 public com.google.protobuf.ByteString
2582 java.lang.Object ref = name_;
2583 if (ref instanceof String) {
2584 com.google.protobuf.ByteString b =
2585 com.google.protobuf.ByteString.copyFromUtf8(
2586 (java.lang.String) ref);
2587 name_ = b;
2588 return b;
2589 } else {
2590 return (com.google.protobuf.ByteString) ref;
2591 }
2592 }
2593
2602 public Builder setName(
2603 java.lang.String value) {
2604 if (value == null) { throw new NullPointerException(); }
2605 name_ = value;
2606 bitField0_ |= 0x00000001;
2607 onChanged();
2608 return this;
2609 }
2610
2618 public Builder clearName() {
2619 name_ = getDefaultInstance().getName();
2620 bitField0_ = (bitField0_ & ~0x00000001);
2621 onChanged();
2622 return this;
2623 }
2624
2633 public Builder setNameBytes(
2634 com.google.protobuf.ByteString value) {
2635 if (value == null) { throw new NullPointerException(); }
2636 checkByteStringIsUtf8(value);
2637 name_ = value;
2638 bitField0_ |= 0x00000001;
2639 onChanged();
2640 return this;
2641 }
2642
2643 private com.google.protobuf.Internal.IntList enforcementLiteral_ = emptyIntList();
2644 private void ensureEnforcementLiteralIsMutable() {
2645 if (!enforcementLiteral_.isModifiable()) {
2646 enforcementLiteral_ = makeMutableCopy(enforcementLiteral_);
2647 }
2648 bitField0_ |= 0x00000002;
2649 }
2671 public java.util.List<java.lang.Integer>
2673 enforcementLiteral_.makeImmutable();
2674 return enforcementLiteral_;
2675 }
2676
2698 return enforcementLiteral_.size();
2699 }
2700
2722 public int getEnforcementLiteral(int index) {
2723 return enforcementLiteral_.getInt(index);
2724 }
2725
2749 int index, int value) {
2750
2751 ensureEnforcementLiteralIsMutable();
2752 enforcementLiteral_.setInt(index, value);
2753 bitField0_ |= 0x00000002;
2754 onChanged();
2755 return this;
2756 }
2757
2779 public Builder addEnforcementLiteral(int value) {
2780
2781 ensureEnforcementLiteralIsMutable();
2782 enforcementLiteral_.addInt(value);
2783 bitField0_ |= 0x00000002;
2784 onChanged();
2785 return this;
2786 }
2787
2810 java.lang.Iterable<? extends java.lang.Integer> values) {
2811 ensureEnforcementLiteralIsMutable();
2812 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2813 values, enforcementLiteral_);
2814 bitField0_ |= 0x00000002;
2815 onChanged();
2816 return this;
2817 }
2818
2839 public Builder clearEnforcementLiteral() {
2840 enforcementLiteral_ = emptyIntList();
2841 bitField0_ = (bitField0_ & ~0x00000002);
2842 onChanged();
2843 return this;
2844 }
2845
2846 private com.google.protobuf.SingleFieldBuilder<
2847 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolOrBuilder_;
2856 @java.lang.Override
2857 public boolean hasBoolOr() {
2858 return constraintCase_ == 3;
2859 }
2860
2868 @java.lang.Override
2870 if (boolOrBuilder_ == null) {
2871 if (constraintCase_ == 3) {
2872 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
2873 }
2874 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
2875 } else {
2876 if (constraintCase_ == 3) {
2877 return boolOrBuilder_.getMessage();
2878 }
2879 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
2880 }
2881 }
2882
2889 public Builder setBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
2890 if (boolOrBuilder_ == null) {
2891 if (value == null) {
2892 throw new NullPointerException();
2893 }
2894 constraint_ = value;
2895 onChanged();
2896 } else {
2897 boolOrBuilder_.setMessage(value);
2898 }
2899 constraintCase_ = 3;
2900 return this;
2901 }
2902
2909 public Builder setBoolOr(
2910 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
2911 if (boolOrBuilder_ == null) {
2912 constraint_ = builderForValue.build();
2913 onChanged();
2914 } else {
2915 boolOrBuilder_.setMessage(builderForValue.build());
2916 }
2917 constraintCase_ = 3;
2918 return this;
2919 }
2920
2927 public Builder mergeBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
2928 if (boolOrBuilder_ == null) {
2929 if (constraintCase_ == 3 &&
2930 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
2931 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
2932 .mergeFrom(value).buildPartial();
2933 } else {
2934 constraint_ = value;
2935 }
2936 onChanged();
2937 } else {
2938 if (constraintCase_ == 3) {
2939 boolOrBuilder_.mergeFrom(value);
2940 } else {
2941 boolOrBuilder_.setMessage(value);
2942 }
2943 }
2944 constraintCase_ = 3;
2945 return this;
2946 }
2947
2954 public Builder clearBoolOr() {
2955 if (boolOrBuilder_ == null) {
2956 if (constraintCase_ == 3) {
2957 constraintCase_ = 0;
2958 constraint_ = null;
2959 onChanged();
2960 }
2961 } else {
2962 if (constraintCase_ == 3) {
2963 constraintCase_ = 0;
2964 constraint_ = null;
2965 }
2966 boolOrBuilder_.clear();
2967 }
2968 return this;
2969 }
2970
2978 return internalGetBoolOrFieldBuilder().getBuilder();
2979 }
2980
2987 @java.lang.Override
2989 if ((constraintCase_ == 3) && (boolOrBuilder_ != null)) {
2990 return boolOrBuilder_.getMessageOrBuilder();
2991 } else {
2992 if (constraintCase_ == 3) {
2993 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
2994 }
2995 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
2996 }
2997 }
2998
3005 private com.google.protobuf.SingleFieldBuilder<
3006 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3007 internalGetBoolOrFieldBuilder() {
3008 if (boolOrBuilder_ == null) {
3009 if (!(constraintCase_ == 3)) {
3010 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3011 }
3012 boolOrBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3013 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3014 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3015 getParentForChildren(),
3016 isClean());
3017 constraint_ = null;
3018 }
3019 constraintCase_ = 3;
3020 onChanged();
3021 return boolOrBuilder_;
3022 }
3023
3024 private com.google.protobuf.SingleFieldBuilder<
3025 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolAndBuilder_;
3038 @java.lang.Override
3039 public boolean hasBoolAnd() {
3040 return constraintCase_ == 4;
3041 }
3042
3054 @java.lang.Override
3056 if (boolAndBuilder_ == null) {
3057 if (constraintCase_ == 4) {
3058 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3059 }
3060 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3061 } else {
3062 if (constraintCase_ == 4) {
3063 return boolAndBuilder_.getMessage();
3064 }
3065 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3066 }
3067 }
3068
3079 public Builder setBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
3080 if (boolAndBuilder_ == null) {
3081 if (value == null) {
3082 throw new NullPointerException();
3083 }
3084 constraint_ = value;
3085 onChanged();
3086 } else {
3087 boolAndBuilder_.setMessage(value);
3088 }
3089 constraintCase_ = 4;
3090 return this;
3091 }
3092
3103 public Builder setBoolAnd(
3104 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3105 if (boolAndBuilder_ == null) {
3106 constraint_ = builderForValue.build();
3107 onChanged();
3108 } else {
3109 boolAndBuilder_.setMessage(builderForValue.build());
3110 }
3111 constraintCase_ = 4;
3112 return this;
3113 }
3114
3125 public Builder mergeBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
3126 if (boolAndBuilder_ == null) {
3127 if (constraintCase_ == 4 &&
3128 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3129 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3130 .mergeFrom(value).buildPartial();
3131 } else {
3132 constraint_ = value;
3133 }
3134 onChanged();
3135 } else {
3136 if (constraintCase_ == 4) {
3137 boolAndBuilder_.mergeFrom(value);
3138 } else {
3139 boolAndBuilder_.setMessage(value);
3140 }
3141 }
3142 constraintCase_ = 4;
3143 return this;
3144 }
3145
3156 public Builder clearBoolAnd() {
3157 if (boolAndBuilder_ == null) {
3158 if (constraintCase_ == 4) {
3159 constraintCase_ = 0;
3160 constraint_ = null;
3161 onChanged();
3162 }
3163 } else {
3164 if (constraintCase_ == 4) {
3165 constraintCase_ = 0;
3166 constraint_ = null;
3167 }
3168 boolAndBuilder_.clear();
3169 }
3170 return this;
3171 }
3172
3184 return internalGetBoolAndFieldBuilder().getBuilder();
3185 }
3186
3197 @java.lang.Override
3199 if ((constraintCase_ == 4) && (boolAndBuilder_ != null)) {
3200 return boolAndBuilder_.getMessageOrBuilder();
3201 } else {
3202 if (constraintCase_ == 4) {
3203 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3204 }
3205 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3206 }
3207 }
3208
3219 private com.google.protobuf.SingleFieldBuilder<
3220 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3221 internalGetBoolAndFieldBuilder() {
3222 if (boolAndBuilder_ == null) {
3223 if (!(constraintCase_ == 4)) {
3224 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3225 }
3226 boolAndBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3227 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3228 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3229 getParentForChildren(),
3230 isClean());
3231 constraint_ = null;
3232 }
3233 constraintCase_ = 4;
3234 onChanged();
3235 return boolAndBuilder_;
3236 }
3237
3238 private com.google.protobuf.SingleFieldBuilder<
3239 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> atMostOneBuilder_;
3254 @java.lang.Override
3255 public boolean hasAtMostOne() {
3256 return constraintCase_ == 26;
3257 }
3258
3272 @java.lang.Override
3274 if (atMostOneBuilder_ == null) {
3275 if (constraintCase_ == 26) {
3276 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3277 }
3278 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3279 } else {
3280 if (constraintCase_ == 26) {
3281 return atMostOneBuilder_.getMessage();
3282 }
3283 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3284 }
3285 }
3286
3299 public Builder setAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
3300 if (atMostOneBuilder_ == null) {
3301 if (value == null) {
3302 throw new NullPointerException();
3303 }
3304 constraint_ = value;
3305 onChanged();
3306 } else {
3307 atMostOneBuilder_.setMessage(value);
3308 }
3309 constraintCase_ = 26;
3310 return this;
3311 }
3312
3325 public Builder setAtMostOne(
3326 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3327 if (atMostOneBuilder_ == null) {
3328 constraint_ = builderForValue.build();
3329 onChanged();
3330 } else {
3331 atMostOneBuilder_.setMessage(builderForValue.build());
3332 }
3333 constraintCase_ = 26;
3334 return this;
3335 }
3336
3349 public Builder mergeAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
3350 if (atMostOneBuilder_ == null) {
3351 if (constraintCase_ == 26 &&
3352 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3353 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3354 .mergeFrom(value).buildPartial();
3355 } else {
3356 constraint_ = value;
3357 }
3358 onChanged();
3359 } else {
3360 if (constraintCase_ == 26) {
3361 atMostOneBuilder_.mergeFrom(value);
3362 } else {
3363 atMostOneBuilder_.setMessage(value);
3364 }
3365 }
3366 constraintCase_ = 26;
3367 return this;
3368 }
3369
3382 public Builder clearAtMostOne() {
3383 if (atMostOneBuilder_ == null) {
3384 if (constraintCase_ == 26) {
3385 constraintCase_ = 0;
3386 constraint_ = null;
3387 onChanged();
3388 }
3389 } else {
3390 if (constraintCase_ == 26) {
3391 constraintCase_ = 0;
3392 constraint_ = null;
3393 }
3394 atMostOneBuilder_.clear();
3395 }
3396 return this;
3397 }
3398
3412 return internalGetAtMostOneFieldBuilder().getBuilder();
3413 }
3414
3427 @java.lang.Override
3429 if ((constraintCase_ == 26) && (atMostOneBuilder_ != null)) {
3430 return atMostOneBuilder_.getMessageOrBuilder();
3431 } else {
3432 if (constraintCase_ == 26) {
3433 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3434 }
3435 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3436 }
3437 }
3438
3451 private com.google.protobuf.SingleFieldBuilder<
3452 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3453 internalGetAtMostOneFieldBuilder() {
3454 if (atMostOneBuilder_ == null) {
3455 if (!(constraintCase_ == 26)) {
3456 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3457 }
3458 atMostOneBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3459 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3460 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3461 getParentForChildren(),
3462 isClean());
3463 constraint_ = null;
3464 }
3465 constraintCase_ = 26;
3466 onChanged();
3467 return atMostOneBuilder_;
3468 }
3469
3470 private com.google.protobuf.SingleFieldBuilder<
3471 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> exactlyOneBuilder_;
3487 @java.lang.Override
3488 public boolean hasExactlyOne() {
3489 return constraintCase_ == 29;
3490 }
3491
3506 @java.lang.Override
3508 if (exactlyOneBuilder_ == null) {
3509 if (constraintCase_ == 29) {
3510 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3511 }
3512 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3513 } else {
3514 if (constraintCase_ == 29) {
3515 return exactlyOneBuilder_.getMessage();
3516 }
3517 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3518 }
3519 }
3520
3534 public Builder setExactlyOne(com.google.ortools.sat.BoolArgumentProto value) {
3535 if (exactlyOneBuilder_ == null) {
3536 if (value == null) {
3537 throw new NullPointerException();
3538 }
3539 constraint_ = value;
3540 onChanged();
3541 } else {
3542 exactlyOneBuilder_.setMessage(value);
3543 }
3544 constraintCase_ = 29;
3545 return this;
3546 }
3547
3561 public Builder setExactlyOne(
3562 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3563 if (exactlyOneBuilder_ == null) {
3564 constraint_ = builderForValue.build();
3565 onChanged();
3566 } else {
3567 exactlyOneBuilder_.setMessage(builderForValue.build());
3568 }
3569 constraintCase_ = 29;
3570 return this;
3571 }
3572
3586 public Builder mergeExactlyOne(com.google.ortools.sat.BoolArgumentProto value) {
3587 if (exactlyOneBuilder_ == null) {
3588 if (constraintCase_ == 29 &&
3589 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3590 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3591 .mergeFrom(value).buildPartial();
3592 } else {
3593 constraint_ = value;
3594 }
3595 onChanged();
3596 } else {
3597 if (constraintCase_ == 29) {
3598 exactlyOneBuilder_.mergeFrom(value);
3599 } else {
3600 exactlyOneBuilder_.setMessage(value);
3601 }
3602 }
3603 constraintCase_ = 29;
3604 return this;
3605 }
3606
3620 public Builder clearExactlyOne() {
3621 if (exactlyOneBuilder_ == null) {
3622 if (constraintCase_ == 29) {
3623 constraintCase_ = 0;
3624 constraint_ = null;
3625 onChanged();
3626 }
3627 } else {
3628 if (constraintCase_ == 29) {
3629 constraintCase_ = 0;
3630 constraint_ = null;
3631 }
3632 exactlyOneBuilder_.clear();
3633 }
3634 return this;
3635 }
3636
3651 return internalGetExactlyOneFieldBuilder().getBuilder();
3652 }
3653
3667 @java.lang.Override
3669 if ((constraintCase_ == 29) && (exactlyOneBuilder_ != null)) {
3670 return exactlyOneBuilder_.getMessageOrBuilder();
3671 } else {
3672 if (constraintCase_ == 29) {
3673 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3674 }
3675 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3676 }
3677 }
3678
3692 private com.google.protobuf.SingleFieldBuilder<
3693 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3694 internalGetExactlyOneFieldBuilder() {
3695 if (exactlyOneBuilder_ == null) {
3696 if (!(constraintCase_ == 29)) {
3697 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3698 }
3699 exactlyOneBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3700 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3701 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3702 getParentForChildren(),
3703 isClean());
3704 constraint_ = null;
3705 }
3706 constraintCase_ = 29;
3707 onChanged();
3708 return exactlyOneBuilder_;
3709 }
3710
3711 private com.google.protobuf.SingleFieldBuilder<
3712 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolXorBuilder_;
3721 @java.lang.Override
3722 public boolean hasBoolXor() {
3723 return constraintCase_ == 5;
3724 }
3725
3733 @java.lang.Override
3735 if (boolXorBuilder_ == null) {
3736 if (constraintCase_ == 5) {
3737 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3738 }
3739 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3740 } else {
3741 if (constraintCase_ == 5) {
3742 return boolXorBuilder_.getMessage();
3743 }
3744 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3745 }
3746 }
3747
3754 public Builder setBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
3755 if (boolXorBuilder_ == null) {
3756 if (value == null) {
3757 throw new NullPointerException();
3758 }
3759 constraint_ = value;
3760 onChanged();
3761 } else {
3762 boolXorBuilder_.setMessage(value);
3763 }
3764 constraintCase_ = 5;
3765 return this;
3766 }
3767
3774 public Builder setBoolXor(
3775 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3776 if (boolXorBuilder_ == null) {
3777 constraint_ = builderForValue.build();
3778 onChanged();
3779 } else {
3780 boolXorBuilder_.setMessage(builderForValue.build());
3781 }
3782 constraintCase_ = 5;
3783 return this;
3784 }
3785
3792 public Builder mergeBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
3793 if (boolXorBuilder_ == null) {
3794 if (constraintCase_ == 5 &&
3795 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3796 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3797 .mergeFrom(value).buildPartial();
3798 } else {
3799 constraint_ = value;
3800 }
3801 onChanged();
3802 } else {
3803 if (constraintCase_ == 5) {
3804 boolXorBuilder_.mergeFrom(value);
3805 } else {
3806 boolXorBuilder_.setMessage(value);
3807 }
3808 }
3809 constraintCase_ = 5;
3810 return this;
3811 }
3812
3819 public Builder clearBoolXor() {
3820 if (boolXorBuilder_ == null) {
3821 if (constraintCase_ == 5) {
3822 constraintCase_ = 0;
3823 constraint_ = null;
3824 onChanged();
3825 }
3826 } else {
3827 if (constraintCase_ == 5) {
3828 constraintCase_ = 0;
3829 constraint_ = null;
3830 }
3831 boolXorBuilder_.clear();
3832 }
3833 return this;
3834 }
3835
3843 return internalGetBoolXorFieldBuilder().getBuilder();
3844 }
3845
3852 @java.lang.Override
3854 if ((constraintCase_ == 5) && (boolXorBuilder_ != null)) {
3855 return boolXorBuilder_.getMessageOrBuilder();
3856 } else {
3857 if (constraintCase_ == 5) {
3858 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3859 }
3860 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3861 }
3862 }
3863
3870 private com.google.protobuf.SingleFieldBuilder<
3871 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3872 internalGetBoolXorFieldBuilder() {
3873 if (boolXorBuilder_ == null) {
3874 if (!(constraintCase_ == 5)) {
3875 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3876 }
3877 boolXorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3878 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3879 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3880 getParentForChildren(),
3881 isClean());
3882 constraint_ = null;
3883 }
3884 constraintCase_ = 5;
3885 onChanged();
3886 return boolXorBuilder_;
3887 }
3888
3889 private com.google.protobuf.SingleFieldBuilder<
3890 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intDivBuilder_;
3905 @java.lang.Override
3906 public boolean hasIntDiv() {
3907 return constraintCase_ == 7;
3908 }
3909
3923 @java.lang.Override
3925 if (intDivBuilder_ == null) {
3926 if (constraintCase_ == 7) {
3927 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
3928 }
3929 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
3930 } else {
3931 if (constraintCase_ == 7) {
3932 return intDivBuilder_.getMessage();
3933 }
3934 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
3935 }
3936 }
3937
3950 public Builder setIntDiv(com.google.ortools.sat.LinearArgumentProto value) {
3951 if (intDivBuilder_ == null) {
3952 if (value == null) {
3953 throw new NullPointerException();
3954 }
3955 constraint_ = value;
3956 onChanged();
3957 } else {
3958 intDivBuilder_.setMessage(value);
3959 }
3960 constraintCase_ = 7;
3961 return this;
3962 }
3963
3976 public Builder setIntDiv(
3977 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
3978 if (intDivBuilder_ == null) {
3979 constraint_ = builderForValue.build();
3980 onChanged();
3981 } else {
3982 intDivBuilder_.setMessage(builderForValue.build());
3983 }
3984 constraintCase_ = 7;
3985 return this;
3986 }
3987
4000 public Builder mergeIntDiv(com.google.ortools.sat.LinearArgumentProto value) {
4001 if (intDivBuilder_ == null) {
4002 if (constraintCase_ == 7 &&
4003 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4004 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4005 .mergeFrom(value).buildPartial();
4006 } else {
4007 constraint_ = value;
4008 }
4009 onChanged();
4010 } else {
4011 if (constraintCase_ == 7) {
4012 intDivBuilder_.mergeFrom(value);
4013 } else {
4014 intDivBuilder_.setMessage(value);
4015 }
4016 }
4017 constraintCase_ = 7;
4018 return this;
4019 }
4020
4033 public Builder clearIntDiv() {
4034 if (intDivBuilder_ == null) {
4035 if (constraintCase_ == 7) {
4036 constraintCase_ = 0;
4037 constraint_ = null;
4038 onChanged();
4039 }
4040 } else {
4041 if (constraintCase_ == 7) {
4042 constraintCase_ = 0;
4043 constraint_ = null;
4044 }
4045 intDivBuilder_.clear();
4046 }
4047 return this;
4048 }
4049
4063 return internalGetIntDivFieldBuilder().getBuilder();
4064 }
4065
4078 @java.lang.Override
4080 if ((constraintCase_ == 7) && (intDivBuilder_ != null)) {
4081 return intDivBuilder_.getMessageOrBuilder();
4082 } else {
4083 if (constraintCase_ == 7) {
4084 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4085 }
4086 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4087 }
4088 }
4089
4102 private com.google.protobuf.SingleFieldBuilder<
4103 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4104 internalGetIntDivFieldBuilder() {
4105 if (intDivBuilder_ == null) {
4106 if (!(constraintCase_ == 7)) {
4107 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4108 }
4109 intDivBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4110 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4111 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4112 getParentForChildren(),
4113 isClean());
4114 constraint_ = null;
4115 }
4116 constraintCase_ = 7;
4117 onChanged();
4118 return intDivBuilder_;
4119 }
4120
4121 private com.google.protobuf.SingleFieldBuilder<
4122 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intModBuilder_;
4133 @java.lang.Override
4134 public boolean hasIntMod() {
4135 return constraintCase_ == 8;
4136 }
4137
4147 @java.lang.Override
4149 if (intModBuilder_ == null) {
4150 if (constraintCase_ == 8) {
4151 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4152 }
4153 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4154 } else {
4155 if (constraintCase_ == 8) {
4156 return intModBuilder_.getMessage();
4157 }
4158 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4159 }
4160 }
4161
4170 public Builder setIntMod(com.google.ortools.sat.LinearArgumentProto value) {
4171 if (intModBuilder_ == null) {
4172 if (value == null) {
4173 throw new NullPointerException();
4174 }
4175 constraint_ = value;
4176 onChanged();
4177 } else {
4178 intModBuilder_.setMessage(value);
4179 }
4180 constraintCase_ = 8;
4181 return this;
4182 }
4183
4192 public Builder setIntMod(
4193 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4194 if (intModBuilder_ == null) {
4195 constraint_ = builderForValue.build();
4196 onChanged();
4197 } else {
4198 intModBuilder_.setMessage(builderForValue.build());
4199 }
4200 constraintCase_ = 8;
4201 return this;
4202 }
4203
4212 public Builder mergeIntMod(com.google.ortools.sat.LinearArgumentProto value) {
4213 if (intModBuilder_ == null) {
4214 if (constraintCase_ == 8 &&
4215 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4216 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4217 .mergeFrom(value).buildPartial();
4218 } else {
4219 constraint_ = value;
4220 }
4221 onChanged();
4222 } else {
4223 if (constraintCase_ == 8) {
4224 intModBuilder_.mergeFrom(value);
4225 } else {
4226 intModBuilder_.setMessage(value);
4227 }
4228 }
4229 constraintCase_ = 8;
4230 return this;
4231 }
4232
4241 public Builder clearIntMod() {
4242 if (intModBuilder_ == null) {
4243 if (constraintCase_ == 8) {
4244 constraintCase_ = 0;
4245 constraint_ = null;
4246 onChanged();
4247 }
4248 } else {
4249 if (constraintCase_ == 8) {
4250 constraintCase_ = 0;
4251 constraint_ = null;
4252 }
4253 intModBuilder_.clear();
4254 }
4255 return this;
4256 }
4257
4267 return internalGetIntModFieldBuilder().getBuilder();
4268 }
4269
4278 @java.lang.Override
4280 if ((constraintCase_ == 8) && (intModBuilder_ != null)) {
4281 return intModBuilder_.getMessageOrBuilder();
4282 } else {
4283 if (constraintCase_ == 8) {
4284 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4285 }
4286 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4287 }
4288 }
4289
4298 private com.google.protobuf.SingleFieldBuilder<
4299 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4300 internalGetIntModFieldBuilder() {
4301 if (intModBuilder_ == null) {
4302 if (!(constraintCase_ == 8)) {
4303 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4304 }
4305 intModBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4306 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4307 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4308 getParentForChildren(),
4309 isClean());
4310 constraint_ = null;
4311 }
4312 constraintCase_ = 8;
4313 onChanged();
4314 return intModBuilder_;
4315 }
4316
4317 private com.google.protobuf.SingleFieldBuilder<
4318 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intProdBuilder_;
4334 @java.lang.Override
4335 public boolean hasIntProd() {
4336 return constraintCase_ == 11;
4337 }
4338
4353 @java.lang.Override
4355 if (intProdBuilder_ == null) {
4356 if (constraintCase_ == 11) {
4357 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4358 }
4359 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4360 } else {
4361 if (constraintCase_ == 11) {
4362 return intProdBuilder_.getMessage();
4363 }
4364 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4365 }
4366 }
4367
4381 public Builder setIntProd(com.google.ortools.sat.LinearArgumentProto value) {
4382 if (intProdBuilder_ == null) {
4383 if (value == null) {
4384 throw new NullPointerException();
4385 }
4386 constraint_ = value;
4387 onChanged();
4388 } else {
4389 intProdBuilder_.setMessage(value);
4390 }
4391 constraintCase_ = 11;
4392 return this;
4393 }
4394
4408 public Builder setIntProd(
4409 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4410 if (intProdBuilder_ == null) {
4411 constraint_ = builderForValue.build();
4412 onChanged();
4413 } else {
4414 intProdBuilder_.setMessage(builderForValue.build());
4415 }
4416 constraintCase_ = 11;
4417 return this;
4418 }
4419
4433 public Builder mergeIntProd(com.google.ortools.sat.LinearArgumentProto value) {
4434 if (intProdBuilder_ == null) {
4435 if (constraintCase_ == 11 &&
4436 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4437 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4438 .mergeFrom(value).buildPartial();
4439 } else {
4440 constraint_ = value;
4441 }
4442 onChanged();
4443 } else {
4444 if (constraintCase_ == 11) {
4445 intProdBuilder_.mergeFrom(value);
4446 } else {
4447 intProdBuilder_.setMessage(value);
4448 }
4449 }
4450 constraintCase_ = 11;
4451 return this;
4452 }
4453
4467 public Builder clearIntProd() {
4468 if (intProdBuilder_ == null) {
4469 if (constraintCase_ == 11) {
4470 constraintCase_ = 0;
4471 constraint_ = null;
4472 onChanged();
4473 }
4474 } else {
4475 if (constraintCase_ == 11) {
4476 constraintCase_ = 0;
4477 constraint_ = null;
4478 }
4479 intProdBuilder_.clear();
4480 }
4481 return this;
4482 }
4483
4498 return internalGetIntProdFieldBuilder().getBuilder();
4499 }
4500
4514 @java.lang.Override
4516 if ((constraintCase_ == 11) && (intProdBuilder_ != null)) {
4517 return intProdBuilder_.getMessageOrBuilder();
4518 } else {
4519 if (constraintCase_ == 11) {
4520 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4521 }
4522 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4523 }
4524 }
4525
4539 private com.google.protobuf.SingleFieldBuilder<
4540 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4541 internalGetIntProdFieldBuilder() {
4542 if (intProdBuilder_ == null) {
4543 if (!(constraintCase_ == 11)) {
4544 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4545 }
4546 intProdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4547 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4548 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4549 getParentForChildren(),
4550 isClean());
4551 constraint_ = null;
4552 }
4553 constraintCase_ = 11;
4554 onChanged();
4555 return intProdBuilder_;
4556 }
4557
4558 private com.google.protobuf.SingleFieldBuilder<
4559 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> linMaxBuilder_;
4570 @java.lang.Override
4571 public boolean hasLinMax() {
4572 return constraintCase_ == 27;
4573 }
4574
4584 @java.lang.Override
4586 if (linMaxBuilder_ == null) {
4587 if (constraintCase_ == 27) {
4588 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4589 }
4590 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4591 } else {
4592 if (constraintCase_ == 27) {
4593 return linMaxBuilder_.getMessage();
4594 }
4595 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4596 }
4597 }
4598
4607 public Builder setLinMax(com.google.ortools.sat.LinearArgumentProto value) {
4608 if (linMaxBuilder_ == null) {
4609 if (value == null) {
4610 throw new NullPointerException();
4611 }
4612 constraint_ = value;
4613 onChanged();
4614 } else {
4615 linMaxBuilder_.setMessage(value);
4616 }
4617 constraintCase_ = 27;
4618 return this;
4619 }
4620
4629 public Builder setLinMax(
4630 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4631 if (linMaxBuilder_ == null) {
4632 constraint_ = builderForValue.build();
4633 onChanged();
4634 } else {
4635 linMaxBuilder_.setMessage(builderForValue.build());
4636 }
4637 constraintCase_ = 27;
4638 return this;
4639 }
4640
4649 public Builder mergeLinMax(com.google.ortools.sat.LinearArgumentProto value) {
4650 if (linMaxBuilder_ == null) {
4651 if (constraintCase_ == 27 &&
4652 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4653 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4654 .mergeFrom(value).buildPartial();
4655 } else {
4656 constraint_ = value;
4657 }
4658 onChanged();
4659 } else {
4660 if (constraintCase_ == 27) {
4661 linMaxBuilder_.mergeFrom(value);
4662 } else {
4663 linMaxBuilder_.setMessage(value);
4664 }
4665 }
4666 constraintCase_ = 27;
4667 return this;
4668 }
4669
4678 public Builder clearLinMax() {
4679 if (linMaxBuilder_ == null) {
4680 if (constraintCase_ == 27) {
4681 constraintCase_ = 0;
4682 constraint_ = null;
4683 onChanged();
4684 }
4685 } else {
4686 if (constraintCase_ == 27) {
4687 constraintCase_ = 0;
4688 constraint_ = null;
4689 }
4690 linMaxBuilder_.clear();
4691 }
4692 return this;
4693 }
4694
4704 return internalGetLinMaxFieldBuilder().getBuilder();
4705 }
4706
4715 @java.lang.Override
4717 if ((constraintCase_ == 27) && (linMaxBuilder_ != null)) {
4718 return linMaxBuilder_.getMessageOrBuilder();
4719 } else {
4720 if (constraintCase_ == 27) {
4721 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4722 }
4723 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4724 }
4725 }
4726
4735 private com.google.protobuf.SingleFieldBuilder<
4736 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4737 internalGetLinMaxFieldBuilder() {
4738 if (linMaxBuilder_ == null) {
4739 if (!(constraintCase_ == 27)) {
4740 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4741 }
4742 linMaxBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4743 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4744 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4745 getParentForChildren(),
4746 isClean());
4747 constraint_ = null;
4748 }
4749 constraintCase_ = 27;
4750 onChanged();
4751 return linMaxBuilder_;
4752 }
4753
4754 private com.google.protobuf.SingleFieldBuilder<
4755 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder> linearBuilder_;
4765 @java.lang.Override
4766 public boolean hasLinear() {
4767 return constraintCase_ == 12;
4768 }
4769
4778 @java.lang.Override
4780 if (linearBuilder_ == null) {
4781 if (constraintCase_ == 12) {
4782 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
4783 }
4784 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4785 } else {
4786 if (constraintCase_ == 12) {
4787 return linearBuilder_.getMessage();
4788 }
4789 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4790 }
4791 }
4792
4800 public Builder setLinear(com.google.ortools.sat.LinearConstraintProto value) {
4801 if (linearBuilder_ == null) {
4802 if (value == null) {
4803 throw new NullPointerException();
4804 }
4805 constraint_ = value;
4806 onChanged();
4807 } else {
4808 linearBuilder_.setMessage(value);
4809 }
4810 constraintCase_ = 12;
4811 return this;
4812 }
4813
4821 public Builder setLinear(
4822 com.google.ortools.sat.LinearConstraintProto.Builder builderForValue) {
4823 if (linearBuilder_ == null) {
4824 constraint_ = builderForValue.build();
4825 onChanged();
4826 } else {
4827 linearBuilder_.setMessage(builderForValue.build());
4828 }
4829 constraintCase_ = 12;
4830 return this;
4831 }
4832
4840 public Builder mergeLinear(com.google.ortools.sat.LinearConstraintProto value) {
4841 if (linearBuilder_ == null) {
4842 if (constraintCase_ == 12 &&
4843 constraint_ != com.google.ortools.sat.LinearConstraintProto.getDefaultInstance()) {
4844 constraint_ = com.google.ortools.sat.LinearConstraintProto.newBuilder((com.google.ortools.sat.LinearConstraintProto) constraint_)
4845 .mergeFrom(value).buildPartial();
4846 } else {
4847 constraint_ = value;
4848 }
4849 onChanged();
4850 } else {
4851 if (constraintCase_ == 12) {
4852 linearBuilder_.mergeFrom(value);
4853 } else {
4854 linearBuilder_.setMessage(value);
4855 }
4856 }
4857 constraintCase_ = 12;
4858 return this;
4859 }
4860
4868 public Builder clearLinear() {
4869 if (linearBuilder_ == null) {
4870 if (constraintCase_ == 12) {
4871 constraintCase_ = 0;
4872 constraint_ = null;
4873 onChanged();
4874 }
4875 } else {
4876 if (constraintCase_ == 12) {
4877 constraintCase_ = 0;
4878 constraint_ = null;
4879 }
4880 linearBuilder_.clear();
4881 }
4882 return this;
4883 }
4884
4893 return internalGetLinearFieldBuilder().getBuilder();
4894 }
4895
4903 @java.lang.Override
4905 if ((constraintCase_ == 12) && (linearBuilder_ != null)) {
4906 return linearBuilder_.getMessageOrBuilder();
4907 } else {
4908 if (constraintCase_ == 12) {
4909 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
4910 }
4911 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4912 }
4913 }
4914
4922 private com.google.protobuf.SingleFieldBuilder<
4923 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>
4924 internalGetLinearFieldBuilder() {
4925 if (linearBuilder_ == null) {
4926 if (!(constraintCase_ == 12)) {
4927 constraint_ = com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4928 }
4929 linearBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4930 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>(
4931 (com.google.ortools.sat.LinearConstraintProto) constraint_,
4932 getParentForChildren(),
4933 isClean());
4934 constraint_ = null;
4935 }
4936 constraintCase_ = 12;
4937 onChanged();
4938 return linearBuilder_;
4939 }
4940
4941 private com.google.protobuf.SingleFieldBuilder<
4942 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder> allDiffBuilder_;
4951 @java.lang.Override
4952 public boolean hasAllDiff() {
4953 return constraintCase_ == 13;
4954 }
4955
4963 @java.lang.Override
4965 if (allDiffBuilder_ == null) {
4966 if (constraintCase_ == 13) {
4967 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
4968 }
4969 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
4970 } else {
4971 if (constraintCase_ == 13) {
4972 return allDiffBuilder_.getMessage();
4973 }
4974 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
4975 }
4976 }
4977
4984 public Builder setAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
4985 if (allDiffBuilder_ == null) {
4986 if (value == null) {
4987 throw new NullPointerException();
4988 }
4989 constraint_ = value;
4990 onChanged();
4991 } else {
4992 allDiffBuilder_.setMessage(value);
4993 }
4994 constraintCase_ = 13;
4995 return this;
4996 }
4997
5004 public Builder setAllDiff(
5005 com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue) {
5006 if (allDiffBuilder_ == null) {
5007 constraint_ = builderForValue.build();
5008 onChanged();
5009 } else {
5010 allDiffBuilder_.setMessage(builderForValue.build());
5011 }
5012 constraintCase_ = 13;
5013 return this;
5014 }
5015
5022 public Builder mergeAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
5023 if (allDiffBuilder_ == null) {
5024 if (constraintCase_ == 13 &&
5025 constraint_ != com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance()) {
5026 constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.newBuilder((com.google.ortools.sat.AllDifferentConstraintProto) constraint_)
5027 .mergeFrom(value).buildPartial();
5028 } else {
5029 constraint_ = value;
5030 }
5031 onChanged();
5032 } else {
5033 if (constraintCase_ == 13) {
5034 allDiffBuilder_.mergeFrom(value);
5035 } else {
5036 allDiffBuilder_.setMessage(value);
5037 }
5038 }
5039 constraintCase_ = 13;
5040 return this;
5041 }
5042
5049 public Builder clearAllDiff() {
5050 if (allDiffBuilder_ == null) {
5051 if (constraintCase_ == 13) {
5052 constraintCase_ = 0;
5053 constraint_ = null;
5054 onChanged();
5055 }
5056 } else {
5057 if (constraintCase_ == 13) {
5058 constraintCase_ = 0;
5059 constraint_ = null;
5060 }
5061 allDiffBuilder_.clear();
5062 }
5063 return this;
5064 }
5065
5073 return internalGetAllDiffFieldBuilder().getBuilder();
5074 }
5075
5082 @java.lang.Override
5084 if ((constraintCase_ == 13) && (allDiffBuilder_ != null)) {
5085 return allDiffBuilder_.getMessageOrBuilder();
5086 } else {
5087 if (constraintCase_ == 13) {
5088 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
5089 }
5090 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5091 }
5092 }
5093
5100 private com.google.protobuf.SingleFieldBuilder<
5101 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>
5102 internalGetAllDiffFieldBuilder() {
5103 if (allDiffBuilder_ == null) {
5104 if (!(constraintCase_ == 13)) {
5105 constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5106 }
5107 allDiffBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5108 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>(
5109 (com.google.ortools.sat.AllDifferentConstraintProto) constraint_,
5110 getParentForChildren(),
5111 isClean());
5112 constraint_ = null;
5113 }
5114 constraintCase_ = 13;
5115 onChanged();
5116 return allDiffBuilder_;
5117 }
5118
5119 private com.google.protobuf.SingleFieldBuilder<
5120 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder> elementBuilder_;
5130 @java.lang.Override
5131 public boolean hasElement() {
5132 return constraintCase_ == 14;
5133 }
5134
5143 @java.lang.Override
5145 if (elementBuilder_ == null) {
5146 if (constraintCase_ == 14) {
5147 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
5148 }
5149 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5150 } else {
5151 if (constraintCase_ == 14) {
5152 return elementBuilder_.getMessage();
5153 }
5154 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5155 }
5156 }
5157
5165 public Builder setElement(com.google.ortools.sat.ElementConstraintProto value) {
5166 if (elementBuilder_ == null) {
5167 if (value == null) {
5168 throw new NullPointerException();
5169 }
5170 constraint_ = value;
5171 onChanged();
5172 } else {
5173 elementBuilder_.setMessage(value);
5174 }
5175 constraintCase_ = 14;
5176 return this;
5177 }
5178
5186 public Builder setElement(
5187 com.google.ortools.sat.ElementConstraintProto.Builder builderForValue) {
5188 if (elementBuilder_ == null) {
5189 constraint_ = builderForValue.build();
5190 onChanged();
5191 } else {
5192 elementBuilder_.setMessage(builderForValue.build());
5193 }
5194 constraintCase_ = 14;
5195 return this;
5196 }
5197
5205 public Builder mergeElement(com.google.ortools.sat.ElementConstraintProto value) {
5206 if (elementBuilder_ == null) {
5207 if (constraintCase_ == 14 &&
5208 constraint_ != com.google.ortools.sat.ElementConstraintProto.getDefaultInstance()) {
5209 constraint_ = com.google.ortools.sat.ElementConstraintProto.newBuilder((com.google.ortools.sat.ElementConstraintProto) constraint_)
5210 .mergeFrom(value).buildPartial();
5211 } else {
5212 constraint_ = value;
5213 }
5214 onChanged();
5215 } else {
5216 if (constraintCase_ == 14) {
5217 elementBuilder_.mergeFrom(value);
5218 } else {
5219 elementBuilder_.setMessage(value);
5220 }
5221 }
5222 constraintCase_ = 14;
5223 return this;
5224 }
5225
5233 public Builder clearElement() {
5234 if (elementBuilder_ == null) {
5235 if (constraintCase_ == 14) {
5236 constraintCase_ = 0;
5237 constraint_ = null;
5238 onChanged();
5239 }
5240 } else {
5241 if (constraintCase_ == 14) {
5242 constraintCase_ = 0;
5243 constraint_ = null;
5244 }
5245 elementBuilder_.clear();
5246 }
5247 return this;
5248 }
5249
5258 return internalGetElementFieldBuilder().getBuilder();
5259 }
5260
5268 @java.lang.Override
5270 if ((constraintCase_ == 14) && (elementBuilder_ != null)) {
5271 return elementBuilder_.getMessageOrBuilder();
5272 } else {
5273 if (constraintCase_ == 14) {
5274 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
5275 }
5276 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5277 }
5278 }
5279
5287 private com.google.protobuf.SingleFieldBuilder<
5288 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>
5289 internalGetElementFieldBuilder() {
5290 if (elementBuilder_ == null) {
5291 if (!(constraintCase_ == 14)) {
5292 constraint_ = com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5293 }
5294 elementBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5295 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>(
5296 (com.google.ortools.sat.ElementConstraintProto) constraint_,
5297 getParentForChildren(),
5298 isClean());
5299 constraint_ = null;
5300 }
5301 constraintCase_ = 14;
5302 onChanged();
5303 return elementBuilder_;
5304 }
5305
5306 private com.google.protobuf.SingleFieldBuilder<
5307 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder> circuitBuilder_;
5317 @java.lang.Override
5318 public boolean hasCircuit() {
5319 return constraintCase_ == 15;
5320 }
5321
5330 @java.lang.Override
5332 if (circuitBuilder_ == null) {
5333 if (constraintCase_ == 15) {
5334 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
5335 }
5336 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5337 } else {
5338 if (constraintCase_ == 15) {
5339 return circuitBuilder_.getMessage();
5340 }
5341 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5342 }
5343 }
5344
5352 public Builder setCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
5353 if (circuitBuilder_ == null) {
5354 if (value == null) {
5355 throw new NullPointerException();
5356 }
5357 constraint_ = value;
5358 onChanged();
5359 } else {
5360 circuitBuilder_.setMessage(value);
5361 }
5362 constraintCase_ = 15;
5363 return this;
5364 }
5365
5373 public Builder setCircuit(
5374 com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue) {
5375 if (circuitBuilder_ == null) {
5376 constraint_ = builderForValue.build();
5377 onChanged();
5378 } else {
5379 circuitBuilder_.setMessage(builderForValue.build());
5380 }
5381 constraintCase_ = 15;
5382 return this;
5383 }
5384
5392 public Builder mergeCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
5393 if (circuitBuilder_ == null) {
5394 if (constraintCase_ == 15 &&
5395 constraint_ != com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance()) {
5396 constraint_ = com.google.ortools.sat.CircuitConstraintProto.newBuilder((com.google.ortools.sat.CircuitConstraintProto) constraint_)
5397 .mergeFrom(value).buildPartial();
5398 } else {
5399 constraint_ = value;
5400 }
5401 onChanged();
5402 } else {
5403 if (constraintCase_ == 15) {
5404 circuitBuilder_.mergeFrom(value);
5405 } else {
5406 circuitBuilder_.setMessage(value);
5407 }
5408 }
5409 constraintCase_ = 15;
5410 return this;
5411 }
5412
5420 public Builder clearCircuit() {
5421 if (circuitBuilder_ == null) {
5422 if (constraintCase_ == 15) {
5423 constraintCase_ = 0;
5424 constraint_ = null;
5425 onChanged();
5426 }
5427 } else {
5428 if (constraintCase_ == 15) {
5429 constraintCase_ = 0;
5430 constraint_ = null;
5431 }
5432 circuitBuilder_.clear();
5433 }
5434 return this;
5435 }
5436
5445 return internalGetCircuitFieldBuilder().getBuilder();
5446 }
5447
5455 @java.lang.Override
5457 if ((constraintCase_ == 15) && (circuitBuilder_ != null)) {
5458 return circuitBuilder_.getMessageOrBuilder();
5459 } else {
5460 if (constraintCase_ == 15) {
5461 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
5462 }
5463 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5464 }
5465 }
5466
5474 private com.google.protobuf.SingleFieldBuilder<
5475 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>
5476 internalGetCircuitFieldBuilder() {
5477 if (circuitBuilder_ == null) {
5478 if (!(constraintCase_ == 15)) {
5479 constraint_ = com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5480 }
5481 circuitBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5482 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>(
5483 (com.google.ortools.sat.CircuitConstraintProto) constraint_,
5484 getParentForChildren(),
5485 isClean());
5486 constraint_ = null;
5487 }
5488 constraintCase_ = 15;
5489 onChanged();
5490 return circuitBuilder_;
5491 }
5492
5493 private com.google.protobuf.SingleFieldBuilder<
5494 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder> routesBuilder_;
5503 @java.lang.Override
5504 public boolean hasRoutes() {
5505 return constraintCase_ == 23;
5506 }
5507
5515 @java.lang.Override
5517 if (routesBuilder_ == null) {
5518 if (constraintCase_ == 23) {
5519 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
5520 }
5521 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5522 } else {
5523 if (constraintCase_ == 23) {
5524 return routesBuilder_.getMessage();
5525 }
5526 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5527 }
5528 }
5529
5536 public Builder setRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
5537 if (routesBuilder_ == null) {
5538 if (value == null) {
5539 throw new NullPointerException();
5540 }
5541 constraint_ = value;
5542 onChanged();
5543 } else {
5544 routesBuilder_.setMessage(value);
5545 }
5546 constraintCase_ = 23;
5547 return this;
5548 }
5549
5556 public Builder setRoutes(
5557 com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue) {
5558 if (routesBuilder_ == null) {
5559 constraint_ = builderForValue.build();
5560 onChanged();
5561 } else {
5562 routesBuilder_.setMessage(builderForValue.build());
5563 }
5564 constraintCase_ = 23;
5565 return this;
5566 }
5567
5574 public Builder mergeRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
5575 if (routesBuilder_ == null) {
5576 if (constraintCase_ == 23 &&
5577 constraint_ != com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance()) {
5578 constraint_ = com.google.ortools.sat.RoutesConstraintProto.newBuilder((com.google.ortools.sat.RoutesConstraintProto) constraint_)
5579 .mergeFrom(value).buildPartial();
5580 } else {
5581 constraint_ = value;
5582 }
5583 onChanged();
5584 } else {
5585 if (constraintCase_ == 23) {
5586 routesBuilder_.mergeFrom(value);
5587 } else {
5588 routesBuilder_.setMessage(value);
5589 }
5590 }
5591 constraintCase_ = 23;
5592 return this;
5593 }
5594
5601 public Builder clearRoutes() {
5602 if (routesBuilder_ == null) {
5603 if (constraintCase_ == 23) {
5604 constraintCase_ = 0;
5605 constraint_ = null;
5606 onChanged();
5607 }
5608 } else {
5609 if (constraintCase_ == 23) {
5610 constraintCase_ = 0;
5611 constraint_ = null;
5612 }
5613 routesBuilder_.clear();
5614 }
5615 return this;
5616 }
5617
5625 return internalGetRoutesFieldBuilder().getBuilder();
5626 }
5627
5634 @java.lang.Override
5636 if ((constraintCase_ == 23) && (routesBuilder_ != null)) {
5637 return routesBuilder_.getMessageOrBuilder();
5638 } else {
5639 if (constraintCase_ == 23) {
5640 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
5641 }
5642 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5643 }
5644 }
5645
5652 private com.google.protobuf.SingleFieldBuilder<
5653 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>
5654 internalGetRoutesFieldBuilder() {
5655 if (routesBuilder_ == null) {
5656 if (!(constraintCase_ == 23)) {
5657 constraint_ = com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5658 }
5659 routesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5660 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>(
5661 (com.google.ortools.sat.RoutesConstraintProto) constraint_,
5662 getParentForChildren(),
5663 isClean());
5664 constraint_ = null;
5665 }
5666 constraintCase_ = 23;
5667 onChanged();
5668 return routesBuilder_;
5669 }
5670
5671 private com.google.protobuf.SingleFieldBuilder<
5672 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder> tableBuilder_;
5682 @java.lang.Override
5683 public boolean hasTable() {
5684 return constraintCase_ == 16;
5685 }
5686
5695 @java.lang.Override
5697 if (tableBuilder_ == null) {
5698 if (constraintCase_ == 16) {
5699 return (com.google.ortools.sat.TableConstraintProto) constraint_;
5700 }
5701 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5702 } else {
5703 if (constraintCase_ == 16) {
5704 return tableBuilder_.getMessage();
5705 }
5706 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5707 }
5708 }
5709
5717 public Builder setTable(com.google.ortools.sat.TableConstraintProto value) {
5718 if (tableBuilder_ == null) {
5719 if (value == null) {
5720 throw new NullPointerException();
5721 }
5722 constraint_ = value;
5723 onChanged();
5724 } else {
5725 tableBuilder_.setMessage(value);
5726 }
5727 constraintCase_ = 16;
5728 return this;
5729 }
5730
5738 public Builder setTable(
5739 com.google.ortools.sat.TableConstraintProto.Builder builderForValue) {
5740 if (tableBuilder_ == null) {
5741 constraint_ = builderForValue.build();
5742 onChanged();
5743 } else {
5744 tableBuilder_.setMessage(builderForValue.build());
5745 }
5746 constraintCase_ = 16;
5747 return this;
5748 }
5749
5757 public Builder mergeTable(com.google.ortools.sat.TableConstraintProto value) {
5758 if (tableBuilder_ == null) {
5759 if (constraintCase_ == 16 &&
5760 constraint_ != com.google.ortools.sat.TableConstraintProto.getDefaultInstance()) {
5761 constraint_ = com.google.ortools.sat.TableConstraintProto.newBuilder((com.google.ortools.sat.TableConstraintProto) constraint_)
5762 .mergeFrom(value).buildPartial();
5763 } else {
5764 constraint_ = value;
5765 }
5766 onChanged();
5767 } else {
5768 if (constraintCase_ == 16) {
5769 tableBuilder_.mergeFrom(value);
5770 } else {
5771 tableBuilder_.setMessage(value);
5772 }
5773 }
5774 constraintCase_ = 16;
5775 return this;
5776 }
5777
5785 public Builder clearTable() {
5786 if (tableBuilder_ == null) {
5787 if (constraintCase_ == 16) {
5788 constraintCase_ = 0;
5789 constraint_ = null;
5790 onChanged();
5791 }
5792 } else {
5793 if (constraintCase_ == 16) {
5794 constraintCase_ = 0;
5795 constraint_ = null;
5796 }
5797 tableBuilder_.clear();
5798 }
5799 return this;
5800 }
5801
5810 return internalGetTableFieldBuilder().getBuilder();
5811 }
5812
5820 @java.lang.Override
5822 if ((constraintCase_ == 16) && (tableBuilder_ != null)) {
5823 return tableBuilder_.getMessageOrBuilder();
5824 } else {
5825 if (constraintCase_ == 16) {
5826 return (com.google.ortools.sat.TableConstraintProto) constraint_;
5827 }
5828 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5829 }
5830 }
5831
5839 private com.google.protobuf.SingleFieldBuilder<
5840 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>
5841 internalGetTableFieldBuilder() {
5842 if (tableBuilder_ == null) {
5843 if (!(constraintCase_ == 16)) {
5844 constraint_ = com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5845 }
5846 tableBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5847 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>(
5848 (com.google.ortools.sat.TableConstraintProto) constraint_,
5849 getParentForChildren(),
5850 isClean());
5851 constraint_ = null;
5852 }
5853 constraintCase_ = 16;
5854 onChanged();
5855 return tableBuilder_;
5856 }
5857
5858 private com.google.protobuf.SingleFieldBuilder<
5859 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder> automatonBuilder_;
5869 @java.lang.Override
5870 public boolean hasAutomaton() {
5871 return constraintCase_ == 17;
5872 }
5873
5882 @java.lang.Override
5884 if (automatonBuilder_ == null) {
5885 if (constraintCase_ == 17) {
5886 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
5887 }
5888 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
5889 } else {
5890 if (constraintCase_ == 17) {
5891 return automatonBuilder_.getMessage();
5892 }
5893 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
5894 }
5895 }
5896
5904 public Builder setAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
5905 if (automatonBuilder_ == null) {
5906 if (value == null) {
5907 throw new NullPointerException();
5908 }
5909 constraint_ = value;
5910 onChanged();
5911 } else {
5912 automatonBuilder_.setMessage(value);
5913 }
5914 constraintCase_ = 17;
5915 return this;
5916 }
5917
5925 public Builder setAutomaton(
5926 com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue) {
5927 if (automatonBuilder_ == null) {
5928 constraint_ = builderForValue.build();
5929 onChanged();
5930 } else {
5931 automatonBuilder_.setMessage(builderForValue.build());
5932 }
5933 constraintCase_ = 17;
5934 return this;
5935 }
5936
5944 public Builder mergeAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
5945 if (automatonBuilder_ == null) {
5946 if (constraintCase_ == 17 &&
5947 constraint_ != com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) {
5948 constraint_ = com.google.ortools.sat.AutomatonConstraintProto.newBuilder((com.google.ortools.sat.AutomatonConstraintProto) constraint_)
5949 .mergeFrom(value).buildPartial();
5950 } else {
5951 constraint_ = value;
5952 }
5953 onChanged();
5954 } else {
5955 if (constraintCase_ == 17) {
5956 automatonBuilder_.mergeFrom(value);
5957 } else {
5958 automatonBuilder_.setMessage(value);
5959 }
5960 }
5961 constraintCase_ = 17;
5962 return this;
5963 }
5964
5972 public Builder clearAutomaton() {
5973 if (automatonBuilder_ == null) {
5974 if (constraintCase_ == 17) {
5975 constraintCase_ = 0;
5976 constraint_ = null;
5977 onChanged();
5978 }
5979 } else {
5980 if (constraintCase_ == 17) {
5981 constraintCase_ = 0;
5982 constraint_ = null;
5983 }
5984 automatonBuilder_.clear();
5985 }
5986 return this;
5987 }
5988
5997 return internalGetAutomatonFieldBuilder().getBuilder();
5998 }
5999
6007 @java.lang.Override
6009 if ((constraintCase_ == 17) && (automatonBuilder_ != null)) {
6010 return automatonBuilder_.getMessageOrBuilder();
6011 } else {
6012 if (constraintCase_ == 17) {
6013 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
6014 }
6015 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
6016 }
6017 }
6018
6026 private com.google.protobuf.SingleFieldBuilder<
6027 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>
6028 internalGetAutomatonFieldBuilder() {
6029 if (automatonBuilder_ == null) {
6030 if (!(constraintCase_ == 17)) {
6031 constraint_ = com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
6032 }
6033 automatonBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6034 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>(
6035 (com.google.ortools.sat.AutomatonConstraintProto) constraint_,
6036 getParentForChildren(),
6037 isClean());
6038 constraint_ = null;
6039 }
6040 constraintCase_ = 17;
6041 onChanged();
6042 return automatonBuilder_;
6043 }
6044
6045 private com.google.protobuf.SingleFieldBuilder<
6046 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder> inverseBuilder_;
6056 @java.lang.Override
6057 public boolean hasInverse() {
6058 return constraintCase_ == 18;
6059 }
6060
6069 @java.lang.Override
6071 if (inverseBuilder_ == null) {
6072 if (constraintCase_ == 18) {
6073 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
6074 }
6075 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6076 } else {
6077 if (constraintCase_ == 18) {
6078 return inverseBuilder_.getMessage();
6079 }
6080 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6081 }
6082 }
6083
6091 public Builder setInverse(com.google.ortools.sat.InverseConstraintProto value) {
6092 if (inverseBuilder_ == null) {
6093 if (value == null) {
6094 throw new NullPointerException();
6095 }
6096 constraint_ = value;
6097 onChanged();
6098 } else {
6099 inverseBuilder_.setMessage(value);
6100 }
6101 constraintCase_ = 18;
6102 return this;
6103 }
6104
6112 public Builder setInverse(
6113 com.google.ortools.sat.InverseConstraintProto.Builder builderForValue) {
6114 if (inverseBuilder_ == null) {
6115 constraint_ = builderForValue.build();
6116 onChanged();
6117 } else {
6118 inverseBuilder_.setMessage(builderForValue.build());
6119 }
6120 constraintCase_ = 18;
6121 return this;
6122 }
6123
6131 public Builder mergeInverse(com.google.ortools.sat.InverseConstraintProto value) {
6132 if (inverseBuilder_ == null) {
6133 if (constraintCase_ == 18 &&
6134 constraint_ != com.google.ortools.sat.InverseConstraintProto.getDefaultInstance()) {
6135 constraint_ = com.google.ortools.sat.InverseConstraintProto.newBuilder((com.google.ortools.sat.InverseConstraintProto) constraint_)
6136 .mergeFrom(value).buildPartial();
6137 } else {
6138 constraint_ = value;
6139 }
6140 onChanged();
6141 } else {
6142 if (constraintCase_ == 18) {
6143 inverseBuilder_.mergeFrom(value);
6144 } else {
6145 inverseBuilder_.setMessage(value);
6146 }
6147 }
6148 constraintCase_ = 18;
6149 return this;
6150 }
6151
6159 public Builder clearInverse() {
6160 if (inverseBuilder_ == null) {
6161 if (constraintCase_ == 18) {
6162 constraintCase_ = 0;
6163 constraint_ = null;
6164 onChanged();
6165 }
6166 } else {
6167 if (constraintCase_ == 18) {
6168 constraintCase_ = 0;
6169 constraint_ = null;
6170 }
6171 inverseBuilder_.clear();
6172 }
6173 return this;
6174 }
6175
6184 return internalGetInverseFieldBuilder().getBuilder();
6185 }
6186
6194 @java.lang.Override
6196 if ((constraintCase_ == 18) && (inverseBuilder_ != null)) {
6197 return inverseBuilder_.getMessageOrBuilder();
6198 } else {
6199 if (constraintCase_ == 18) {
6200 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
6201 }
6202 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6203 }
6204 }
6205
6213 private com.google.protobuf.SingleFieldBuilder<
6214 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>
6215 internalGetInverseFieldBuilder() {
6216 if (inverseBuilder_ == null) {
6217 if (!(constraintCase_ == 18)) {
6218 constraint_ = com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6219 }
6220 inverseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6221 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>(
6222 (com.google.ortools.sat.InverseConstraintProto) constraint_,
6223 getParentForChildren(),
6224 isClean());
6225 constraint_ = null;
6226 }
6227 constraintCase_ = 18;
6228 onChanged();
6229 return inverseBuilder_;
6230 }
6231
6232 private com.google.protobuf.SingleFieldBuilder<
6233 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder> reservoirBuilder_;
6244 @java.lang.Override
6245 public boolean hasReservoir() {
6246 return constraintCase_ == 24;
6247 }
6248
6258 @java.lang.Override
6260 if (reservoirBuilder_ == null) {
6261 if (constraintCase_ == 24) {
6262 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
6263 }
6264 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6265 } else {
6266 if (constraintCase_ == 24) {
6267 return reservoirBuilder_.getMessage();
6268 }
6269 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6270 }
6271 }
6272
6281 public Builder setReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
6282 if (reservoirBuilder_ == null) {
6283 if (value == null) {
6284 throw new NullPointerException();
6285 }
6286 constraint_ = value;
6287 onChanged();
6288 } else {
6289 reservoirBuilder_.setMessage(value);
6290 }
6291 constraintCase_ = 24;
6292 return this;
6293 }
6294
6303 public Builder setReservoir(
6304 com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue) {
6305 if (reservoirBuilder_ == null) {
6306 constraint_ = builderForValue.build();
6307 onChanged();
6308 } else {
6309 reservoirBuilder_.setMessage(builderForValue.build());
6310 }
6311 constraintCase_ = 24;
6312 return this;
6313 }
6314
6323 public Builder mergeReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
6324 if (reservoirBuilder_ == null) {
6325 if (constraintCase_ == 24 &&
6326 constraint_ != com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance()) {
6327 constraint_ = com.google.ortools.sat.ReservoirConstraintProto.newBuilder((com.google.ortools.sat.ReservoirConstraintProto) constraint_)
6328 .mergeFrom(value).buildPartial();
6329 } else {
6330 constraint_ = value;
6331 }
6332 onChanged();
6333 } else {
6334 if (constraintCase_ == 24) {
6335 reservoirBuilder_.mergeFrom(value);
6336 } else {
6337 reservoirBuilder_.setMessage(value);
6338 }
6339 }
6340 constraintCase_ = 24;
6341 return this;
6342 }
6343
6352 public Builder clearReservoir() {
6353 if (reservoirBuilder_ == null) {
6354 if (constraintCase_ == 24) {
6355 constraintCase_ = 0;
6356 constraint_ = null;
6357 onChanged();
6358 }
6359 } else {
6360 if (constraintCase_ == 24) {
6361 constraintCase_ = 0;
6362 constraint_ = null;
6363 }
6364 reservoirBuilder_.clear();
6365 }
6366 return this;
6367 }
6368
6378 return internalGetReservoirFieldBuilder().getBuilder();
6379 }
6380
6389 @java.lang.Override
6391 if ((constraintCase_ == 24) && (reservoirBuilder_ != null)) {
6392 return reservoirBuilder_.getMessageOrBuilder();
6393 } else {
6394 if (constraintCase_ == 24) {
6395 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
6396 }
6397 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6398 }
6399 }
6400
6409 private com.google.protobuf.SingleFieldBuilder<
6410 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>
6411 internalGetReservoirFieldBuilder() {
6412 if (reservoirBuilder_ == null) {
6413 if (!(constraintCase_ == 24)) {
6414 constraint_ = com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6415 }
6416 reservoirBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6417 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>(
6418 (com.google.ortools.sat.ReservoirConstraintProto) constraint_,
6419 getParentForChildren(),
6420 isClean());
6421 constraint_ = null;
6422 }
6423 constraintCase_ = 24;
6424 onChanged();
6425 return reservoirBuilder_;
6426 }
6427
6428 private com.google.protobuf.SingleFieldBuilder<
6429 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder> intervalBuilder_;
6439 @java.lang.Override
6440 public boolean hasInterval() {
6441 return constraintCase_ == 19;
6442 }
6443
6452 @java.lang.Override
6454 if (intervalBuilder_ == null) {
6455 if (constraintCase_ == 19) {
6456 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
6457 }
6458 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6459 } else {
6460 if (constraintCase_ == 19) {
6461 return intervalBuilder_.getMessage();
6462 }
6463 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6464 }
6465 }
6466
6474 public Builder setInterval(com.google.ortools.sat.IntervalConstraintProto value) {
6475 if (intervalBuilder_ == null) {
6476 if (value == null) {
6477 throw new NullPointerException();
6478 }
6479 constraint_ = value;
6480 onChanged();
6481 } else {
6482 intervalBuilder_.setMessage(value);
6483 }
6484 constraintCase_ = 19;
6485 return this;
6486 }
6487
6495 public Builder setInterval(
6496 com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue) {
6497 if (intervalBuilder_ == null) {
6498 constraint_ = builderForValue.build();
6499 onChanged();
6500 } else {
6501 intervalBuilder_.setMessage(builderForValue.build());
6502 }
6503 constraintCase_ = 19;
6504 return this;
6505 }
6506
6514 public Builder mergeInterval(com.google.ortools.sat.IntervalConstraintProto value) {
6515 if (intervalBuilder_ == null) {
6516 if (constraintCase_ == 19 &&
6517 constraint_ != com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance()) {
6518 constraint_ = com.google.ortools.sat.IntervalConstraintProto.newBuilder((com.google.ortools.sat.IntervalConstraintProto) constraint_)
6519 .mergeFrom(value).buildPartial();
6520 } else {
6521 constraint_ = value;
6522 }
6523 onChanged();
6524 } else {
6525 if (constraintCase_ == 19) {
6526 intervalBuilder_.mergeFrom(value);
6527 } else {
6528 intervalBuilder_.setMessage(value);
6529 }
6530 }
6531 constraintCase_ = 19;
6532 return this;
6533 }
6534
6542 public Builder clearInterval() {
6543 if (intervalBuilder_ == null) {
6544 if (constraintCase_ == 19) {
6545 constraintCase_ = 0;
6546 constraint_ = null;
6547 onChanged();
6548 }
6549 } else {
6550 if (constraintCase_ == 19) {
6551 constraintCase_ = 0;
6552 constraint_ = null;
6553 }
6554 intervalBuilder_.clear();
6555 }
6556 return this;
6557 }
6558
6567 return internalGetIntervalFieldBuilder().getBuilder();
6568 }
6569
6577 @java.lang.Override
6579 if ((constraintCase_ == 19) && (intervalBuilder_ != null)) {
6580 return intervalBuilder_.getMessageOrBuilder();
6581 } else {
6582 if (constraintCase_ == 19) {
6583 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
6584 }
6585 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6586 }
6587 }
6588
6596 private com.google.protobuf.SingleFieldBuilder<
6597 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>
6598 internalGetIntervalFieldBuilder() {
6599 if (intervalBuilder_ == null) {
6600 if (!(constraintCase_ == 19)) {
6601 constraint_ = com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6602 }
6603 intervalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6604 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>(
6605 (com.google.ortools.sat.IntervalConstraintProto) constraint_,
6606 getParentForChildren(),
6607 isClean());
6608 constraint_ = null;
6609 }
6610 constraintCase_ = 19;
6611 onChanged();
6612 return intervalBuilder_;
6613 }
6614
6615 private com.google.protobuf.SingleFieldBuilder<
6616 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder> noOverlapBuilder_;
6627 @java.lang.Override
6628 public boolean hasNoOverlap() {
6629 return constraintCase_ == 20;
6630 }
6631
6641 @java.lang.Override
6643 if (noOverlapBuilder_ == null) {
6644 if (constraintCase_ == 20) {
6645 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
6646 }
6647 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6648 } else {
6649 if (constraintCase_ == 20) {
6650 return noOverlapBuilder_.getMessage();
6651 }
6652 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6653 }
6654 }
6655
6664 public Builder setNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
6665 if (noOverlapBuilder_ == null) {
6666 if (value == null) {
6667 throw new NullPointerException();
6668 }
6669 constraint_ = value;
6670 onChanged();
6671 } else {
6672 noOverlapBuilder_.setMessage(value);
6673 }
6674 constraintCase_ = 20;
6675 return this;
6676 }
6677
6686 public Builder setNoOverlap(
6687 com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue) {
6688 if (noOverlapBuilder_ == null) {
6689 constraint_ = builderForValue.build();
6690 onChanged();
6691 } else {
6692 noOverlapBuilder_.setMessage(builderForValue.build());
6693 }
6694 constraintCase_ = 20;
6695 return this;
6696 }
6697
6706 public Builder mergeNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
6707 if (noOverlapBuilder_ == null) {
6708 if (constraintCase_ == 20 &&
6709 constraint_ != com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance()) {
6710 constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.newBuilder((com.google.ortools.sat.NoOverlapConstraintProto) constraint_)
6711 .mergeFrom(value).buildPartial();
6712 } else {
6713 constraint_ = value;
6714 }
6715 onChanged();
6716 } else {
6717 if (constraintCase_ == 20) {
6718 noOverlapBuilder_.mergeFrom(value);
6719 } else {
6720 noOverlapBuilder_.setMessage(value);
6721 }
6722 }
6723 constraintCase_ = 20;
6724 return this;
6725 }
6726
6735 public Builder clearNoOverlap() {
6736 if (noOverlapBuilder_ == null) {
6737 if (constraintCase_ == 20) {
6738 constraintCase_ = 0;
6739 constraint_ = null;
6740 onChanged();
6741 }
6742 } else {
6743 if (constraintCase_ == 20) {
6744 constraintCase_ = 0;
6745 constraint_ = null;
6746 }
6747 noOverlapBuilder_.clear();
6748 }
6749 return this;
6750 }
6751
6761 return internalGetNoOverlapFieldBuilder().getBuilder();
6762 }
6763
6772 @java.lang.Override
6774 if ((constraintCase_ == 20) && (noOverlapBuilder_ != null)) {
6775 return noOverlapBuilder_.getMessageOrBuilder();
6776 } else {
6777 if (constraintCase_ == 20) {
6778 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
6779 }
6780 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6781 }
6782 }
6783
6792 private com.google.protobuf.SingleFieldBuilder<
6793 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>
6794 internalGetNoOverlapFieldBuilder() {
6795 if (noOverlapBuilder_ == null) {
6796 if (!(constraintCase_ == 20)) {
6797 constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6798 }
6799 noOverlapBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6800 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>(
6801 (com.google.ortools.sat.NoOverlapConstraintProto) constraint_,
6802 getParentForChildren(),
6803 isClean());
6804 constraint_ = null;
6805 }
6806 constraintCase_ = 20;
6807 onChanged();
6808 return noOverlapBuilder_;
6809 }
6810
6811 private com.google.protobuf.SingleFieldBuilder<
6812 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder> noOverlap2DBuilder_;
6821 @java.lang.Override
6822 public boolean hasNoOverlap2D() {
6823 return constraintCase_ == 21;
6824 }
6825
6833 @java.lang.Override
6835 if (noOverlap2DBuilder_ == null) {
6836 if (constraintCase_ == 21) {
6837 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
6838 }
6839 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6840 } else {
6841 if (constraintCase_ == 21) {
6842 return noOverlap2DBuilder_.getMessage();
6843 }
6844 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6845 }
6846 }
6847
6854 public Builder setNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
6855 if (noOverlap2DBuilder_ == null) {
6856 if (value == null) {
6857 throw new NullPointerException();
6858 }
6859 constraint_ = value;
6860 onChanged();
6861 } else {
6862 noOverlap2DBuilder_.setMessage(value);
6863 }
6864 constraintCase_ = 21;
6865 return this;
6866 }
6867
6874 public Builder setNoOverlap2D(
6875 com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue) {
6876 if (noOverlap2DBuilder_ == null) {
6877 constraint_ = builderForValue.build();
6878 onChanged();
6879 } else {
6880 noOverlap2DBuilder_.setMessage(builderForValue.build());
6881 }
6882 constraintCase_ = 21;
6883 return this;
6884 }
6885
6892 public Builder mergeNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
6893 if (noOverlap2DBuilder_ == null) {
6894 if (constraintCase_ == 21 &&
6895 constraint_ != com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance()) {
6896 constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.newBuilder((com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_)
6897 .mergeFrom(value).buildPartial();
6898 } else {
6899 constraint_ = value;
6900 }
6901 onChanged();
6902 } else {
6903 if (constraintCase_ == 21) {
6904 noOverlap2DBuilder_.mergeFrom(value);
6905 } else {
6906 noOverlap2DBuilder_.setMessage(value);
6907 }
6908 }
6909 constraintCase_ = 21;
6910 return this;
6911 }
6912
6919 public Builder clearNoOverlap2D() {
6920 if (noOverlap2DBuilder_ == null) {
6921 if (constraintCase_ == 21) {
6922 constraintCase_ = 0;
6923 constraint_ = null;
6924 onChanged();
6925 }
6926 } else {
6927 if (constraintCase_ == 21) {
6928 constraintCase_ = 0;
6929 constraint_ = null;
6930 }
6931 noOverlap2DBuilder_.clear();
6932 }
6933 return this;
6934 }
6935
6943 return internalGetNoOverlap2DFieldBuilder().getBuilder();
6944 }
6945
6952 @java.lang.Override
6954 if ((constraintCase_ == 21) && (noOverlap2DBuilder_ != null)) {
6955 return noOverlap2DBuilder_.getMessageOrBuilder();
6956 } else {
6957 if (constraintCase_ == 21) {
6958 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
6959 }
6960 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6961 }
6962 }
6963
6970 private com.google.protobuf.SingleFieldBuilder<
6971 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>
6972 internalGetNoOverlap2DFieldBuilder() {
6973 if (noOverlap2DBuilder_ == null) {
6974 if (!(constraintCase_ == 21)) {
6975 constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6976 }
6977 noOverlap2DBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6978 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>(
6979 (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_,
6980 getParentForChildren(),
6981 isClean());
6982 constraint_ = null;
6983 }
6984 constraintCase_ = 21;
6985 onChanged();
6986 return noOverlap2DBuilder_;
6987 }
6988
6989 private com.google.protobuf.SingleFieldBuilder<
6990 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder> cumulativeBuilder_;
7001 @java.lang.Override
7002 public boolean hasCumulative() {
7003 return constraintCase_ == 22;
7004 }
7005
7015 @java.lang.Override
7017 if (cumulativeBuilder_ == null) {
7018 if (constraintCase_ == 22) {
7019 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
7020 }
7021 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7022 } else {
7023 if (constraintCase_ == 22) {
7024 return cumulativeBuilder_.getMessage();
7025 }
7026 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7027 }
7028 }
7029
7038 public Builder setCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
7039 if (cumulativeBuilder_ == null) {
7040 if (value == null) {
7041 throw new NullPointerException();
7042 }
7043 constraint_ = value;
7044 onChanged();
7045 } else {
7046 cumulativeBuilder_.setMessage(value);
7047 }
7048 constraintCase_ = 22;
7049 return this;
7050 }
7051
7060 public Builder setCumulative(
7061 com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue) {
7062 if (cumulativeBuilder_ == null) {
7063 constraint_ = builderForValue.build();
7064 onChanged();
7065 } else {
7066 cumulativeBuilder_.setMessage(builderForValue.build());
7067 }
7068 constraintCase_ = 22;
7069 return this;
7070 }
7071
7080 public Builder mergeCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
7081 if (cumulativeBuilder_ == null) {
7082 if (constraintCase_ == 22 &&
7083 constraint_ != com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance()) {
7084 constraint_ = com.google.ortools.sat.CumulativeConstraintProto.newBuilder((com.google.ortools.sat.CumulativeConstraintProto) constraint_)
7085 .mergeFrom(value).buildPartial();
7086 } else {
7087 constraint_ = value;
7088 }
7089 onChanged();
7090 } else {
7091 if (constraintCase_ == 22) {
7092 cumulativeBuilder_.mergeFrom(value);
7093 } else {
7094 cumulativeBuilder_.setMessage(value);
7095 }
7096 }
7097 constraintCase_ = 22;
7098 return this;
7099 }
7100
7109 public Builder clearCumulative() {
7110 if (cumulativeBuilder_ == null) {
7111 if (constraintCase_ == 22) {
7112 constraintCase_ = 0;
7113 constraint_ = null;
7114 onChanged();
7115 }
7116 } else {
7117 if (constraintCase_ == 22) {
7118 constraintCase_ = 0;
7119 constraint_ = null;
7120 }
7121 cumulativeBuilder_.clear();
7122 }
7123 return this;
7124 }
7125
7135 return internalGetCumulativeFieldBuilder().getBuilder();
7136 }
7137
7146 @java.lang.Override
7148 if ((constraintCase_ == 22) && (cumulativeBuilder_ != null)) {
7149 return cumulativeBuilder_.getMessageOrBuilder();
7150 } else {
7151 if (constraintCase_ == 22) {
7152 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
7153 }
7154 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7155 }
7156 }
7157
7166 private com.google.protobuf.SingleFieldBuilder<
7167 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>
7168 internalGetCumulativeFieldBuilder() {
7169 if (cumulativeBuilder_ == null) {
7170 if (!(constraintCase_ == 22)) {
7171 constraint_ = com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7172 }
7173 cumulativeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7174 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>(
7175 (com.google.ortools.sat.CumulativeConstraintProto) constraint_,
7176 getParentForChildren(),
7177 isClean());
7178 constraint_ = null;
7179 }
7180 constraintCase_ = 22;
7181 onChanged();
7182 return cumulativeBuilder_;
7183 }
7184
7185 private com.google.protobuf.SingleFieldBuilder<
7186 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder> dummyConstraintBuilder_;
7196 @java.lang.Override
7197 public boolean hasDummyConstraint() {
7198 return constraintCase_ == 30;
7199 }
7200
7209 @java.lang.Override
7211 if (dummyConstraintBuilder_ == null) {
7212 if (constraintCase_ == 30) {
7213 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
7214 }
7215 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7216 } else {
7217 if (constraintCase_ == 30) {
7218 return dummyConstraintBuilder_.getMessage();
7219 }
7220 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7221 }
7222 }
7223
7231 public Builder setDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value) {
7232 if (dummyConstraintBuilder_ == null) {
7233 if (value == null) {
7234 throw new NullPointerException();
7235 }
7236 constraint_ = value;
7237 onChanged();
7238 } else {
7239 dummyConstraintBuilder_.setMessage(value);
7240 }
7241 constraintCase_ = 30;
7242 return this;
7243 }
7244
7252 public Builder setDummyConstraint(
7253 com.google.ortools.sat.ListOfVariablesProto.Builder builderForValue) {
7254 if (dummyConstraintBuilder_ == null) {
7255 constraint_ = builderForValue.build();
7256 onChanged();
7257 } else {
7258 dummyConstraintBuilder_.setMessage(builderForValue.build());
7259 }
7260 constraintCase_ = 30;
7261 return this;
7262 }
7263
7271 public Builder mergeDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value) {
7272 if (dummyConstraintBuilder_ == null) {
7273 if (constraintCase_ == 30 &&
7274 constraint_ != com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance()) {
7275 constraint_ = com.google.ortools.sat.ListOfVariablesProto.newBuilder((com.google.ortools.sat.ListOfVariablesProto) constraint_)
7276 .mergeFrom(value).buildPartial();
7277 } else {
7278 constraint_ = value;
7279 }
7280 onChanged();
7281 } else {
7282 if (constraintCase_ == 30) {
7283 dummyConstraintBuilder_.mergeFrom(value);
7284 } else {
7285 dummyConstraintBuilder_.setMessage(value);
7286 }
7287 }
7288 constraintCase_ = 30;
7289 return this;
7290 }
7291
7299 public Builder clearDummyConstraint() {
7300 if (dummyConstraintBuilder_ == null) {
7301 if (constraintCase_ == 30) {
7302 constraintCase_ = 0;
7303 constraint_ = null;
7304 onChanged();
7305 }
7306 } else {
7307 if (constraintCase_ == 30) {
7308 constraintCase_ = 0;
7309 constraint_ = null;
7310 }
7311 dummyConstraintBuilder_.clear();
7312 }
7313 return this;
7314 }
7315
7324 return internalGetDummyConstraintFieldBuilder().getBuilder();
7325 }
7326
7334 @java.lang.Override
7336 if ((constraintCase_ == 30) && (dummyConstraintBuilder_ != null)) {
7337 return dummyConstraintBuilder_.getMessageOrBuilder();
7338 } else {
7339 if (constraintCase_ == 30) {
7340 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
7341 }
7342 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7343 }
7344 }
7345
7353 private com.google.protobuf.SingleFieldBuilder<
7354 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder>
7355 internalGetDummyConstraintFieldBuilder() {
7356 if (dummyConstraintBuilder_ == null) {
7357 if (!(constraintCase_ == 30)) {
7358 constraint_ = com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7359 }
7360 dummyConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7361 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder>(
7362 (com.google.ortools.sat.ListOfVariablesProto) constraint_,
7363 getParentForChildren(),
7364 isClean());
7365 constraint_ = null;
7366 }
7367 constraintCase_ = 30;
7368 onChanged();
7369 return dummyConstraintBuilder_;
7370 }
7371
7372 // @@protoc_insertion_point(builder_scope:operations_research.sat.ConstraintProto)
7373 }
7374
7375 // @@protoc_insertion_point(class_scope:operations_research.sat.ConstraintProto)
7376 private static final com.google.ortools.sat.ConstraintProto DEFAULT_INSTANCE;
7377 static {
7378 DEFAULT_INSTANCE = new com.google.ortools.sat.ConstraintProto();
7379 }
7380
7382 return DEFAULT_INSTANCE;
7383 }
7384
7385 private static final com.google.protobuf.Parser<ConstraintProto>
7386 PARSER = new com.google.protobuf.AbstractParser<ConstraintProto>() {
7387 @java.lang.Override
7388 public ConstraintProto parsePartialFrom(
7389 com.google.protobuf.CodedInputStream input,
7390 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7391 throws com.google.protobuf.InvalidProtocolBufferException {
7392 Builder builder = newBuilder();
7393 try {
7394 builder.mergeFrom(input, extensionRegistry);
7395 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7396 throw e.setUnfinishedMessage(builder.buildPartial());
7397 } catch (com.google.protobuf.UninitializedMessageException e) {
7398 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
7399 } catch (java.io.IOException e) {
7400 throw new com.google.protobuf.InvalidProtocolBufferException(e)
7401 .setUnfinishedMessage(builder.buildPartial());
7402 }
7403 return builder.buildPartial();
7404 }
7405 };
7406
7407 public static com.google.protobuf.Parser<ConstraintProto> parser() {
7408 return PARSER;
7409 }
7410
7411 @java.lang.Override
7412 public com.google.protobuf.Parser<ConstraintProto> getParserForType() {
7413 return PARSER;
7414 }
7415
7416 @java.lang.Override
7418 return DEFAULT_INSTANCE;
7419 }
7420
7421}
7422
Builder setNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue)
com.google.ortools.sat.ReservoirConstraintProto.Builder getReservoirBuilder()
com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getExactlyOneOrBuilder()
Builder setIntDiv(com.google.ortools.sat.LinearArgumentProto value)
Builder setRoutes(com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue)
Builder mergeFrom(com.google.ortools.sat.ConstraintProto other)
Builder setLinear(com.google.ortools.sat.LinearConstraintProto value)
com.google.ortools.sat.ReservoirConstraintProto getReservoir()
Builder setAutomaton(com.google.ortools.sat.AutomatonConstraintProto value)
Builder setExactlyOne(com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
Builder mergeRoutes(com.google.ortools.sat.RoutesConstraintProto value)
Builder setTable(com.google.ortools.sat.TableConstraintProto value)
Builder mergeLinear(com.google.ortools.sat.LinearConstraintProto value)
Builder setReservoir(com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue)
com.google.protobuf.ByteString getNameBytes()
com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder()
com.google.ortools.sat.LinearArgumentProto.Builder getIntModBuilder()
com.google.ortools.sat.LinearArgumentProto getIntProd()
com.google.ortools.sat.NoOverlap2DConstraintProto.Builder getNoOverlap2DBuilder()
com.google.ortools.sat.InverseConstraintProto.Builder getInverseBuilder()
Builder setBoolXor(com.google.ortools.sat.BoolArgumentProto value)
Builder setIntProd(com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder()
com.google.ortools.sat.LinearConstraintProto getLinear()
com.google.ortools.sat.BoolArgumentProto getAtMostOne()
com.google.ortools.sat.LinearArgumentProto.Builder getIntDivBuilder()
Builder setBoolXor(com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
Builder setLinear(com.google.ortools.sat.LinearConstraintProto.Builder builderForValue)
Builder mergeBoolXor(com.google.ortools.sat.BoolArgumentProto value)
Builder mergeLinMax(com.google.ortools.sat.LinearArgumentProto value)
Builder setInverse(com.google.ortools.sat.InverseConstraintProto value)
com.google.ortools.sat.LinearConstraintProto.Builder getLinearBuilder()
com.google.ortools.sat.LinearArgumentProto.Builder getIntProdBuilder()
Builder setIntMod(com.google.ortools.sat.LinearArgumentProto value)
com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder()
com.google.ortools.sat.CumulativeConstraintProto.Builder getCumulativeBuilder()
com.google.ortools.sat.BoolArgumentProto.Builder getAtMostOneBuilder()
Builder setExactlyOne(com.google.ortools.sat.BoolArgumentProto value)
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntDivOrBuilder()
com.google.ortools.sat.IntervalConstraintProto.Builder getIntervalBuilder()
com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder()
com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.CircuitConstraintProto getCircuit()
com.google.ortools.sat.LinearArgumentProto.Builder getLinMaxBuilder()
Builder addAllEnforcementLiteral(java.lang.Iterable<? extends java.lang.Integer > values)
com.google.ortools.sat.CumulativeConstraintProto getCumulative()
com.google.ortools.sat.BoolArgumentProto getBoolOr()
com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder()
com.google.ortools.sat.BoolArgumentProto.Builder getBoolAndBuilder()
Builder mergeCumulative(com.google.ortools.sat.CumulativeConstraintProto value)
com.google.ortools.sat.ConstraintProto build()
Builder setReservoir(com.google.ortools.sat.ReservoirConstraintProto value)
com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder()
Builder setCircuit(com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue)
java.util.List< java.lang.Integer > getEnforcementLiteralList()
com.google.ortools.sat.IntervalConstraintProto getInterval()
com.google.ortools.sat.RoutesConstraintProto getRoutes()
com.google.ortools.sat.BoolArgumentProto getExactlyOne()
Builder mergeNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value)
com.google.ortools.sat.AllDifferentConstraintProto getAllDiff()
Builder setEnforcementLiteral(int index, int value)
com.google.ortools.sat.BoolArgumentProto getBoolAnd()
Builder mergeCircuit(com.google.ortools.sat.CircuitConstraintProto value)
Builder mergeAtMostOne(com.google.ortools.sat.BoolArgumentProto value)
com.google.ortools.sat.ElementConstraintProto getElement()
Builder setNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value)
com.google.ortools.sat.ConstraintProto buildPartial()
Builder mergeIntDiv(com.google.ortools.sat.LinearArgumentProto value)
Builder mergeElement(com.google.ortools.sat.ElementConstraintProto value)
Builder setDummyConstraint(com.google.ortools.sat.ListOfVariablesProto.Builder builderForValue)
Builder mergeInverse(com.google.ortools.sat.InverseConstraintProto value)
Builder setAllDiff(com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue)
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntProdOrBuilder()
Builder setAtMostOne(com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
Builder setIntDiv(com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
Builder setInterval(com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue)
Builder setLinMax(com.google.ortools.sat.LinearArgumentProto value)
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder()
Builder mergeFrom(com.google.protobuf.Message other)
Builder setRoutes(com.google.ortools.sat.RoutesConstraintProto value)
Builder setTable(com.google.ortools.sat.TableConstraintProto.Builder builderForValue)
Builder setAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value)
Builder setCumulative(com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue)
com.google.ortools.sat.InverseConstraintProto getInverse()
Builder setIntMod(com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
com.google.ortools.sat.LinearArgumentProto getIntMod()
Builder setLinMax(com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
Builder setBoolAnd(com.google.ortools.sat.BoolArgumentProto value)
Builder mergeNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value)
Builder setAutomaton(com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue)
Builder setBoolAnd(com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
Builder setBoolOr(com.google.ortools.sat.BoolArgumentProto value)
Builder mergeDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value)
Builder mergeIntProd(com.google.ortools.sat.LinearArgumentProto value)
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntModOrBuilder()
Builder mergeIntMod(com.google.ortools.sat.LinearArgumentProto value)
com.google.ortools.sat.BoolArgumentProto.Builder getExactlyOneBuilder()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder()
com.google.ortools.sat.TableConstraintProto getTable()
com.google.ortools.sat.CircuitConstraintProto.Builder getCircuitBuilder()
Builder setCircuit(com.google.ortools.sat.CircuitConstraintProto value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder()
com.google.ortools.sat.BoolArgumentProto.Builder getBoolOrBuilder()
com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder()
Builder setNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value)
com.google.ortools.sat.ConstraintProto getDefaultInstanceForType()
Builder setAtMostOne(com.google.ortools.sat.BoolArgumentProto value)
Builder mergeExactlyOne(com.google.ortools.sat.BoolArgumentProto value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.sat.LinearArgumentProto getIntDiv()
com.google.ortools.sat.AllDifferentConstraintProto.Builder getAllDiffBuilder()
Builder mergeTable(com.google.ortools.sat.TableConstraintProto value)
com.google.ortools.sat.BoolArgumentProto getBoolXor()
com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder()
com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder()
Builder setDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value)
com.google.ortools.sat.AutomatonConstraintProto getAutomaton()
com.google.ortools.sat.LinearArgumentProto getLinMax()
Builder setNameBytes(com.google.protobuf.ByteString value)
Builder setInterval(com.google.ortools.sat.IntervalConstraintProto value)
Builder setElement(com.google.ortools.sat.ElementConstraintProto value)
com.google.ortools.sat.BoolArgumentProto.Builder getBoolXorBuilder()
com.google.ortools.sat.NoOverlapConstraintProto.Builder getNoOverlapBuilder()
com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder()
com.google.ortools.sat.RoutesConstraintProto.Builder getRoutesBuilder()
Builder mergeAutomaton(com.google.ortools.sat.AutomatonConstraintProto value)
com.google.ortools.sat.ElementConstraintProto.Builder getElementBuilder()
Builder setIntProd(com.google.ortools.sat.LinearArgumentProto value)
com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D()
com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder()
Builder setCumulative(com.google.ortools.sat.CumulativeConstraintProto value)
Builder mergeReservoir(com.google.ortools.sat.ReservoirConstraintProto value)
com.google.ortools.sat.AutomatonConstraintProto.Builder getAutomatonBuilder()
Builder setInverse(com.google.ortools.sat.InverseConstraintProto.Builder builderForValue)
com.google.ortools.sat.ListOfVariablesProto getDummyConstraint()
Builder setNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue)
com.google.ortools.sat.ListOfVariablesProto.Builder getDummyConstraintBuilder()
com.google.ortools.sat.TableConstraintProto.Builder getTableBuilder()
Builder mergeAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value)
Builder setElement(com.google.ortools.sat.ElementConstraintProto.Builder builderForValue)
Builder setBoolOr(com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
Builder mergeInterval(com.google.ortools.sat.IntervalConstraintProto value)
Builder mergeBoolOr(com.google.ortools.sat.BoolArgumentProto value)
Builder mergeBoolAnd(com.google.ortools.sat.BoolArgumentProto value)
com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap()
com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder()
com.google.ortools.sat.ListOfVariablesProtoOrBuilder getDummyConstraintOrBuilder()
com.google.ortools.sat.ReservoirConstraintProto getReservoir()
com.google.ortools.sat.InverseConstraintProto getInverse()
static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(java.io.InputStream input)
com.google.protobuf.Parser< ConstraintProto > getParserForType()
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntProdOrBuilder()
com.google.ortools.sat.AutomatonConstraintProto getAutomaton()
com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.ConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.CumulativeConstraintProto getCumulative()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.sat.BoolArgumentProto getExactlyOne()
com.google.ortools.sat.BoolArgumentProto getBoolOr()
com.google.ortools.sat.LinearConstraintProto getLinear()
com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder()
static com.google.ortools.sat.ConstraintProto getDefaultInstance()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getExactlyOneOrBuilder()
static com.google.ortools.sat.ConstraintProto parseFrom(byte[] data)
com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap()
com.google.ortools.sat.TableConstraintProto getTable()
com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder()
com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder()
com.google.ortools.sat.LinearArgumentProto getIntMod()
com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder()
java.util.List< java.lang.Integer > getEnforcementLiteralList()
com.google.ortools.sat.BoolArgumentProto getBoolXor()
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder()
com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder()
static com.google.ortools.sat.ConstraintProto parseFrom(java.nio.ByteBuffer data)
boolean equals(final java.lang.Object obj)
static com.google.ortools.sat.ConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntDivOrBuilder()
com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder()
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntModOrBuilder()
com.google.ortools.sat.IntervalConstraintProto getInterval()
com.google.ortools.sat.AllDifferentConstraintProto getAllDiff()
static com.google.ortools.sat.ConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static Builder newBuilder(com.google.ortools.sat.ConstraintProto prototype)
com.google.ortools.sat.CircuitConstraintProto getCircuit()
static com.google.protobuf.Parser< ConstraintProto > parser()
com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D()
com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder()
com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder()
com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder()
com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder()
static com.google.ortools.sat.ConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder()
static com.google.ortools.sat.ConstraintProto parseFrom(com.google.protobuf.ByteString data)
com.google.ortools.sat.ListOfVariablesProtoOrBuilder getDummyConstraintOrBuilder()
static com.google.ortools.sat.ConstraintProto parseFrom(java.io.InputStream input)
com.google.ortools.sat.BoolArgumentProto getBoolAnd()
com.google.ortools.sat.RoutesConstraintProto getRoutes()
com.google.ortools.sat.ConstraintProto getDefaultInstanceForType()
com.google.ortools.sat.LinearArgumentProto getLinMax()
com.google.ortools.sat.LinearArgumentProto getIntProd()
com.google.ortools.sat.BoolArgumentProto getAtMostOne()
com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder()
com.google.protobuf.ByteString getNameBytes()
static com.google.ortools.sat.ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.ElementConstraintProto getElement()
com.google.ortools.sat.LinearArgumentProto getIntDiv()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder()
com.google.ortools.sat.ListOfVariablesProto getDummyConstraint()