Google OR-Tools v9.14
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.31.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= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 ConstraintProto.class.getName());
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;
381 @java.lang.Override
382 public boolean hasAtMostOne() {
383 return constraintCase_ == 26;
384 }
385
403 @java.lang.Override
405 if (constraintCase_ == 26) {
406 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
407 }
408 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
409 }
410
427 @java.lang.Override
429 if (constraintCase_ == 26) {
430 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
431 }
432 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
433 }
434
435 public static final int EXACTLY_ONE_FIELD_NUMBER = 29;
455 @java.lang.Override
456 public boolean hasExactlyOne() {
457 return constraintCase_ == 29;
458 }
459
478 @java.lang.Override
480 if (constraintCase_ == 29) {
481 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
482 }
483 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
484 }
485
503 @java.lang.Override
505 if (constraintCase_ == 29) {
506 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
507 }
508 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
509 }
510
511 public static final int BOOL_XOR_FIELD_NUMBER = 5;
520 @java.lang.Override
521 public boolean hasBoolXor() {
522 return constraintCase_ == 5;
523 }
524
532 @java.lang.Override
534 if (constraintCase_ == 5) {
535 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
536 }
537 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
538 }
539
546 @java.lang.Override
548 if (constraintCase_ == 5) {
549 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
550 }
551 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
552 }
553
554 public static final int INT_DIV_FIELD_NUMBER = 7;
569 @java.lang.Override
570 public boolean hasIntDiv() {
571 return constraintCase_ == 7;
572 }
573
587 @java.lang.Override
589 if (constraintCase_ == 7) {
590 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
591 }
592 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
593 }
594
607 @java.lang.Override
609 if (constraintCase_ == 7) {
610 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
611 }
612 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
613 }
614
615 public static final int INT_MOD_FIELD_NUMBER = 8;
626 @java.lang.Override
627 public boolean hasIntMod() {
628 return constraintCase_ == 8;
629 }
630
640 @java.lang.Override
642 if (constraintCase_ == 8) {
643 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
644 }
645 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
646 }
647
656 @java.lang.Override
658 if (constraintCase_ == 8) {
659 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
660 }
661 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
662 }
663
664 public static final int INT_PROD_FIELD_NUMBER = 11;
680 @java.lang.Override
681 public boolean hasIntProd() {
682 return constraintCase_ == 11;
683 }
684
699 @java.lang.Override
701 if (constraintCase_ == 11) {
702 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
703 }
704 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
705 }
706
720 @java.lang.Override
722 if (constraintCase_ == 11) {
723 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
724 }
725 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
726 }
727
728 public static final int LIN_MAX_FIELD_NUMBER = 27;
739 @java.lang.Override
740 public boolean hasLinMax() {
741 return constraintCase_ == 27;
742 }
743
753 @java.lang.Override
755 if (constraintCase_ == 27) {
756 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
757 }
758 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
759 }
760
769 @java.lang.Override
771 if (constraintCase_ == 27) {
772 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
773 }
774 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
775 }
776
777 public static final int LINEAR_FIELD_NUMBER = 12;
787 @java.lang.Override
788 public boolean hasLinear() {
789 return constraintCase_ == 12;
790 }
791
800 @java.lang.Override
802 if (constraintCase_ == 12) {
803 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
804 }
805 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
806 }
807
815 @java.lang.Override
817 if (constraintCase_ == 12) {
818 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
819 }
820 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
821 }
822
823 public static final int ALL_DIFF_FIELD_NUMBER = 13;
832 @java.lang.Override
833 public boolean hasAllDiff() {
834 return constraintCase_ == 13;
835 }
836
844 @java.lang.Override
846 if (constraintCase_ == 13) {
847 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
848 }
849 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
850 }
851
858 @java.lang.Override
860 if (constraintCase_ == 13) {
861 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
862 }
863 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
864 }
865
866 public static final int ELEMENT_FIELD_NUMBER = 14;
876 @java.lang.Override
877 public boolean hasElement() {
878 return constraintCase_ == 14;
879 }
880
889 @java.lang.Override
891 if (constraintCase_ == 14) {
892 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
893 }
894 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
895 }
896
904 @java.lang.Override
906 if (constraintCase_ == 14) {
907 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
908 }
909 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
910 }
911
912 public static final int CIRCUIT_FIELD_NUMBER = 15;
922 @java.lang.Override
923 public boolean hasCircuit() {
924 return constraintCase_ == 15;
925 }
926
935 @java.lang.Override
937 if (constraintCase_ == 15) {
938 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
939 }
940 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
941 }
942
950 @java.lang.Override
952 if (constraintCase_ == 15) {
953 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
954 }
955 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
956 }
957
958 public static final int ROUTES_FIELD_NUMBER = 23;
967 @java.lang.Override
968 public boolean hasRoutes() {
969 return constraintCase_ == 23;
970 }
971
979 @java.lang.Override
981 if (constraintCase_ == 23) {
982 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
983 }
984 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
985 }
986
993 @java.lang.Override
995 if (constraintCase_ == 23) {
996 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
997 }
998 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
999 }
1000
1001 public static final int TABLE_FIELD_NUMBER = 16;
1011 @java.lang.Override
1012 public boolean hasTable() {
1013 return constraintCase_ == 16;
1014 }
1015
1024 @java.lang.Override
1026 if (constraintCase_ == 16) {
1027 return (com.google.ortools.sat.TableConstraintProto) constraint_;
1028 }
1029 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
1030 }
1031
1039 @java.lang.Override
1041 if (constraintCase_ == 16) {
1042 return (com.google.ortools.sat.TableConstraintProto) constraint_;
1043 }
1044 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
1045 }
1046
1047 public static final int AUTOMATON_FIELD_NUMBER = 17;
1057 @java.lang.Override
1058 public boolean hasAutomaton() {
1059 return constraintCase_ == 17;
1060 }
1061
1070 @java.lang.Override
1072 if (constraintCase_ == 17) {
1073 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
1074 }
1075 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
1076 }
1077
1085 @java.lang.Override
1087 if (constraintCase_ == 17) {
1088 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
1089 }
1090 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
1091 }
1092
1093 public static final int INVERSE_FIELD_NUMBER = 18;
1103 @java.lang.Override
1104 public boolean hasInverse() {
1105 return constraintCase_ == 18;
1106 }
1107
1116 @java.lang.Override
1118 if (constraintCase_ == 18) {
1119 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
1120 }
1121 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
1122 }
1123
1131 @java.lang.Override
1133 if (constraintCase_ == 18) {
1134 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
1135 }
1136 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
1137 }
1138
1139 public static final int RESERVOIR_FIELD_NUMBER = 24;
1150 @java.lang.Override
1151 public boolean hasReservoir() {
1152 return constraintCase_ == 24;
1153 }
1154
1164 @java.lang.Override
1166 if (constraintCase_ == 24) {
1167 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
1168 }
1169 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
1170 }
1171
1180 @java.lang.Override
1182 if (constraintCase_ == 24) {
1183 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
1184 }
1185 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
1186 }
1187
1188 public static final int INTERVAL_FIELD_NUMBER = 19;
1198 @java.lang.Override
1199 public boolean hasInterval() {
1200 return constraintCase_ == 19;
1201 }
1202
1211 @java.lang.Override
1213 if (constraintCase_ == 19) {
1214 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
1215 }
1216 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
1217 }
1218
1226 @java.lang.Override
1228 if (constraintCase_ == 19) {
1229 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
1230 }
1231 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
1232 }
1233
1234 public static final int NO_OVERLAP_FIELD_NUMBER = 20;
1245 @java.lang.Override
1246 public boolean hasNoOverlap() {
1247 return constraintCase_ == 20;
1248 }
1249
1259 @java.lang.Override
1261 if (constraintCase_ == 20) {
1262 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
1263 }
1264 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
1265 }
1266
1275 @java.lang.Override
1277 if (constraintCase_ == 20) {
1278 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
1279 }
1280 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
1281 }
1282
1283 public static final int NO_OVERLAP_2D_FIELD_NUMBER = 21;
1292 @java.lang.Override
1293 public boolean hasNoOverlap2D() {
1294 return constraintCase_ == 21;
1295 }
1296
1304 @java.lang.Override
1306 if (constraintCase_ == 21) {
1307 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
1308 }
1309 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
1310 }
1311
1318 @java.lang.Override
1320 if (constraintCase_ == 21) {
1321 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
1322 }
1323 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
1324 }
1325
1326 public static final int CUMULATIVE_FIELD_NUMBER = 22;
1337 @java.lang.Override
1338 public boolean hasCumulative() {
1339 return constraintCase_ == 22;
1340 }
1341
1351 @java.lang.Override
1353 if (constraintCase_ == 22) {
1354 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
1355 }
1356 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
1357 }
1358
1367 @java.lang.Override
1369 if (constraintCase_ == 22) {
1370 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
1371 }
1372 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
1373 }
1374
1375 public static final int DUMMY_CONSTRAINT_FIELD_NUMBER = 30;
1385 @java.lang.Override
1386 public boolean hasDummyConstraint() {
1387 return constraintCase_ == 30;
1388 }
1389
1398 @java.lang.Override
1400 if (constraintCase_ == 30) {
1401 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
1402 }
1403 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
1404 }
1405
1413 @java.lang.Override
1415 if (constraintCase_ == 30) {
1416 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
1417 }
1418 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
1419 }
1420
1421 private byte memoizedIsInitialized = -1;
1422 @java.lang.Override
1423 public final boolean isInitialized() {
1424 byte isInitialized = memoizedIsInitialized;
1425 if (isInitialized == 1) return true;
1426 if (isInitialized == 0) return false;
1427
1428 memoizedIsInitialized = 1;
1429 return true;
1430 }
1431
1432 @java.lang.Override
1433 public void writeTo(com.google.protobuf.CodedOutputStream output)
1434 throws java.io.IOException {
1436 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
1437 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
1438 }
1439 if (getEnforcementLiteralList().size() > 0) {
1440 output.writeUInt32NoTag(18);
1441 output.writeUInt32NoTag(enforcementLiteralMemoizedSerializedSize);
1442 }
1443 for (int i = 0; i < enforcementLiteral_.size(); i++) {
1444 output.writeInt32NoTag(enforcementLiteral_.getInt(i));
1445 }
1446 if (constraintCase_ == 3) {
1447 output.writeMessage(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1448 }
1449 if (constraintCase_ == 4) {
1450 output.writeMessage(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1451 }
1452 if (constraintCase_ == 5) {
1453 output.writeMessage(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1454 }
1455 if (constraintCase_ == 7) {
1456 output.writeMessage(7, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1457 }
1458 if (constraintCase_ == 8) {
1459 output.writeMessage(8, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1460 }
1461 if (constraintCase_ == 11) {
1462 output.writeMessage(11, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1463 }
1464 if (constraintCase_ == 12) {
1465 output.writeMessage(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
1466 }
1467 if (constraintCase_ == 13) {
1468 output.writeMessage(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
1469 }
1470 if (constraintCase_ == 14) {
1471 output.writeMessage(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
1472 }
1473 if (constraintCase_ == 15) {
1474 output.writeMessage(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
1475 }
1476 if (constraintCase_ == 16) {
1477 output.writeMessage(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
1478 }
1479 if (constraintCase_ == 17) {
1480 output.writeMessage(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
1481 }
1482 if (constraintCase_ == 18) {
1483 output.writeMessage(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
1484 }
1485 if (constraintCase_ == 19) {
1486 output.writeMessage(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
1487 }
1488 if (constraintCase_ == 20) {
1489 output.writeMessage(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
1490 }
1491 if (constraintCase_ == 21) {
1492 output.writeMessage(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
1493 }
1494 if (constraintCase_ == 22) {
1495 output.writeMessage(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
1496 }
1497 if (constraintCase_ == 23) {
1498 output.writeMessage(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
1499 }
1500 if (constraintCase_ == 24) {
1501 output.writeMessage(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
1502 }
1503 if (constraintCase_ == 26) {
1504 output.writeMessage(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1505 }
1506 if (constraintCase_ == 27) {
1507 output.writeMessage(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1508 }
1509 if (constraintCase_ == 29) {
1510 output.writeMessage(29, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1511 }
1512 if (constraintCase_ == 30) {
1513 output.writeMessage(30, (com.google.ortools.sat.ListOfVariablesProto) constraint_);
1514 }
1515 getUnknownFields().writeTo(output);
1516 }
1517
1518 @java.lang.Override
1519 public int getSerializedSize() {
1520 int size = memoizedSize;
1521 if (size != -1) return size;
1522
1523 size = 0;
1524 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
1525 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
1526 }
1527 {
1528 int dataSize = 0;
1529 for (int i = 0; i < enforcementLiteral_.size(); i++) {
1530 dataSize += com.google.protobuf.CodedOutputStream
1531 .computeInt32SizeNoTag(enforcementLiteral_.getInt(i));
1532 }
1533 size += dataSize;
1534 if (!getEnforcementLiteralList().isEmpty()) {
1535 size += 1;
1536 size += com.google.protobuf.CodedOutputStream
1537 .computeInt32SizeNoTag(dataSize);
1538 }
1539 enforcementLiteralMemoizedSerializedSize = dataSize;
1540 }
1541 if (constraintCase_ == 3) {
1542 size += com.google.protobuf.CodedOutputStream
1543 .computeMessageSize(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1544 }
1545 if (constraintCase_ == 4) {
1546 size += com.google.protobuf.CodedOutputStream
1547 .computeMessageSize(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1548 }
1549 if (constraintCase_ == 5) {
1550 size += com.google.protobuf.CodedOutputStream
1551 .computeMessageSize(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1552 }
1553 if (constraintCase_ == 7) {
1554 size += com.google.protobuf.CodedOutputStream
1555 .computeMessageSize(7, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1556 }
1557 if (constraintCase_ == 8) {
1558 size += com.google.protobuf.CodedOutputStream
1559 .computeMessageSize(8, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1560 }
1561 if (constraintCase_ == 11) {
1562 size += com.google.protobuf.CodedOutputStream
1563 .computeMessageSize(11, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1564 }
1565 if (constraintCase_ == 12) {
1566 size += com.google.protobuf.CodedOutputStream
1567 .computeMessageSize(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
1568 }
1569 if (constraintCase_ == 13) {
1570 size += com.google.protobuf.CodedOutputStream
1571 .computeMessageSize(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
1572 }
1573 if (constraintCase_ == 14) {
1574 size += com.google.protobuf.CodedOutputStream
1575 .computeMessageSize(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
1576 }
1577 if (constraintCase_ == 15) {
1578 size += com.google.protobuf.CodedOutputStream
1579 .computeMessageSize(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
1580 }
1581 if (constraintCase_ == 16) {
1582 size += com.google.protobuf.CodedOutputStream
1583 .computeMessageSize(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
1584 }
1585 if (constraintCase_ == 17) {
1586 size += com.google.protobuf.CodedOutputStream
1587 .computeMessageSize(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
1588 }
1589 if (constraintCase_ == 18) {
1590 size += com.google.protobuf.CodedOutputStream
1591 .computeMessageSize(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
1592 }
1593 if (constraintCase_ == 19) {
1594 size += com.google.protobuf.CodedOutputStream
1595 .computeMessageSize(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
1596 }
1597 if (constraintCase_ == 20) {
1598 size += com.google.protobuf.CodedOutputStream
1599 .computeMessageSize(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
1600 }
1601 if (constraintCase_ == 21) {
1602 size += com.google.protobuf.CodedOutputStream
1603 .computeMessageSize(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
1604 }
1605 if (constraintCase_ == 22) {
1606 size += com.google.protobuf.CodedOutputStream
1607 .computeMessageSize(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
1608 }
1609 if (constraintCase_ == 23) {
1610 size += com.google.protobuf.CodedOutputStream
1611 .computeMessageSize(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
1612 }
1613 if (constraintCase_ == 24) {
1614 size += com.google.protobuf.CodedOutputStream
1615 .computeMessageSize(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
1616 }
1617 if (constraintCase_ == 26) {
1618 size += com.google.protobuf.CodedOutputStream
1619 .computeMessageSize(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1620 }
1621 if (constraintCase_ == 27) {
1622 size += com.google.protobuf.CodedOutputStream
1623 .computeMessageSize(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
1624 }
1625 if (constraintCase_ == 29) {
1626 size += com.google.protobuf.CodedOutputStream
1627 .computeMessageSize(29, (com.google.ortools.sat.BoolArgumentProto) constraint_);
1628 }
1629 if (constraintCase_ == 30) {
1630 size += com.google.protobuf.CodedOutputStream
1631 .computeMessageSize(30, (com.google.ortools.sat.ListOfVariablesProto) constraint_);
1632 }
1633 size += getUnknownFields().getSerializedSize();
1634 memoizedSize = size;
1635 return size;
1636 }
1637
1638 @java.lang.Override
1639 public boolean equals(final java.lang.Object obj) {
1640 if (obj == this) {
1641 return true;
1642 }
1643 if (!(obj instanceof com.google.ortools.sat.ConstraintProto)) {
1644 return super.equals(obj);
1645 }
1646 com.google.ortools.sat.ConstraintProto other = (com.google.ortools.sat.ConstraintProto) obj;
1647
1648 if (!getName()
1649 .equals(other.getName())) return false;
1651 .equals(other.getEnforcementLiteralList())) return false;
1652 if (!getConstraintCase().equals(other.getConstraintCase())) return false;
1653 switch (constraintCase_) {
1654 case 3:
1655 if (!getBoolOr()
1656 .equals(other.getBoolOr())) return false;
1657 break;
1658 case 4:
1659 if (!getBoolAnd()
1660 .equals(other.getBoolAnd())) return false;
1661 break;
1662 case 26:
1663 if (!getAtMostOne()
1664 .equals(other.getAtMostOne())) return false;
1665 break;
1666 case 29:
1667 if (!getExactlyOne()
1668 .equals(other.getExactlyOne())) return false;
1669 break;
1670 case 5:
1671 if (!getBoolXor()
1672 .equals(other.getBoolXor())) return false;
1673 break;
1674 case 7:
1675 if (!getIntDiv()
1676 .equals(other.getIntDiv())) return false;
1677 break;
1678 case 8:
1679 if (!getIntMod()
1680 .equals(other.getIntMod())) return false;
1681 break;
1682 case 11:
1683 if (!getIntProd()
1684 .equals(other.getIntProd())) return false;
1685 break;
1686 case 27:
1687 if (!getLinMax()
1688 .equals(other.getLinMax())) return false;
1689 break;
1690 case 12:
1691 if (!getLinear()
1692 .equals(other.getLinear())) return false;
1693 break;
1694 case 13:
1695 if (!getAllDiff()
1696 .equals(other.getAllDiff())) return false;
1697 break;
1698 case 14:
1699 if (!getElement()
1700 .equals(other.getElement())) return false;
1701 break;
1702 case 15:
1703 if (!getCircuit()
1704 .equals(other.getCircuit())) return false;
1705 break;
1706 case 23:
1707 if (!getRoutes()
1708 .equals(other.getRoutes())) return false;
1709 break;
1710 case 16:
1711 if (!getTable()
1712 .equals(other.getTable())) return false;
1713 break;
1714 case 17:
1715 if (!getAutomaton()
1716 .equals(other.getAutomaton())) return false;
1717 break;
1718 case 18:
1719 if (!getInverse()
1720 .equals(other.getInverse())) return false;
1721 break;
1722 case 24:
1723 if (!getReservoir()
1724 .equals(other.getReservoir())) return false;
1725 break;
1726 case 19:
1727 if (!getInterval()
1728 .equals(other.getInterval())) return false;
1729 break;
1730 case 20:
1731 if (!getNoOverlap()
1732 .equals(other.getNoOverlap())) return false;
1733 break;
1734 case 21:
1735 if (!getNoOverlap2D()
1736 .equals(other.getNoOverlap2D())) return false;
1737 break;
1738 case 22:
1739 if (!getCumulative()
1740 .equals(other.getCumulative())) return false;
1741 break;
1742 case 30:
1743 if (!getDummyConstraint()
1744 .equals(other.getDummyConstraint())) return false;
1745 break;
1746 case 0:
1747 default:
1748 }
1749 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1750 return true;
1751 }
1752
1753 @java.lang.Override
1754 public int hashCode() {
1755 if (memoizedHashCode != 0) {
1756 return memoizedHashCode;
1757 }
1758 int hash = 41;
1759 hash = (19 * hash) + getDescriptor().hashCode();
1760 hash = (37 * hash) + NAME_FIELD_NUMBER;
1761 hash = (53 * hash) + getName().hashCode();
1762 if (getEnforcementLiteralCount() > 0) {
1763 hash = (37 * hash) + ENFORCEMENT_LITERAL_FIELD_NUMBER;
1764 hash = (53 * hash) + getEnforcementLiteralList().hashCode();
1765 }
1766 switch (constraintCase_) {
1767 case 3:
1768 hash = (37 * hash) + BOOL_OR_FIELD_NUMBER;
1769 hash = (53 * hash) + getBoolOr().hashCode();
1770 break;
1771 case 4:
1772 hash = (37 * hash) + BOOL_AND_FIELD_NUMBER;
1773 hash = (53 * hash) + getBoolAnd().hashCode();
1774 break;
1775 case 26:
1776 hash = (37 * hash) + AT_MOST_ONE_FIELD_NUMBER;
1777 hash = (53 * hash) + getAtMostOne().hashCode();
1778 break;
1779 case 29:
1780 hash = (37 * hash) + EXACTLY_ONE_FIELD_NUMBER;
1781 hash = (53 * hash) + getExactlyOne().hashCode();
1782 break;
1783 case 5:
1784 hash = (37 * hash) + BOOL_XOR_FIELD_NUMBER;
1785 hash = (53 * hash) + getBoolXor().hashCode();
1786 break;
1787 case 7:
1788 hash = (37 * hash) + INT_DIV_FIELD_NUMBER;
1789 hash = (53 * hash) + getIntDiv().hashCode();
1790 break;
1791 case 8:
1792 hash = (37 * hash) + INT_MOD_FIELD_NUMBER;
1793 hash = (53 * hash) + getIntMod().hashCode();
1794 break;
1795 case 11:
1796 hash = (37 * hash) + INT_PROD_FIELD_NUMBER;
1797 hash = (53 * hash) + getIntProd().hashCode();
1798 break;
1799 case 27:
1800 hash = (37 * hash) + LIN_MAX_FIELD_NUMBER;
1801 hash = (53 * hash) + getLinMax().hashCode();
1802 break;
1803 case 12:
1804 hash = (37 * hash) + LINEAR_FIELD_NUMBER;
1805 hash = (53 * hash) + getLinear().hashCode();
1806 break;
1807 case 13:
1808 hash = (37 * hash) + ALL_DIFF_FIELD_NUMBER;
1809 hash = (53 * hash) + getAllDiff().hashCode();
1810 break;
1811 case 14:
1812 hash = (37 * hash) + ELEMENT_FIELD_NUMBER;
1813 hash = (53 * hash) + getElement().hashCode();
1814 break;
1815 case 15:
1816 hash = (37 * hash) + CIRCUIT_FIELD_NUMBER;
1817 hash = (53 * hash) + getCircuit().hashCode();
1818 break;
1819 case 23:
1820 hash = (37 * hash) + ROUTES_FIELD_NUMBER;
1821 hash = (53 * hash) + getRoutes().hashCode();
1822 break;
1823 case 16:
1824 hash = (37 * hash) + TABLE_FIELD_NUMBER;
1825 hash = (53 * hash) + getTable().hashCode();
1826 break;
1827 case 17:
1828 hash = (37 * hash) + AUTOMATON_FIELD_NUMBER;
1829 hash = (53 * hash) + getAutomaton().hashCode();
1830 break;
1831 case 18:
1832 hash = (37 * hash) + INVERSE_FIELD_NUMBER;
1833 hash = (53 * hash) + getInverse().hashCode();
1834 break;
1835 case 24:
1836 hash = (37 * hash) + RESERVOIR_FIELD_NUMBER;
1837 hash = (53 * hash) + getReservoir().hashCode();
1838 break;
1839 case 19:
1840 hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
1841 hash = (53 * hash) + getInterval().hashCode();
1842 break;
1843 case 20:
1844 hash = (37 * hash) + NO_OVERLAP_FIELD_NUMBER;
1845 hash = (53 * hash) + getNoOverlap().hashCode();
1846 break;
1847 case 21:
1848 hash = (37 * hash) + NO_OVERLAP_2D_FIELD_NUMBER;
1849 hash = (53 * hash) + getNoOverlap2D().hashCode();
1850 break;
1851 case 22:
1852 hash = (37 * hash) + CUMULATIVE_FIELD_NUMBER;
1853 hash = (53 * hash) + getCumulative().hashCode();
1854 break;
1855 case 30:
1856 hash = (37 * hash) + DUMMY_CONSTRAINT_FIELD_NUMBER;
1857 hash = (53 * hash) + getDummyConstraint().hashCode();
1858 break;
1859 case 0:
1860 default:
1861 }
1862 hash = (29 * hash) + getUnknownFields().hashCode();
1863 memoizedHashCode = hash;
1864 return hash;
1865 }
1866
1868 java.nio.ByteBuffer data)
1869 throws com.google.protobuf.InvalidProtocolBufferException {
1870 return PARSER.parseFrom(data);
1871 }
1873 java.nio.ByteBuffer data,
1874 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1875 throws com.google.protobuf.InvalidProtocolBufferException {
1876 return PARSER.parseFrom(data, extensionRegistry);
1877 }
1879 com.google.protobuf.ByteString data)
1880 throws com.google.protobuf.InvalidProtocolBufferException {
1881 return PARSER.parseFrom(data);
1882 }
1884 com.google.protobuf.ByteString data,
1885 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1886 throws com.google.protobuf.InvalidProtocolBufferException {
1887 return PARSER.parseFrom(data, extensionRegistry);
1888 }
1890 throws com.google.protobuf.InvalidProtocolBufferException {
1891 return PARSER.parseFrom(data);
1892 }
1894 byte[] data,
1895 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1896 throws com.google.protobuf.InvalidProtocolBufferException {
1897 return PARSER.parseFrom(data, extensionRegistry);
1898 }
1899 public static com.google.ortools.sat.ConstraintProto parseFrom(java.io.InputStream input)
1900 throws java.io.IOException {
1901 return com.google.protobuf.GeneratedMessage
1902 .parseWithIOException(PARSER, input);
1903 }
1905 java.io.InputStream input,
1906 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1907 throws java.io.IOException {
1908 return com.google.protobuf.GeneratedMessage
1909 .parseWithIOException(PARSER, input, extensionRegistry);
1910 }
1911
1912 public static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(java.io.InputStream input)
1913 throws java.io.IOException {
1914 return com.google.protobuf.GeneratedMessage
1915 .parseDelimitedWithIOException(PARSER, input);
1916 }
1917
1919 java.io.InputStream input,
1920 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1921 throws java.io.IOException {
1922 return com.google.protobuf.GeneratedMessage
1923 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1924 }
1926 com.google.protobuf.CodedInputStream input)
1927 throws java.io.IOException {
1928 return com.google.protobuf.GeneratedMessage
1929 .parseWithIOException(PARSER, input);
1930 }
1932 com.google.protobuf.CodedInputStream input,
1933 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1934 throws java.io.IOException {
1935 return com.google.protobuf.GeneratedMessage
1936 .parseWithIOException(PARSER, input, extensionRegistry);
1937 }
1938
1939 @java.lang.Override
1940 public Builder newBuilderForType() { return newBuilder(); }
1941 public static Builder newBuilder() {
1942 return DEFAULT_INSTANCE.toBuilder();
1943 }
1944 public static Builder newBuilder(com.google.ortools.sat.ConstraintProto prototype) {
1945 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1946 }
1947 @java.lang.Override
1949 return this == DEFAULT_INSTANCE
1950 ? new Builder() : new Builder().mergeFrom(this);
1951 }
1952
1953 @java.lang.Override
1955 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1956 Builder builder = new Builder(parent);
1957 return builder;
1958 }
1959
1966 public static final class Builder extends
1967 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
1968 // @@protoc_insertion_point(builder_implements:operations_research.sat.ConstraintProto)
1970 public static final com.google.protobuf.Descriptors.Descriptor
1972 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
1973 }
1974
1975 @java.lang.Override
1976 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1978 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_fieldAccessorTable
1979 .ensureFieldAccessorsInitialized(
1980 com.google.ortools.sat.ConstraintProto.class, com.google.ortools.sat.ConstraintProto.Builder.class);
1981 }
1982
1983 // Construct using com.google.ortools.sat.ConstraintProto.newBuilder()
1984 private Builder() {
1985
1986 }
1987
1988 private Builder(
1989 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1990 super(parent);
1991
1992 }
1993 @java.lang.Override
1994 public Builder clear() {
1995 super.clear();
1996 bitField0_ = 0;
1997 name_ = "";
1998 enforcementLiteral_ = emptyIntList();
1999 if (boolOrBuilder_ != null) {
2000 boolOrBuilder_.clear();
2001 }
2002 if (boolAndBuilder_ != null) {
2003 boolAndBuilder_.clear();
2004 }
2005 if (atMostOneBuilder_ != null) {
2006 atMostOneBuilder_.clear();
2007 }
2008 if (exactlyOneBuilder_ != null) {
2009 exactlyOneBuilder_.clear();
2010 }
2011 if (boolXorBuilder_ != null) {
2012 boolXorBuilder_.clear();
2013 }
2014 if (intDivBuilder_ != null) {
2015 intDivBuilder_.clear();
2016 }
2017 if (intModBuilder_ != null) {
2018 intModBuilder_.clear();
2019 }
2020 if (intProdBuilder_ != null) {
2021 intProdBuilder_.clear();
2022 }
2023 if (linMaxBuilder_ != null) {
2024 linMaxBuilder_.clear();
2025 }
2026 if (linearBuilder_ != null) {
2027 linearBuilder_.clear();
2028 }
2029 if (allDiffBuilder_ != null) {
2030 allDiffBuilder_.clear();
2031 }
2032 if (elementBuilder_ != null) {
2033 elementBuilder_.clear();
2034 }
2035 if (circuitBuilder_ != null) {
2036 circuitBuilder_.clear();
2037 }
2038 if (routesBuilder_ != null) {
2039 routesBuilder_.clear();
2040 }
2041 if (tableBuilder_ != null) {
2042 tableBuilder_.clear();
2043 }
2044 if (automatonBuilder_ != null) {
2045 automatonBuilder_.clear();
2046 }
2047 if (inverseBuilder_ != null) {
2048 inverseBuilder_.clear();
2049 }
2050 if (reservoirBuilder_ != null) {
2051 reservoirBuilder_.clear();
2052 }
2053 if (intervalBuilder_ != null) {
2054 intervalBuilder_.clear();
2055 }
2056 if (noOverlapBuilder_ != null) {
2057 noOverlapBuilder_.clear();
2058 }
2059 if (noOverlap2DBuilder_ != null) {
2060 noOverlap2DBuilder_.clear();
2061 }
2062 if (cumulativeBuilder_ != null) {
2063 cumulativeBuilder_.clear();
2064 }
2065 if (dummyConstraintBuilder_ != null) {
2066 dummyConstraintBuilder_.clear();
2067 }
2068 constraintCase_ = 0;
2069 constraint_ = null;
2070 return this;
2071 }
2072
2073 @java.lang.Override
2074 public com.google.protobuf.Descriptors.Descriptor
2076 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
2077 }
2078
2079 @java.lang.Override
2081 return com.google.ortools.sat.ConstraintProto.getDefaultInstance();
2082 }
2083
2084 @java.lang.Override
2087 if (!result.isInitialized()) {
2088 throw newUninitializedMessageException(result);
2089 }
2090 return result;
2091 }
2092
2093 @java.lang.Override
2095 com.google.ortools.sat.ConstraintProto result = new com.google.ortools.sat.ConstraintProto(this);
2096 if (bitField0_ != 0) { buildPartial0(result); }
2097 buildPartialOneofs(result);
2098 onBuilt();
2099 return result;
2100 }
2101
2102 private void buildPartial0(com.google.ortools.sat.ConstraintProto result) {
2103 int from_bitField0_ = bitField0_;
2104 if (((from_bitField0_ & 0x00000001) != 0)) {
2105 result.name_ = name_;
2106 }
2107 if (((from_bitField0_ & 0x00000002) != 0)) {
2108 enforcementLiteral_.makeImmutable();
2109 result.enforcementLiteral_ = enforcementLiteral_;
2110 }
2111 }
2112
2113 private void buildPartialOneofs(com.google.ortools.sat.ConstraintProto result) {
2114 result.constraintCase_ = constraintCase_;
2115 result.constraint_ = this.constraint_;
2116 if (constraintCase_ == 3 &&
2117 boolOrBuilder_ != null) {
2118 result.constraint_ = boolOrBuilder_.build();
2119 }
2120 if (constraintCase_ == 4 &&
2121 boolAndBuilder_ != null) {
2122 result.constraint_ = boolAndBuilder_.build();
2123 }
2124 if (constraintCase_ == 26 &&
2125 atMostOneBuilder_ != null) {
2126 result.constraint_ = atMostOneBuilder_.build();
2127 }
2128 if (constraintCase_ == 29 &&
2129 exactlyOneBuilder_ != null) {
2130 result.constraint_ = exactlyOneBuilder_.build();
2131 }
2132 if (constraintCase_ == 5 &&
2133 boolXorBuilder_ != null) {
2134 result.constraint_ = boolXorBuilder_.build();
2135 }
2136 if (constraintCase_ == 7 &&
2137 intDivBuilder_ != null) {
2138 result.constraint_ = intDivBuilder_.build();
2139 }
2140 if (constraintCase_ == 8 &&
2141 intModBuilder_ != null) {
2142 result.constraint_ = intModBuilder_.build();
2143 }
2144 if (constraintCase_ == 11 &&
2145 intProdBuilder_ != null) {
2146 result.constraint_ = intProdBuilder_.build();
2147 }
2148 if (constraintCase_ == 27 &&
2149 linMaxBuilder_ != null) {
2150 result.constraint_ = linMaxBuilder_.build();
2151 }
2152 if (constraintCase_ == 12 &&
2153 linearBuilder_ != null) {
2154 result.constraint_ = linearBuilder_.build();
2155 }
2156 if (constraintCase_ == 13 &&
2157 allDiffBuilder_ != null) {
2158 result.constraint_ = allDiffBuilder_.build();
2159 }
2160 if (constraintCase_ == 14 &&
2161 elementBuilder_ != null) {
2162 result.constraint_ = elementBuilder_.build();
2163 }
2164 if (constraintCase_ == 15 &&
2165 circuitBuilder_ != null) {
2166 result.constraint_ = circuitBuilder_.build();
2167 }
2168 if (constraintCase_ == 23 &&
2169 routesBuilder_ != null) {
2170 result.constraint_ = routesBuilder_.build();
2171 }
2172 if (constraintCase_ == 16 &&
2173 tableBuilder_ != null) {
2174 result.constraint_ = tableBuilder_.build();
2175 }
2176 if (constraintCase_ == 17 &&
2177 automatonBuilder_ != null) {
2178 result.constraint_ = automatonBuilder_.build();
2179 }
2180 if (constraintCase_ == 18 &&
2181 inverseBuilder_ != null) {
2182 result.constraint_ = inverseBuilder_.build();
2183 }
2184 if (constraintCase_ == 24 &&
2185 reservoirBuilder_ != null) {
2186 result.constraint_ = reservoirBuilder_.build();
2187 }
2188 if (constraintCase_ == 19 &&
2189 intervalBuilder_ != null) {
2190 result.constraint_ = intervalBuilder_.build();
2191 }
2192 if (constraintCase_ == 20 &&
2193 noOverlapBuilder_ != null) {
2194 result.constraint_ = noOverlapBuilder_.build();
2195 }
2196 if (constraintCase_ == 21 &&
2197 noOverlap2DBuilder_ != null) {
2198 result.constraint_ = noOverlap2DBuilder_.build();
2199 }
2200 if (constraintCase_ == 22 &&
2201 cumulativeBuilder_ != null) {
2202 result.constraint_ = cumulativeBuilder_.build();
2203 }
2204 if (constraintCase_ == 30 &&
2205 dummyConstraintBuilder_ != null) {
2206 result.constraint_ = dummyConstraintBuilder_.build();
2207 }
2208 }
2209
2210 @java.lang.Override
2211 public Builder mergeFrom(com.google.protobuf.Message other) {
2212 if (other instanceof com.google.ortools.sat.ConstraintProto) {
2213 return mergeFrom((com.google.ortools.sat.ConstraintProto)other);
2214 } else {
2215 super.mergeFrom(other);
2216 return this;
2217 }
2218 }
2219
2220 public Builder mergeFrom(com.google.ortools.sat.ConstraintProto other) {
2221 if (other == com.google.ortools.sat.ConstraintProto.getDefaultInstance()) return this;
2222 if (!other.getName().isEmpty()) {
2223 name_ = other.name_;
2224 bitField0_ |= 0x00000001;
2225 onChanged();
2226 }
2227 if (!other.enforcementLiteral_.isEmpty()) {
2228 if (enforcementLiteral_.isEmpty()) {
2229 enforcementLiteral_ = other.enforcementLiteral_;
2230 enforcementLiteral_.makeImmutable();
2231 bitField0_ |= 0x00000002;
2232 } else {
2233 ensureEnforcementLiteralIsMutable();
2234 enforcementLiteral_.addAll(other.enforcementLiteral_);
2235 }
2236 onChanged();
2237 }
2238 switch (other.getConstraintCase()) {
2239 case BOOL_OR: {
2240 mergeBoolOr(other.getBoolOr());
2241 break;
2242 }
2243 case BOOL_AND: {
2244 mergeBoolAnd(other.getBoolAnd());
2245 break;
2246 }
2247 case AT_MOST_ONE: {
2248 mergeAtMostOne(other.getAtMostOne());
2249 break;
2250 }
2251 case EXACTLY_ONE: {
2252 mergeExactlyOne(other.getExactlyOne());
2253 break;
2254 }
2255 case BOOL_XOR: {
2256 mergeBoolXor(other.getBoolXor());
2257 break;
2258 }
2259 case INT_DIV: {
2260 mergeIntDiv(other.getIntDiv());
2261 break;
2262 }
2263 case INT_MOD: {
2264 mergeIntMod(other.getIntMod());
2265 break;
2266 }
2267 case INT_PROD: {
2268 mergeIntProd(other.getIntProd());
2269 break;
2270 }
2271 case LIN_MAX: {
2272 mergeLinMax(other.getLinMax());
2273 break;
2274 }
2275 case LINEAR: {
2276 mergeLinear(other.getLinear());
2277 break;
2278 }
2279 case ALL_DIFF: {
2280 mergeAllDiff(other.getAllDiff());
2281 break;
2282 }
2283 case ELEMENT: {
2284 mergeElement(other.getElement());
2285 break;
2286 }
2287 case CIRCUIT: {
2288 mergeCircuit(other.getCircuit());
2289 break;
2290 }
2291 case ROUTES: {
2292 mergeRoutes(other.getRoutes());
2293 break;
2294 }
2295 case TABLE: {
2296 mergeTable(other.getTable());
2297 break;
2298 }
2299 case AUTOMATON: {
2300 mergeAutomaton(other.getAutomaton());
2301 break;
2302 }
2303 case INVERSE: {
2304 mergeInverse(other.getInverse());
2305 break;
2306 }
2307 case RESERVOIR: {
2308 mergeReservoir(other.getReservoir());
2309 break;
2310 }
2311 case INTERVAL: {
2312 mergeInterval(other.getInterval());
2313 break;
2314 }
2315 case NO_OVERLAP: {
2316 mergeNoOverlap(other.getNoOverlap());
2317 break;
2318 }
2319 case NO_OVERLAP_2D: {
2320 mergeNoOverlap2D(other.getNoOverlap2D());
2321 break;
2322 }
2323 case CUMULATIVE: {
2324 mergeCumulative(other.getCumulative());
2325 break;
2326 }
2327 case DUMMY_CONSTRAINT: {
2328 mergeDummyConstraint(other.getDummyConstraint());
2329 break;
2330 }
2331 case CONSTRAINT_NOT_SET: {
2332 break;
2333 }
2334 }
2335 this.mergeUnknownFields(other.getUnknownFields());
2336 onChanged();
2337 return this;
2338 }
2339
2340 @java.lang.Override
2341 public final boolean isInitialized() {
2342 return true;
2343 }
2344
2345 @java.lang.Override
2346 public Builder mergeFrom(
2347 com.google.protobuf.CodedInputStream input,
2348 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2349 throws java.io.IOException {
2350 if (extensionRegistry == null) {
2351 throw new java.lang.NullPointerException();
2352 }
2353 try {
2354 boolean done = false;
2355 while (!done) {
2356 int tag = input.readTag();
2357 switch (tag) {
2358 case 0:
2359 done = true;
2360 break;
2361 case 10: {
2362 name_ = input.readStringRequireUtf8();
2363 bitField0_ |= 0x00000001;
2364 break;
2365 } // case 10
2366 case 16: {
2367 int v = input.readInt32();
2368 ensureEnforcementLiteralIsMutable();
2369 enforcementLiteral_.addInt(v);
2370 break;
2371 } // case 16
2372 case 18: {
2373 int length = input.readRawVarint32();
2374 int limit = input.pushLimit(length);
2375 ensureEnforcementLiteralIsMutable();
2376 while (input.getBytesUntilLimit() > 0) {
2377 enforcementLiteral_.addInt(input.readInt32());
2378 }
2379 input.popLimit(limit);
2380 break;
2381 } // case 18
2382 case 26: {
2383 input.readMessage(
2384 internalGetBoolOrFieldBuilder().getBuilder(),
2385 extensionRegistry);
2386 constraintCase_ = 3;
2387 break;
2388 } // case 26
2389 case 34: {
2390 input.readMessage(
2391 internalGetBoolAndFieldBuilder().getBuilder(),
2392 extensionRegistry);
2393 constraintCase_ = 4;
2394 break;
2395 } // case 34
2396 case 42: {
2397 input.readMessage(
2398 internalGetBoolXorFieldBuilder().getBuilder(),
2399 extensionRegistry);
2400 constraintCase_ = 5;
2401 break;
2402 } // case 42
2403 case 58: {
2404 input.readMessage(
2405 internalGetIntDivFieldBuilder().getBuilder(),
2406 extensionRegistry);
2407 constraintCase_ = 7;
2408 break;
2409 } // case 58
2410 case 66: {
2411 input.readMessage(
2412 internalGetIntModFieldBuilder().getBuilder(),
2413 extensionRegistry);
2414 constraintCase_ = 8;
2415 break;
2416 } // case 66
2417 case 90: {
2418 input.readMessage(
2419 internalGetIntProdFieldBuilder().getBuilder(),
2420 extensionRegistry);
2421 constraintCase_ = 11;
2422 break;
2423 } // case 90
2424 case 98: {
2425 input.readMessage(
2426 internalGetLinearFieldBuilder().getBuilder(),
2427 extensionRegistry);
2428 constraintCase_ = 12;
2429 break;
2430 } // case 98
2431 case 106: {
2432 input.readMessage(
2433 internalGetAllDiffFieldBuilder().getBuilder(),
2434 extensionRegistry);
2435 constraintCase_ = 13;
2436 break;
2437 } // case 106
2438 case 114: {
2439 input.readMessage(
2440 internalGetElementFieldBuilder().getBuilder(),
2441 extensionRegistry);
2442 constraintCase_ = 14;
2443 break;
2444 } // case 114
2445 case 122: {
2446 input.readMessage(
2447 internalGetCircuitFieldBuilder().getBuilder(),
2448 extensionRegistry);
2449 constraintCase_ = 15;
2450 break;
2451 } // case 122
2452 case 130: {
2453 input.readMessage(
2454 internalGetTableFieldBuilder().getBuilder(),
2455 extensionRegistry);
2456 constraintCase_ = 16;
2457 break;
2458 } // case 130
2459 case 138: {
2460 input.readMessage(
2461 internalGetAutomatonFieldBuilder().getBuilder(),
2462 extensionRegistry);
2463 constraintCase_ = 17;
2464 break;
2465 } // case 138
2466 case 146: {
2467 input.readMessage(
2468 internalGetInverseFieldBuilder().getBuilder(),
2469 extensionRegistry);
2470 constraintCase_ = 18;
2471 break;
2472 } // case 146
2473 case 154: {
2474 input.readMessage(
2475 internalGetIntervalFieldBuilder().getBuilder(),
2476 extensionRegistry);
2477 constraintCase_ = 19;
2478 break;
2479 } // case 154
2480 case 162: {
2481 input.readMessage(
2482 internalGetNoOverlapFieldBuilder().getBuilder(),
2483 extensionRegistry);
2484 constraintCase_ = 20;
2485 break;
2486 } // case 162
2487 case 170: {
2488 input.readMessage(
2489 internalGetNoOverlap2DFieldBuilder().getBuilder(),
2490 extensionRegistry);
2491 constraintCase_ = 21;
2492 break;
2493 } // case 170
2494 case 178: {
2495 input.readMessage(
2496 internalGetCumulativeFieldBuilder().getBuilder(),
2497 extensionRegistry);
2498 constraintCase_ = 22;
2499 break;
2500 } // case 178
2501 case 186: {
2502 input.readMessage(
2503 internalGetRoutesFieldBuilder().getBuilder(),
2504 extensionRegistry);
2505 constraintCase_ = 23;
2506 break;
2507 } // case 186
2508 case 194: {
2509 input.readMessage(
2510 internalGetReservoirFieldBuilder().getBuilder(),
2511 extensionRegistry);
2512 constraintCase_ = 24;
2513 break;
2514 } // case 194
2515 case 210: {
2516 input.readMessage(
2517 internalGetAtMostOneFieldBuilder().getBuilder(),
2518 extensionRegistry);
2519 constraintCase_ = 26;
2520 break;
2521 } // case 210
2522 case 218: {
2523 input.readMessage(
2524 internalGetLinMaxFieldBuilder().getBuilder(),
2525 extensionRegistry);
2526 constraintCase_ = 27;
2527 break;
2528 } // case 218
2529 case 234: {
2530 input.readMessage(
2531 internalGetExactlyOneFieldBuilder().getBuilder(),
2532 extensionRegistry);
2533 constraintCase_ = 29;
2534 break;
2535 } // case 234
2536 case 242: {
2537 input.readMessage(
2538 internalGetDummyConstraintFieldBuilder().getBuilder(),
2539 extensionRegistry);
2540 constraintCase_ = 30;
2541 break;
2542 } // case 242
2543 default: {
2544 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2545 done = true; // was an endgroup tag
2546 }
2547 break;
2548 } // default:
2549 } // switch (tag)
2550 } // while (!done)
2551 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2552 throw e.unwrapIOException();
2553 } finally {
2554 onChanged();
2555 } // finally
2556 return this;
2557 }
2558 private int constraintCase_ = 0;
2559 private java.lang.Object constraint_;
2560 public ConstraintCase
2563 constraintCase_);
2564 }
2565
2566 public Builder clearConstraint() {
2567 constraintCase_ = 0;
2568 constraint_ = null;
2569 onChanged();
2570 return this;
2571 }
2572
2573 private int bitField0_;
2574
2575 private java.lang.Object name_ = "";
2584 public java.lang.String getName() {
2585 java.lang.Object ref = name_;
2586 if (!(ref instanceof java.lang.String)) {
2587 com.google.protobuf.ByteString bs =
2588 (com.google.protobuf.ByteString) ref;
2589 java.lang.String s = bs.toStringUtf8();
2590 name_ = s;
2591 return s;
2592 } else {
2593 return (java.lang.String) ref;
2594 }
2595 }
2596
2604 public com.google.protobuf.ByteString
2606 java.lang.Object ref = name_;
2607 if (ref instanceof String) {
2608 com.google.protobuf.ByteString b =
2609 com.google.protobuf.ByteString.copyFromUtf8(
2610 (java.lang.String) ref);
2611 name_ = b;
2612 return b;
2613 } else {
2614 return (com.google.protobuf.ByteString) ref;
2615 }
2616 }
2617
2626 public Builder setName(
2627 java.lang.String value) {
2628 if (value == null) { throw new NullPointerException(); }
2629 name_ = value;
2630 bitField0_ |= 0x00000001;
2631 onChanged();
2632 return this;
2633 }
2634
2642 public Builder clearName() {
2643 name_ = getDefaultInstance().getName();
2644 bitField0_ = (bitField0_ & ~0x00000001);
2645 onChanged();
2646 return this;
2647 }
2648
2657 public Builder setNameBytes(
2658 com.google.protobuf.ByteString value) {
2659 if (value == null) { throw new NullPointerException(); }
2660 checkByteStringIsUtf8(value);
2661 name_ = value;
2662 bitField0_ |= 0x00000001;
2663 onChanged();
2664 return this;
2665 }
2666
2667 private com.google.protobuf.Internal.IntList enforcementLiteral_ = emptyIntList();
2668 private void ensureEnforcementLiteralIsMutable() {
2669 if (!enforcementLiteral_.isModifiable()) {
2670 enforcementLiteral_ = makeMutableCopy(enforcementLiteral_);
2671 }
2672 bitField0_ |= 0x00000002;
2673 }
2695 public java.util.List<java.lang.Integer>
2697 enforcementLiteral_.makeImmutable();
2698 return enforcementLiteral_;
2699 }
2700
2722 return enforcementLiteral_.size();
2723 }
2724
2746 public int getEnforcementLiteral(int index) {
2747 return enforcementLiteral_.getInt(index);
2748 }
2749
2773 int index, int value) {
2774
2775 ensureEnforcementLiteralIsMutable();
2776 enforcementLiteral_.setInt(index, value);
2777 bitField0_ |= 0x00000002;
2778 onChanged();
2779 return this;
2780 }
2781
2803 public Builder addEnforcementLiteral(int value) {
2804
2805 ensureEnforcementLiteralIsMutable();
2806 enforcementLiteral_.addInt(value);
2807 bitField0_ |= 0x00000002;
2808 onChanged();
2809 return this;
2810 }
2811
2834 java.lang.Iterable<? extends java.lang.Integer> values) {
2835 ensureEnforcementLiteralIsMutable();
2836 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2837 values, enforcementLiteral_);
2838 bitField0_ |= 0x00000002;
2839 onChanged();
2840 return this;
2841 }
2842
2863 public Builder clearEnforcementLiteral() {
2864 enforcementLiteral_ = emptyIntList();
2865 bitField0_ = (bitField0_ & ~0x00000002);
2866 onChanged();
2867 return this;
2868 }
2869
2870 private com.google.protobuf.SingleFieldBuilder<
2871 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolOrBuilder_;
2880 @java.lang.Override
2881 public boolean hasBoolOr() {
2882 return constraintCase_ == 3;
2883 }
2884
2892 @java.lang.Override
2894 if (boolOrBuilder_ == null) {
2895 if (constraintCase_ == 3) {
2896 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
2897 }
2898 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
2899 } else {
2900 if (constraintCase_ == 3) {
2901 return boolOrBuilder_.getMessage();
2902 }
2903 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
2904 }
2905 }
2906
2913 public Builder setBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
2914 if (boolOrBuilder_ == null) {
2915 if (value == null) {
2916 throw new NullPointerException();
2917 }
2918 constraint_ = value;
2919 onChanged();
2920 } else {
2921 boolOrBuilder_.setMessage(value);
2922 }
2923 constraintCase_ = 3;
2924 return this;
2925 }
2926
2933 public Builder setBoolOr(
2934 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
2935 if (boolOrBuilder_ == null) {
2936 constraint_ = builderForValue.build();
2937 onChanged();
2938 } else {
2939 boolOrBuilder_.setMessage(builderForValue.build());
2940 }
2941 constraintCase_ = 3;
2942 return this;
2943 }
2944
2951 public Builder mergeBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
2952 if (boolOrBuilder_ == null) {
2953 if (constraintCase_ == 3 &&
2954 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
2955 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
2956 .mergeFrom(value).buildPartial();
2957 } else {
2958 constraint_ = value;
2959 }
2960 onChanged();
2961 } else {
2962 if (constraintCase_ == 3) {
2963 boolOrBuilder_.mergeFrom(value);
2964 } else {
2965 boolOrBuilder_.setMessage(value);
2966 }
2967 }
2968 constraintCase_ = 3;
2969 return this;
2970 }
2971
2978 public Builder clearBoolOr() {
2979 if (boolOrBuilder_ == null) {
2980 if (constraintCase_ == 3) {
2981 constraintCase_ = 0;
2982 constraint_ = null;
2983 onChanged();
2984 }
2985 } else {
2986 if (constraintCase_ == 3) {
2987 constraintCase_ = 0;
2988 constraint_ = null;
2989 }
2990 boolOrBuilder_.clear();
2991 }
2992 return this;
2993 }
2994
3002 return internalGetBoolOrFieldBuilder().getBuilder();
3003 }
3004
3011 @java.lang.Override
3013 if ((constraintCase_ == 3) && (boolOrBuilder_ != null)) {
3014 return boolOrBuilder_.getMessageOrBuilder();
3015 } else {
3016 if (constraintCase_ == 3) {
3017 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3018 }
3019 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3020 }
3021 }
3022
3029 private com.google.protobuf.SingleFieldBuilder<
3030 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3031 internalGetBoolOrFieldBuilder() {
3032 if (boolOrBuilder_ == null) {
3033 if (!(constraintCase_ == 3)) {
3034 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3035 }
3036 boolOrBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3037 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3038 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3039 getParentForChildren(),
3040 isClean());
3041 constraint_ = null;
3042 }
3043 constraintCase_ = 3;
3044 onChanged();
3045 return boolOrBuilder_;
3046 }
3047
3048 private com.google.protobuf.SingleFieldBuilder<
3049 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolAndBuilder_;
3062 @java.lang.Override
3063 public boolean hasBoolAnd() {
3064 return constraintCase_ == 4;
3065 }
3066
3078 @java.lang.Override
3080 if (boolAndBuilder_ == null) {
3081 if (constraintCase_ == 4) {
3082 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3083 }
3084 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3085 } else {
3086 if (constraintCase_ == 4) {
3087 return boolAndBuilder_.getMessage();
3088 }
3089 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3090 }
3091 }
3092
3103 public Builder setBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
3104 if (boolAndBuilder_ == null) {
3105 if (value == null) {
3106 throw new NullPointerException();
3107 }
3108 constraint_ = value;
3109 onChanged();
3110 } else {
3111 boolAndBuilder_.setMessage(value);
3112 }
3113 constraintCase_ = 4;
3114 return this;
3115 }
3116
3127 public Builder setBoolAnd(
3128 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3129 if (boolAndBuilder_ == null) {
3130 constraint_ = builderForValue.build();
3131 onChanged();
3132 } else {
3133 boolAndBuilder_.setMessage(builderForValue.build());
3134 }
3135 constraintCase_ = 4;
3136 return this;
3137 }
3138
3149 public Builder mergeBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
3150 if (boolAndBuilder_ == null) {
3151 if (constraintCase_ == 4 &&
3152 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3153 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3154 .mergeFrom(value).buildPartial();
3155 } else {
3156 constraint_ = value;
3157 }
3158 onChanged();
3159 } else {
3160 if (constraintCase_ == 4) {
3161 boolAndBuilder_.mergeFrom(value);
3162 } else {
3163 boolAndBuilder_.setMessage(value);
3164 }
3165 }
3166 constraintCase_ = 4;
3167 return this;
3168 }
3169
3180 public Builder clearBoolAnd() {
3181 if (boolAndBuilder_ == null) {
3182 if (constraintCase_ == 4) {
3183 constraintCase_ = 0;
3184 constraint_ = null;
3185 onChanged();
3186 }
3187 } else {
3188 if (constraintCase_ == 4) {
3189 constraintCase_ = 0;
3190 constraint_ = null;
3191 }
3192 boolAndBuilder_.clear();
3193 }
3194 return this;
3195 }
3196
3208 return internalGetBoolAndFieldBuilder().getBuilder();
3209 }
3210
3221 @java.lang.Override
3223 if ((constraintCase_ == 4) && (boolAndBuilder_ != null)) {
3224 return boolAndBuilder_.getMessageOrBuilder();
3225 } else {
3226 if (constraintCase_ == 4) {
3227 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3228 }
3229 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3230 }
3231 }
3232
3243 private com.google.protobuf.SingleFieldBuilder<
3244 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3245 internalGetBoolAndFieldBuilder() {
3246 if (boolAndBuilder_ == null) {
3247 if (!(constraintCase_ == 4)) {
3248 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3249 }
3250 boolAndBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3251 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3252 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3253 getParentForChildren(),
3254 isClean());
3255 constraint_ = null;
3256 }
3257 constraintCase_ = 4;
3258 onChanged();
3259 return boolAndBuilder_;
3260 }
3261
3262 private com.google.protobuf.SingleFieldBuilder<
3263 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> atMostOneBuilder_;
3282 @java.lang.Override
3283 public boolean hasAtMostOne() {
3284 return constraintCase_ == 26;
3285 }
3286
3304 @java.lang.Override
3306 if (atMostOneBuilder_ == null) {
3307 if (constraintCase_ == 26) {
3308 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3309 }
3310 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3311 } else {
3312 if (constraintCase_ == 26) {
3313 return atMostOneBuilder_.getMessage();
3314 }
3315 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3316 }
3317 }
3318
3335 public Builder setAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
3336 if (atMostOneBuilder_ == null) {
3337 if (value == null) {
3338 throw new NullPointerException();
3339 }
3340 constraint_ = value;
3341 onChanged();
3342 } else {
3343 atMostOneBuilder_.setMessage(value);
3344 }
3345 constraintCase_ = 26;
3346 return this;
3347 }
3348
3365 public Builder setAtMostOne(
3366 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3367 if (atMostOneBuilder_ == null) {
3368 constraint_ = builderForValue.build();
3369 onChanged();
3370 } else {
3371 atMostOneBuilder_.setMessage(builderForValue.build());
3372 }
3373 constraintCase_ = 26;
3374 return this;
3375 }
3376
3393 public Builder mergeAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
3394 if (atMostOneBuilder_ == null) {
3395 if (constraintCase_ == 26 &&
3396 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3397 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3398 .mergeFrom(value).buildPartial();
3399 } else {
3400 constraint_ = value;
3401 }
3402 onChanged();
3403 } else {
3404 if (constraintCase_ == 26) {
3405 atMostOneBuilder_.mergeFrom(value);
3406 } else {
3407 atMostOneBuilder_.setMessage(value);
3408 }
3409 }
3410 constraintCase_ = 26;
3411 return this;
3412 }
3413
3430 public Builder clearAtMostOne() {
3431 if (atMostOneBuilder_ == null) {
3432 if (constraintCase_ == 26) {
3433 constraintCase_ = 0;
3434 constraint_ = null;
3435 onChanged();
3436 }
3437 } else {
3438 if (constraintCase_ == 26) {
3439 constraintCase_ = 0;
3440 constraint_ = null;
3441 }
3442 atMostOneBuilder_.clear();
3443 }
3444 return this;
3445 }
3446
3464 return internalGetAtMostOneFieldBuilder().getBuilder();
3465 }
3466
3483 @java.lang.Override
3485 if ((constraintCase_ == 26) && (atMostOneBuilder_ != null)) {
3486 return atMostOneBuilder_.getMessageOrBuilder();
3487 } else {
3488 if (constraintCase_ == 26) {
3489 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3490 }
3491 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3492 }
3493 }
3494
3511 private com.google.protobuf.SingleFieldBuilder<
3512 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3513 internalGetAtMostOneFieldBuilder() {
3514 if (atMostOneBuilder_ == null) {
3515 if (!(constraintCase_ == 26)) {
3516 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3517 }
3518 atMostOneBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3519 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3520 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3521 getParentForChildren(),
3522 isClean());
3523 constraint_ = null;
3524 }
3525 constraintCase_ = 26;
3526 onChanged();
3527 return atMostOneBuilder_;
3528 }
3529
3530 private com.google.protobuf.SingleFieldBuilder<
3531 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> exactlyOneBuilder_;
3551 @java.lang.Override
3552 public boolean hasExactlyOne() {
3553 return constraintCase_ == 29;
3554 }
3555
3574 @java.lang.Override
3576 if (exactlyOneBuilder_ == null) {
3577 if (constraintCase_ == 29) {
3578 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3579 }
3580 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3581 } else {
3582 if (constraintCase_ == 29) {
3583 return exactlyOneBuilder_.getMessage();
3584 }
3585 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3586 }
3587 }
3588
3606 public Builder setExactlyOne(com.google.ortools.sat.BoolArgumentProto value) {
3607 if (exactlyOneBuilder_ == null) {
3608 if (value == null) {
3609 throw new NullPointerException();
3610 }
3611 constraint_ = value;
3612 onChanged();
3613 } else {
3614 exactlyOneBuilder_.setMessage(value);
3615 }
3616 constraintCase_ = 29;
3617 return this;
3618 }
3619
3637 public Builder setExactlyOne(
3638 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3639 if (exactlyOneBuilder_ == null) {
3640 constraint_ = builderForValue.build();
3641 onChanged();
3642 } else {
3643 exactlyOneBuilder_.setMessage(builderForValue.build());
3644 }
3645 constraintCase_ = 29;
3646 return this;
3647 }
3648
3666 public Builder mergeExactlyOne(com.google.ortools.sat.BoolArgumentProto value) {
3667 if (exactlyOneBuilder_ == null) {
3668 if (constraintCase_ == 29 &&
3669 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3670 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3671 .mergeFrom(value).buildPartial();
3672 } else {
3673 constraint_ = value;
3674 }
3675 onChanged();
3676 } else {
3677 if (constraintCase_ == 29) {
3678 exactlyOneBuilder_.mergeFrom(value);
3679 } else {
3680 exactlyOneBuilder_.setMessage(value);
3681 }
3682 }
3683 constraintCase_ = 29;
3684 return this;
3685 }
3686
3704 public Builder clearExactlyOne() {
3705 if (exactlyOneBuilder_ == null) {
3706 if (constraintCase_ == 29) {
3707 constraintCase_ = 0;
3708 constraint_ = null;
3709 onChanged();
3710 }
3711 } else {
3712 if (constraintCase_ == 29) {
3713 constraintCase_ = 0;
3714 constraint_ = null;
3715 }
3716 exactlyOneBuilder_.clear();
3717 }
3718 return this;
3719 }
3720
3739 return internalGetExactlyOneFieldBuilder().getBuilder();
3740 }
3741
3759 @java.lang.Override
3761 if ((constraintCase_ == 29) && (exactlyOneBuilder_ != null)) {
3762 return exactlyOneBuilder_.getMessageOrBuilder();
3763 } else {
3764 if (constraintCase_ == 29) {
3765 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3766 }
3767 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3768 }
3769 }
3770
3788 private com.google.protobuf.SingleFieldBuilder<
3789 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3790 internalGetExactlyOneFieldBuilder() {
3791 if (exactlyOneBuilder_ == null) {
3792 if (!(constraintCase_ == 29)) {
3793 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3794 }
3795 exactlyOneBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3796 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3797 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3798 getParentForChildren(),
3799 isClean());
3800 constraint_ = null;
3801 }
3802 constraintCase_ = 29;
3803 onChanged();
3804 return exactlyOneBuilder_;
3805 }
3806
3807 private com.google.protobuf.SingleFieldBuilder<
3808 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolXorBuilder_;
3817 @java.lang.Override
3818 public boolean hasBoolXor() {
3819 return constraintCase_ == 5;
3820 }
3821
3829 @java.lang.Override
3831 if (boolXorBuilder_ == null) {
3832 if (constraintCase_ == 5) {
3833 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3834 }
3835 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3836 } else {
3837 if (constraintCase_ == 5) {
3838 return boolXorBuilder_.getMessage();
3839 }
3840 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3841 }
3842 }
3843
3850 public Builder setBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
3851 if (boolXorBuilder_ == null) {
3852 if (value == null) {
3853 throw new NullPointerException();
3854 }
3855 constraint_ = value;
3856 onChanged();
3857 } else {
3858 boolXorBuilder_.setMessage(value);
3859 }
3860 constraintCase_ = 5;
3861 return this;
3862 }
3863
3870 public Builder setBoolXor(
3871 com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
3872 if (boolXorBuilder_ == null) {
3873 constraint_ = builderForValue.build();
3874 onChanged();
3875 } else {
3876 boolXorBuilder_.setMessage(builderForValue.build());
3877 }
3878 constraintCase_ = 5;
3879 return this;
3880 }
3881
3888 public Builder mergeBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
3889 if (boolXorBuilder_ == null) {
3890 if (constraintCase_ == 5 &&
3891 constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
3892 constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
3893 .mergeFrom(value).buildPartial();
3894 } else {
3895 constraint_ = value;
3896 }
3897 onChanged();
3898 } else {
3899 if (constraintCase_ == 5) {
3900 boolXorBuilder_.mergeFrom(value);
3901 } else {
3902 boolXorBuilder_.setMessage(value);
3903 }
3904 }
3905 constraintCase_ = 5;
3906 return this;
3907 }
3908
3915 public Builder clearBoolXor() {
3916 if (boolXorBuilder_ == null) {
3917 if (constraintCase_ == 5) {
3918 constraintCase_ = 0;
3919 constraint_ = null;
3920 onChanged();
3921 }
3922 } else {
3923 if (constraintCase_ == 5) {
3924 constraintCase_ = 0;
3925 constraint_ = null;
3926 }
3927 boolXorBuilder_.clear();
3928 }
3929 return this;
3930 }
3931
3939 return internalGetBoolXorFieldBuilder().getBuilder();
3940 }
3941
3948 @java.lang.Override
3950 if ((constraintCase_ == 5) && (boolXorBuilder_ != null)) {
3951 return boolXorBuilder_.getMessageOrBuilder();
3952 } else {
3953 if (constraintCase_ == 5) {
3954 return (com.google.ortools.sat.BoolArgumentProto) constraint_;
3955 }
3956 return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3957 }
3958 }
3959
3966 private com.google.protobuf.SingleFieldBuilder<
3967 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
3968 internalGetBoolXorFieldBuilder() {
3969 if (boolXorBuilder_ == null) {
3970 if (!(constraintCase_ == 5)) {
3971 constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
3972 }
3973 boolXorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3974 com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
3975 (com.google.ortools.sat.BoolArgumentProto) constraint_,
3976 getParentForChildren(),
3977 isClean());
3978 constraint_ = null;
3979 }
3980 constraintCase_ = 5;
3981 onChanged();
3982 return boolXorBuilder_;
3983 }
3984
3985 private com.google.protobuf.SingleFieldBuilder<
3986 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intDivBuilder_;
4001 @java.lang.Override
4002 public boolean hasIntDiv() {
4003 return constraintCase_ == 7;
4004 }
4005
4019 @java.lang.Override
4021 if (intDivBuilder_ == null) {
4022 if (constraintCase_ == 7) {
4023 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4024 }
4025 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4026 } else {
4027 if (constraintCase_ == 7) {
4028 return intDivBuilder_.getMessage();
4029 }
4030 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4031 }
4032 }
4033
4046 public Builder setIntDiv(com.google.ortools.sat.LinearArgumentProto value) {
4047 if (intDivBuilder_ == null) {
4048 if (value == null) {
4049 throw new NullPointerException();
4050 }
4051 constraint_ = value;
4052 onChanged();
4053 } else {
4054 intDivBuilder_.setMessage(value);
4055 }
4056 constraintCase_ = 7;
4057 return this;
4058 }
4059
4072 public Builder setIntDiv(
4073 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4074 if (intDivBuilder_ == null) {
4075 constraint_ = builderForValue.build();
4076 onChanged();
4077 } else {
4078 intDivBuilder_.setMessage(builderForValue.build());
4079 }
4080 constraintCase_ = 7;
4081 return this;
4082 }
4083
4096 public Builder mergeIntDiv(com.google.ortools.sat.LinearArgumentProto value) {
4097 if (intDivBuilder_ == null) {
4098 if (constraintCase_ == 7 &&
4099 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4100 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4101 .mergeFrom(value).buildPartial();
4102 } else {
4103 constraint_ = value;
4104 }
4105 onChanged();
4106 } else {
4107 if (constraintCase_ == 7) {
4108 intDivBuilder_.mergeFrom(value);
4109 } else {
4110 intDivBuilder_.setMessage(value);
4111 }
4112 }
4113 constraintCase_ = 7;
4114 return this;
4115 }
4116
4129 public Builder clearIntDiv() {
4130 if (intDivBuilder_ == null) {
4131 if (constraintCase_ == 7) {
4132 constraintCase_ = 0;
4133 constraint_ = null;
4134 onChanged();
4135 }
4136 } else {
4137 if (constraintCase_ == 7) {
4138 constraintCase_ = 0;
4139 constraint_ = null;
4140 }
4141 intDivBuilder_.clear();
4142 }
4143 return this;
4144 }
4145
4159 return internalGetIntDivFieldBuilder().getBuilder();
4160 }
4161
4174 @java.lang.Override
4176 if ((constraintCase_ == 7) && (intDivBuilder_ != null)) {
4177 return intDivBuilder_.getMessageOrBuilder();
4178 } else {
4179 if (constraintCase_ == 7) {
4180 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4181 }
4182 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4183 }
4184 }
4185
4198 private com.google.protobuf.SingleFieldBuilder<
4199 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4200 internalGetIntDivFieldBuilder() {
4201 if (intDivBuilder_ == null) {
4202 if (!(constraintCase_ == 7)) {
4203 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4204 }
4205 intDivBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4206 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4207 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4208 getParentForChildren(),
4209 isClean());
4210 constraint_ = null;
4211 }
4212 constraintCase_ = 7;
4213 onChanged();
4214 return intDivBuilder_;
4215 }
4216
4217 private com.google.protobuf.SingleFieldBuilder<
4218 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intModBuilder_;
4229 @java.lang.Override
4230 public boolean hasIntMod() {
4231 return constraintCase_ == 8;
4232 }
4233
4243 @java.lang.Override
4245 if (intModBuilder_ == null) {
4246 if (constraintCase_ == 8) {
4247 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4248 }
4249 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4250 } else {
4251 if (constraintCase_ == 8) {
4252 return intModBuilder_.getMessage();
4253 }
4254 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4255 }
4256 }
4257
4266 public Builder setIntMod(com.google.ortools.sat.LinearArgumentProto value) {
4267 if (intModBuilder_ == null) {
4268 if (value == null) {
4269 throw new NullPointerException();
4270 }
4271 constraint_ = value;
4272 onChanged();
4273 } else {
4274 intModBuilder_.setMessage(value);
4275 }
4276 constraintCase_ = 8;
4277 return this;
4278 }
4279
4288 public Builder setIntMod(
4289 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4290 if (intModBuilder_ == null) {
4291 constraint_ = builderForValue.build();
4292 onChanged();
4293 } else {
4294 intModBuilder_.setMessage(builderForValue.build());
4295 }
4296 constraintCase_ = 8;
4297 return this;
4298 }
4299
4308 public Builder mergeIntMod(com.google.ortools.sat.LinearArgumentProto value) {
4309 if (intModBuilder_ == null) {
4310 if (constraintCase_ == 8 &&
4311 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4312 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4313 .mergeFrom(value).buildPartial();
4314 } else {
4315 constraint_ = value;
4316 }
4317 onChanged();
4318 } else {
4319 if (constraintCase_ == 8) {
4320 intModBuilder_.mergeFrom(value);
4321 } else {
4322 intModBuilder_.setMessage(value);
4323 }
4324 }
4325 constraintCase_ = 8;
4326 return this;
4327 }
4328
4337 public Builder clearIntMod() {
4338 if (intModBuilder_ == null) {
4339 if (constraintCase_ == 8) {
4340 constraintCase_ = 0;
4341 constraint_ = null;
4342 onChanged();
4343 }
4344 } else {
4345 if (constraintCase_ == 8) {
4346 constraintCase_ = 0;
4347 constraint_ = null;
4348 }
4349 intModBuilder_.clear();
4350 }
4351 return this;
4352 }
4353
4363 return internalGetIntModFieldBuilder().getBuilder();
4364 }
4365
4374 @java.lang.Override
4376 if ((constraintCase_ == 8) && (intModBuilder_ != null)) {
4377 return intModBuilder_.getMessageOrBuilder();
4378 } else {
4379 if (constraintCase_ == 8) {
4380 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4381 }
4382 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4383 }
4384 }
4385
4394 private com.google.protobuf.SingleFieldBuilder<
4395 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4396 internalGetIntModFieldBuilder() {
4397 if (intModBuilder_ == null) {
4398 if (!(constraintCase_ == 8)) {
4399 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4400 }
4401 intModBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4402 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4403 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4404 getParentForChildren(),
4405 isClean());
4406 constraint_ = null;
4407 }
4408 constraintCase_ = 8;
4409 onChanged();
4410 return intModBuilder_;
4411 }
4412
4413 private com.google.protobuf.SingleFieldBuilder<
4414 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> intProdBuilder_;
4430 @java.lang.Override
4431 public boolean hasIntProd() {
4432 return constraintCase_ == 11;
4433 }
4434
4449 @java.lang.Override
4451 if (intProdBuilder_ == null) {
4452 if (constraintCase_ == 11) {
4453 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4454 }
4455 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4456 } else {
4457 if (constraintCase_ == 11) {
4458 return intProdBuilder_.getMessage();
4459 }
4460 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4461 }
4462 }
4463
4477 public Builder setIntProd(com.google.ortools.sat.LinearArgumentProto value) {
4478 if (intProdBuilder_ == null) {
4479 if (value == null) {
4480 throw new NullPointerException();
4481 }
4482 constraint_ = value;
4483 onChanged();
4484 } else {
4485 intProdBuilder_.setMessage(value);
4486 }
4487 constraintCase_ = 11;
4488 return this;
4489 }
4490
4504 public Builder setIntProd(
4505 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4506 if (intProdBuilder_ == null) {
4507 constraint_ = builderForValue.build();
4508 onChanged();
4509 } else {
4510 intProdBuilder_.setMessage(builderForValue.build());
4511 }
4512 constraintCase_ = 11;
4513 return this;
4514 }
4515
4529 public Builder mergeIntProd(com.google.ortools.sat.LinearArgumentProto value) {
4530 if (intProdBuilder_ == null) {
4531 if (constraintCase_ == 11 &&
4532 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4533 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4534 .mergeFrom(value).buildPartial();
4535 } else {
4536 constraint_ = value;
4537 }
4538 onChanged();
4539 } else {
4540 if (constraintCase_ == 11) {
4541 intProdBuilder_.mergeFrom(value);
4542 } else {
4543 intProdBuilder_.setMessage(value);
4544 }
4545 }
4546 constraintCase_ = 11;
4547 return this;
4548 }
4549
4563 public Builder clearIntProd() {
4564 if (intProdBuilder_ == null) {
4565 if (constraintCase_ == 11) {
4566 constraintCase_ = 0;
4567 constraint_ = null;
4568 onChanged();
4569 }
4570 } else {
4571 if (constraintCase_ == 11) {
4572 constraintCase_ = 0;
4573 constraint_ = null;
4574 }
4575 intProdBuilder_.clear();
4576 }
4577 return this;
4578 }
4579
4594 return internalGetIntProdFieldBuilder().getBuilder();
4595 }
4596
4610 @java.lang.Override
4612 if ((constraintCase_ == 11) && (intProdBuilder_ != null)) {
4613 return intProdBuilder_.getMessageOrBuilder();
4614 } else {
4615 if (constraintCase_ == 11) {
4616 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4617 }
4618 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4619 }
4620 }
4621
4635 private com.google.protobuf.SingleFieldBuilder<
4636 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4637 internalGetIntProdFieldBuilder() {
4638 if (intProdBuilder_ == null) {
4639 if (!(constraintCase_ == 11)) {
4640 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4641 }
4642 intProdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4643 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4644 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4645 getParentForChildren(),
4646 isClean());
4647 constraint_ = null;
4648 }
4649 constraintCase_ = 11;
4650 onChanged();
4651 return intProdBuilder_;
4652 }
4653
4654 private com.google.protobuf.SingleFieldBuilder<
4655 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> linMaxBuilder_;
4666 @java.lang.Override
4667 public boolean hasLinMax() {
4668 return constraintCase_ == 27;
4669 }
4670
4680 @java.lang.Override
4682 if (linMaxBuilder_ == null) {
4683 if (constraintCase_ == 27) {
4684 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4685 }
4686 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4687 } else {
4688 if (constraintCase_ == 27) {
4689 return linMaxBuilder_.getMessage();
4690 }
4691 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4692 }
4693 }
4694
4703 public Builder setLinMax(com.google.ortools.sat.LinearArgumentProto value) {
4704 if (linMaxBuilder_ == null) {
4705 if (value == null) {
4706 throw new NullPointerException();
4707 }
4708 constraint_ = value;
4709 onChanged();
4710 } else {
4711 linMaxBuilder_.setMessage(value);
4712 }
4713 constraintCase_ = 27;
4714 return this;
4715 }
4716
4725 public Builder setLinMax(
4726 com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
4727 if (linMaxBuilder_ == null) {
4728 constraint_ = builderForValue.build();
4729 onChanged();
4730 } else {
4731 linMaxBuilder_.setMessage(builderForValue.build());
4732 }
4733 constraintCase_ = 27;
4734 return this;
4735 }
4736
4745 public Builder mergeLinMax(com.google.ortools.sat.LinearArgumentProto value) {
4746 if (linMaxBuilder_ == null) {
4747 if (constraintCase_ == 27 &&
4748 constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
4749 constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
4750 .mergeFrom(value).buildPartial();
4751 } else {
4752 constraint_ = value;
4753 }
4754 onChanged();
4755 } else {
4756 if (constraintCase_ == 27) {
4757 linMaxBuilder_.mergeFrom(value);
4758 } else {
4759 linMaxBuilder_.setMessage(value);
4760 }
4761 }
4762 constraintCase_ = 27;
4763 return this;
4764 }
4765
4774 public Builder clearLinMax() {
4775 if (linMaxBuilder_ == null) {
4776 if (constraintCase_ == 27) {
4777 constraintCase_ = 0;
4778 constraint_ = null;
4779 onChanged();
4780 }
4781 } else {
4782 if (constraintCase_ == 27) {
4783 constraintCase_ = 0;
4784 constraint_ = null;
4785 }
4786 linMaxBuilder_.clear();
4787 }
4788 return this;
4789 }
4790
4800 return internalGetLinMaxFieldBuilder().getBuilder();
4801 }
4802
4811 @java.lang.Override
4813 if ((constraintCase_ == 27) && (linMaxBuilder_ != null)) {
4814 return linMaxBuilder_.getMessageOrBuilder();
4815 } else {
4816 if (constraintCase_ == 27) {
4817 return (com.google.ortools.sat.LinearArgumentProto) constraint_;
4818 }
4819 return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4820 }
4821 }
4822
4831 private com.google.protobuf.SingleFieldBuilder<
4832 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
4833 internalGetLinMaxFieldBuilder() {
4834 if (linMaxBuilder_ == null) {
4835 if (!(constraintCase_ == 27)) {
4836 constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
4837 }
4838 linMaxBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4839 com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
4840 (com.google.ortools.sat.LinearArgumentProto) constraint_,
4841 getParentForChildren(),
4842 isClean());
4843 constraint_ = null;
4844 }
4845 constraintCase_ = 27;
4846 onChanged();
4847 return linMaxBuilder_;
4848 }
4849
4850 private com.google.protobuf.SingleFieldBuilder<
4851 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder> linearBuilder_;
4861 @java.lang.Override
4862 public boolean hasLinear() {
4863 return constraintCase_ == 12;
4864 }
4865
4874 @java.lang.Override
4876 if (linearBuilder_ == null) {
4877 if (constraintCase_ == 12) {
4878 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
4879 }
4880 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4881 } else {
4882 if (constraintCase_ == 12) {
4883 return linearBuilder_.getMessage();
4884 }
4885 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
4886 }
4887 }
4888
4896 public Builder setLinear(com.google.ortools.sat.LinearConstraintProto value) {
4897 if (linearBuilder_ == null) {
4898 if (value == null) {
4899 throw new NullPointerException();
4900 }
4901 constraint_ = value;
4902 onChanged();
4903 } else {
4904 linearBuilder_.setMessage(value);
4905 }
4906 constraintCase_ = 12;
4907 return this;
4908 }
4909
4917 public Builder setLinear(
4918 com.google.ortools.sat.LinearConstraintProto.Builder builderForValue) {
4919 if (linearBuilder_ == null) {
4920 constraint_ = builderForValue.build();
4921 onChanged();
4922 } else {
4923 linearBuilder_.setMessage(builderForValue.build());
4924 }
4925 constraintCase_ = 12;
4926 return this;
4927 }
4928
4936 public Builder mergeLinear(com.google.ortools.sat.LinearConstraintProto value) {
4937 if (linearBuilder_ == null) {
4938 if (constraintCase_ == 12 &&
4939 constraint_ != com.google.ortools.sat.LinearConstraintProto.getDefaultInstance()) {
4940 constraint_ = com.google.ortools.sat.LinearConstraintProto.newBuilder((com.google.ortools.sat.LinearConstraintProto) constraint_)
4941 .mergeFrom(value).buildPartial();
4942 } else {
4943 constraint_ = value;
4944 }
4945 onChanged();
4946 } else {
4947 if (constraintCase_ == 12) {
4948 linearBuilder_.mergeFrom(value);
4949 } else {
4950 linearBuilder_.setMessage(value);
4951 }
4952 }
4953 constraintCase_ = 12;
4954 return this;
4955 }
4956
4964 public Builder clearLinear() {
4965 if (linearBuilder_ == null) {
4966 if (constraintCase_ == 12) {
4967 constraintCase_ = 0;
4968 constraint_ = null;
4969 onChanged();
4970 }
4971 } else {
4972 if (constraintCase_ == 12) {
4973 constraintCase_ = 0;
4974 constraint_ = null;
4975 }
4976 linearBuilder_.clear();
4977 }
4978 return this;
4979 }
4980
4989 return internalGetLinearFieldBuilder().getBuilder();
4990 }
4991
4999 @java.lang.Override
5001 if ((constraintCase_ == 12) && (linearBuilder_ != null)) {
5002 return linearBuilder_.getMessageOrBuilder();
5003 } else {
5004 if (constraintCase_ == 12) {
5005 return (com.google.ortools.sat.LinearConstraintProto) constraint_;
5006 }
5007 return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
5008 }
5009 }
5010
5018 private com.google.protobuf.SingleFieldBuilder<
5019 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>
5020 internalGetLinearFieldBuilder() {
5021 if (linearBuilder_ == null) {
5022 if (!(constraintCase_ == 12)) {
5023 constraint_ = com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
5024 }
5025 linearBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5026 com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>(
5027 (com.google.ortools.sat.LinearConstraintProto) constraint_,
5028 getParentForChildren(),
5029 isClean());
5030 constraint_ = null;
5031 }
5032 constraintCase_ = 12;
5033 onChanged();
5034 return linearBuilder_;
5035 }
5036
5037 private com.google.protobuf.SingleFieldBuilder<
5038 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder> allDiffBuilder_;
5047 @java.lang.Override
5048 public boolean hasAllDiff() {
5049 return constraintCase_ == 13;
5050 }
5051
5059 @java.lang.Override
5061 if (allDiffBuilder_ == null) {
5062 if (constraintCase_ == 13) {
5063 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
5064 }
5065 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5066 } else {
5067 if (constraintCase_ == 13) {
5068 return allDiffBuilder_.getMessage();
5069 }
5070 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5071 }
5072 }
5073
5080 public Builder setAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
5081 if (allDiffBuilder_ == null) {
5082 if (value == null) {
5083 throw new NullPointerException();
5084 }
5085 constraint_ = value;
5086 onChanged();
5087 } else {
5088 allDiffBuilder_.setMessage(value);
5089 }
5090 constraintCase_ = 13;
5091 return this;
5092 }
5093
5100 public Builder setAllDiff(
5101 com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue) {
5102 if (allDiffBuilder_ == null) {
5103 constraint_ = builderForValue.build();
5104 onChanged();
5105 } else {
5106 allDiffBuilder_.setMessage(builderForValue.build());
5107 }
5108 constraintCase_ = 13;
5109 return this;
5110 }
5111
5118 public Builder mergeAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
5119 if (allDiffBuilder_ == null) {
5120 if (constraintCase_ == 13 &&
5121 constraint_ != com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance()) {
5122 constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.newBuilder((com.google.ortools.sat.AllDifferentConstraintProto) constraint_)
5123 .mergeFrom(value).buildPartial();
5124 } else {
5125 constraint_ = value;
5126 }
5127 onChanged();
5128 } else {
5129 if (constraintCase_ == 13) {
5130 allDiffBuilder_.mergeFrom(value);
5131 } else {
5132 allDiffBuilder_.setMessage(value);
5133 }
5134 }
5135 constraintCase_ = 13;
5136 return this;
5137 }
5138
5145 public Builder clearAllDiff() {
5146 if (allDiffBuilder_ == null) {
5147 if (constraintCase_ == 13) {
5148 constraintCase_ = 0;
5149 constraint_ = null;
5150 onChanged();
5151 }
5152 } else {
5153 if (constraintCase_ == 13) {
5154 constraintCase_ = 0;
5155 constraint_ = null;
5156 }
5157 allDiffBuilder_.clear();
5158 }
5159 return this;
5160 }
5161
5169 return internalGetAllDiffFieldBuilder().getBuilder();
5170 }
5171
5178 @java.lang.Override
5180 if ((constraintCase_ == 13) && (allDiffBuilder_ != null)) {
5181 return allDiffBuilder_.getMessageOrBuilder();
5182 } else {
5183 if (constraintCase_ == 13) {
5184 return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
5185 }
5186 return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5187 }
5188 }
5189
5196 private com.google.protobuf.SingleFieldBuilder<
5197 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>
5198 internalGetAllDiffFieldBuilder() {
5199 if (allDiffBuilder_ == null) {
5200 if (!(constraintCase_ == 13)) {
5201 constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
5202 }
5203 allDiffBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5204 com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>(
5205 (com.google.ortools.sat.AllDifferentConstraintProto) constraint_,
5206 getParentForChildren(),
5207 isClean());
5208 constraint_ = null;
5209 }
5210 constraintCase_ = 13;
5211 onChanged();
5212 return allDiffBuilder_;
5213 }
5214
5215 private com.google.protobuf.SingleFieldBuilder<
5216 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder> elementBuilder_;
5226 @java.lang.Override
5227 public boolean hasElement() {
5228 return constraintCase_ == 14;
5229 }
5230
5239 @java.lang.Override
5241 if (elementBuilder_ == null) {
5242 if (constraintCase_ == 14) {
5243 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
5244 }
5245 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5246 } else {
5247 if (constraintCase_ == 14) {
5248 return elementBuilder_.getMessage();
5249 }
5250 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5251 }
5252 }
5253
5261 public Builder setElement(com.google.ortools.sat.ElementConstraintProto value) {
5262 if (elementBuilder_ == null) {
5263 if (value == null) {
5264 throw new NullPointerException();
5265 }
5266 constraint_ = value;
5267 onChanged();
5268 } else {
5269 elementBuilder_.setMessage(value);
5270 }
5271 constraintCase_ = 14;
5272 return this;
5273 }
5274
5282 public Builder setElement(
5283 com.google.ortools.sat.ElementConstraintProto.Builder builderForValue) {
5284 if (elementBuilder_ == null) {
5285 constraint_ = builderForValue.build();
5286 onChanged();
5287 } else {
5288 elementBuilder_.setMessage(builderForValue.build());
5289 }
5290 constraintCase_ = 14;
5291 return this;
5292 }
5293
5301 public Builder mergeElement(com.google.ortools.sat.ElementConstraintProto value) {
5302 if (elementBuilder_ == null) {
5303 if (constraintCase_ == 14 &&
5304 constraint_ != com.google.ortools.sat.ElementConstraintProto.getDefaultInstance()) {
5305 constraint_ = com.google.ortools.sat.ElementConstraintProto.newBuilder((com.google.ortools.sat.ElementConstraintProto) constraint_)
5306 .mergeFrom(value).buildPartial();
5307 } else {
5308 constraint_ = value;
5309 }
5310 onChanged();
5311 } else {
5312 if (constraintCase_ == 14) {
5313 elementBuilder_.mergeFrom(value);
5314 } else {
5315 elementBuilder_.setMessage(value);
5316 }
5317 }
5318 constraintCase_ = 14;
5319 return this;
5320 }
5321
5329 public Builder clearElement() {
5330 if (elementBuilder_ == null) {
5331 if (constraintCase_ == 14) {
5332 constraintCase_ = 0;
5333 constraint_ = null;
5334 onChanged();
5335 }
5336 } else {
5337 if (constraintCase_ == 14) {
5338 constraintCase_ = 0;
5339 constraint_ = null;
5340 }
5341 elementBuilder_.clear();
5342 }
5343 return this;
5344 }
5345
5354 return internalGetElementFieldBuilder().getBuilder();
5355 }
5356
5364 @java.lang.Override
5366 if ((constraintCase_ == 14) && (elementBuilder_ != null)) {
5367 return elementBuilder_.getMessageOrBuilder();
5368 } else {
5369 if (constraintCase_ == 14) {
5370 return (com.google.ortools.sat.ElementConstraintProto) constraint_;
5371 }
5372 return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5373 }
5374 }
5375
5383 private com.google.protobuf.SingleFieldBuilder<
5384 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>
5385 internalGetElementFieldBuilder() {
5386 if (elementBuilder_ == null) {
5387 if (!(constraintCase_ == 14)) {
5388 constraint_ = com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
5389 }
5390 elementBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5391 com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>(
5392 (com.google.ortools.sat.ElementConstraintProto) constraint_,
5393 getParentForChildren(),
5394 isClean());
5395 constraint_ = null;
5396 }
5397 constraintCase_ = 14;
5398 onChanged();
5399 return elementBuilder_;
5400 }
5401
5402 private com.google.protobuf.SingleFieldBuilder<
5403 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder> circuitBuilder_;
5413 @java.lang.Override
5414 public boolean hasCircuit() {
5415 return constraintCase_ == 15;
5416 }
5417
5426 @java.lang.Override
5428 if (circuitBuilder_ == null) {
5429 if (constraintCase_ == 15) {
5430 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
5431 }
5432 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5433 } else {
5434 if (constraintCase_ == 15) {
5435 return circuitBuilder_.getMessage();
5436 }
5437 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5438 }
5439 }
5440
5448 public Builder setCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
5449 if (circuitBuilder_ == null) {
5450 if (value == null) {
5451 throw new NullPointerException();
5452 }
5453 constraint_ = value;
5454 onChanged();
5455 } else {
5456 circuitBuilder_.setMessage(value);
5457 }
5458 constraintCase_ = 15;
5459 return this;
5460 }
5461
5469 public Builder setCircuit(
5470 com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue) {
5471 if (circuitBuilder_ == null) {
5472 constraint_ = builderForValue.build();
5473 onChanged();
5474 } else {
5475 circuitBuilder_.setMessage(builderForValue.build());
5476 }
5477 constraintCase_ = 15;
5478 return this;
5479 }
5480
5488 public Builder mergeCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
5489 if (circuitBuilder_ == null) {
5490 if (constraintCase_ == 15 &&
5491 constraint_ != com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance()) {
5492 constraint_ = com.google.ortools.sat.CircuitConstraintProto.newBuilder((com.google.ortools.sat.CircuitConstraintProto) constraint_)
5493 .mergeFrom(value).buildPartial();
5494 } else {
5495 constraint_ = value;
5496 }
5497 onChanged();
5498 } else {
5499 if (constraintCase_ == 15) {
5500 circuitBuilder_.mergeFrom(value);
5501 } else {
5502 circuitBuilder_.setMessage(value);
5503 }
5504 }
5505 constraintCase_ = 15;
5506 return this;
5507 }
5508
5516 public Builder clearCircuit() {
5517 if (circuitBuilder_ == null) {
5518 if (constraintCase_ == 15) {
5519 constraintCase_ = 0;
5520 constraint_ = null;
5521 onChanged();
5522 }
5523 } else {
5524 if (constraintCase_ == 15) {
5525 constraintCase_ = 0;
5526 constraint_ = null;
5527 }
5528 circuitBuilder_.clear();
5529 }
5530 return this;
5531 }
5532
5541 return internalGetCircuitFieldBuilder().getBuilder();
5542 }
5543
5551 @java.lang.Override
5553 if ((constraintCase_ == 15) && (circuitBuilder_ != null)) {
5554 return circuitBuilder_.getMessageOrBuilder();
5555 } else {
5556 if (constraintCase_ == 15) {
5557 return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
5558 }
5559 return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5560 }
5561 }
5562
5570 private com.google.protobuf.SingleFieldBuilder<
5571 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>
5572 internalGetCircuitFieldBuilder() {
5573 if (circuitBuilder_ == null) {
5574 if (!(constraintCase_ == 15)) {
5575 constraint_ = com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
5576 }
5577 circuitBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5578 com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>(
5579 (com.google.ortools.sat.CircuitConstraintProto) constraint_,
5580 getParentForChildren(),
5581 isClean());
5582 constraint_ = null;
5583 }
5584 constraintCase_ = 15;
5585 onChanged();
5586 return circuitBuilder_;
5587 }
5588
5589 private com.google.protobuf.SingleFieldBuilder<
5590 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder> routesBuilder_;
5599 @java.lang.Override
5600 public boolean hasRoutes() {
5601 return constraintCase_ == 23;
5602 }
5603
5611 @java.lang.Override
5613 if (routesBuilder_ == null) {
5614 if (constraintCase_ == 23) {
5615 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
5616 }
5617 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5618 } else {
5619 if (constraintCase_ == 23) {
5620 return routesBuilder_.getMessage();
5621 }
5622 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5623 }
5624 }
5625
5632 public Builder setRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
5633 if (routesBuilder_ == null) {
5634 if (value == null) {
5635 throw new NullPointerException();
5636 }
5637 constraint_ = value;
5638 onChanged();
5639 } else {
5640 routesBuilder_.setMessage(value);
5641 }
5642 constraintCase_ = 23;
5643 return this;
5644 }
5645
5652 public Builder setRoutes(
5653 com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue) {
5654 if (routesBuilder_ == null) {
5655 constraint_ = builderForValue.build();
5656 onChanged();
5657 } else {
5658 routesBuilder_.setMessage(builderForValue.build());
5659 }
5660 constraintCase_ = 23;
5661 return this;
5662 }
5663
5670 public Builder mergeRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
5671 if (routesBuilder_ == null) {
5672 if (constraintCase_ == 23 &&
5673 constraint_ != com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance()) {
5674 constraint_ = com.google.ortools.sat.RoutesConstraintProto.newBuilder((com.google.ortools.sat.RoutesConstraintProto) constraint_)
5675 .mergeFrom(value).buildPartial();
5676 } else {
5677 constraint_ = value;
5678 }
5679 onChanged();
5680 } else {
5681 if (constraintCase_ == 23) {
5682 routesBuilder_.mergeFrom(value);
5683 } else {
5684 routesBuilder_.setMessage(value);
5685 }
5686 }
5687 constraintCase_ = 23;
5688 return this;
5689 }
5690
5697 public Builder clearRoutes() {
5698 if (routesBuilder_ == null) {
5699 if (constraintCase_ == 23) {
5700 constraintCase_ = 0;
5701 constraint_ = null;
5702 onChanged();
5703 }
5704 } else {
5705 if (constraintCase_ == 23) {
5706 constraintCase_ = 0;
5707 constraint_ = null;
5708 }
5709 routesBuilder_.clear();
5710 }
5711 return this;
5712 }
5713
5721 return internalGetRoutesFieldBuilder().getBuilder();
5722 }
5723
5730 @java.lang.Override
5732 if ((constraintCase_ == 23) && (routesBuilder_ != null)) {
5733 return routesBuilder_.getMessageOrBuilder();
5734 } else {
5735 if (constraintCase_ == 23) {
5736 return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
5737 }
5738 return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5739 }
5740 }
5741
5748 private com.google.protobuf.SingleFieldBuilder<
5749 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>
5750 internalGetRoutesFieldBuilder() {
5751 if (routesBuilder_ == null) {
5752 if (!(constraintCase_ == 23)) {
5753 constraint_ = com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
5754 }
5755 routesBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5756 com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>(
5757 (com.google.ortools.sat.RoutesConstraintProto) constraint_,
5758 getParentForChildren(),
5759 isClean());
5760 constraint_ = null;
5761 }
5762 constraintCase_ = 23;
5763 onChanged();
5764 return routesBuilder_;
5765 }
5766
5767 private com.google.protobuf.SingleFieldBuilder<
5768 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder> tableBuilder_;
5778 @java.lang.Override
5779 public boolean hasTable() {
5780 return constraintCase_ == 16;
5781 }
5782
5791 @java.lang.Override
5793 if (tableBuilder_ == null) {
5794 if (constraintCase_ == 16) {
5795 return (com.google.ortools.sat.TableConstraintProto) constraint_;
5796 }
5797 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5798 } else {
5799 if (constraintCase_ == 16) {
5800 return tableBuilder_.getMessage();
5801 }
5802 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5803 }
5804 }
5805
5813 public Builder setTable(com.google.ortools.sat.TableConstraintProto value) {
5814 if (tableBuilder_ == null) {
5815 if (value == null) {
5816 throw new NullPointerException();
5817 }
5818 constraint_ = value;
5819 onChanged();
5820 } else {
5821 tableBuilder_.setMessage(value);
5822 }
5823 constraintCase_ = 16;
5824 return this;
5825 }
5826
5834 public Builder setTable(
5835 com.google.ortools.sat.TableConstraintProto.Builder builderForValue) {
5836 if (tableBuilder_ == null) {
5837 constraint_ = builderForValue.build();
5838 onChanged();
5839 } else {
5840 tableBuilder_.setMessage(builderForValue.build());
5841 }
5842 constraintCase_ = 16;
5843 return this;
5844 }
5845
5853 public Builder mergeTable(com.google.ortools.sat.TableConstraintProto value) {
5854 if (tableBuilder_ == null) {
5855 if (constraintCase_ == 16 &&
5856 constraint_ != com.google.ortools.sat.TableConstraintProto.getDefaultInstance()) {
5857 constraint_ = com.google.ortools.sat.TableConstraintProto.newBuilder((com.google.ortools.sat.TableConstraintProto) constraint_)
5858 .mergeFrom(value).buildPartial();
5859 } else {
5860 constraint_ = value;
5861 }
5862 onChanged();
5863 } else {
5864 if (constraintCase_ == 16) {
5865 tableBuilder_.mergeFrom(value);
5866 } else {
5867 tableBuilder_.setMessage(value);
5868 }
5869 }
5870 constraintCase_ = 16;
5871 return this;
5872 }
5873
5881 public Builder clearTable() {
5882 if (tableBuilder_ == null) {
5883 if (constraintCase_ == 16) {
5884 constraintCase_ = 0;
5885 constraint_ = null;
5886 onChanged();
5887 }
5888 } else {
5889 if (constraintCase_ == 16) {
5890 constraintCase_ = 0;
5891 constraint_ = null;
5892 }
5893 tableBuilder_.clear();
5894 }
5895 return this;
5896 }
5897
5906 return internalGetTableFieldBuilder().getBuilder();
5907 }
5908
5916 @java.lang.Override
5918 if ((constraintCase_ == 16) && (tableBuilder_ != null)) {
5919 return tableBuilder_.getMessageOrBuilder();
5920 } else {
5921 if (constraintCase_ == 16) {
5922 return (com.google.ortools.sat.TableConstraintProto) constraint_;
5923 }
5924 return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5925 }
5926 }
5927
5935 private com.google.protobuf.SingleFieldBuilder<
5936 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>
5937 internalGetTableFieldBuilder() {
5938 if (tableBuilder_ == null) {
5939 if (!(constraintCase_ == 16)) {
5940 constraint_ = com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
5941 }
5942 tableBuilder_ = new com.google.protobuf.SingleFieldBuilder<
5943 com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>(
5944 (com.google.ortools.sat.TableConstraintProto) constraint_,
5945 getParentForChildren(),
5946 isClean());
5947 constraint_ = null;
5948 }
5949 constraintCase_ = 16;
5950 onChanged();
5951 return tableBuilder_;
5952 }
5953
5954 private com.google.protobuf.SingleFieldBuilder<
5955 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder> automatonBuilder_;
5965 @java.lang.Override
5966 public boolean hasAutomaton() {
5967 return constraintCase_ == 17;
5968 }
5969
5978 @java.lang.Override
5980 if (automatonBuilder_ == null) {
5981 if (constraintCase_ == 17) {
5982 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
5983 }
5984 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
5985 } else {
5986 if (constraintCase_ == 17) {
5987 return automatonBuilder_.getMessage();
5988 }
5989 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
5990 }
5991 }
5992
6000 public Builder setAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
6001 if (automatonBuilder_ == null) {
6002 if (value == null) {
6003 throw new NullPointerException();
6004 }
6005 constraint_ = value;
6006 onChanged();
6007 } else {
6008 automatonBuilder_.setMessage(value);
6009 }
6010 constraintCase_ = 17;
6011 return this;
6012 }
6013
6021 public Builder setAutomaton(
6022 com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue) {
6023 if (automatonBuilder_ == null) {
6024 constraint_ = builderForValue.build();
6025 onChanged();
6026 } else {
6027 automatonBuilder_.setMessage(builderForValue.build());
6028 }
6029 constraintCase_ = 17;
6030 return this;
6031 }
6032
6040 public Builder mergeAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
6041 if (automatonBuilder_ == null) {
6042 if (constraintCase_ == 17 &&
6043 constraint_ != com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) {
6044 constraint_ = com.google.ortools.sat.AutomatonConstraintProto.newBuilder((com.google.ortools.sat.AutomatonConstraintProto) constraint_)
6045 .mergeFrom(value).buildPartial();
6046 } else {
6047 constraint_ = value;
6048 }
6049 onChanged();
6050 } else {
6051 if (constraintCase_ == 17) {
6052 automatonBuilder_.mergeFrom(value);
6053 } else {
6054 automatonBuilder_.setMessage(value);
6055 }
6056 }
6057 constraintCase_ = 17;
6058 return this;
6059 }
6060
6068 public Builder clearAutomaton() {
6069 if (automatonBuilder_ == null) {
6070 if (constraintCase_ == 17) {
6071 constraintCase_ = 0;
6072 constraint_ = null;
6073 onChanged();
6074 }
6075 } else {
6076 if (constraintCase_ == 17) {
6077 constraintCase_ = 0;
6078 constraint_ = null;
6079 }
6080 automatonBuilder_.clear();
6081 }
6082 return this;
6083 }
6084
6093 return internalGetAutomatonFieldBuilder().getBuilder();
6094 }
6095
6103 @java.lang.Override
6105 if ((constraintCase_ == 17) && (automatonBuilder_ != null)) {
6106 return automatonBuilder_.getMessageOrBuilder();
6107 } else {
6108 if (constraintCase_ == 17) {
6109 return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
6110 }
6111 return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
6112 }
6113 }
6114
6122 private com.google.protobuf.SingleFieldBuilder<
6123 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>
6124 internalGetAutomatonFieldBuilder() {
6125 if (automatonBuilder_ == null) {
6126 if (!(constraintCase_ == 17)) {
6127 constraint_ = com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
6128 }
6129 automatonBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6130 com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>(
6131 (com.google.ortools.sat.AutomatonConstraintProto) constraint_,
6132 getParentForChildren(),
6133 isClean());
6134 constraint_ = null;
6135 }
6136 constraintCase_ = 17;
6137 onChanged();
6138 return automatonBuilder_;
6139 }
6140
6141 private com.google.protobuf.SingleFieldBuilder<
6142 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder> inverseBuilder_;
6152 @java.lang.Override
6153 public boolean hasInverse() {
6154 return constraintCase_ == 18;
6155 }
6156
6165 @java.lang.Override
6167 if (inverseBuilder_ == null) {
6168 if (constraintCase_ == 18) {
6169 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
6170 }
6171 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6172 } else {
6173 if (constraintCase_ == 18) {
6174 return inverseBuilder_.getMessage();
6175 }
6176 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6177 }
6178 }
6179
6187 public Builder setInverse(com.google.ortools.sat.InverseConstraintProto value) {
6188 if (inverseBuilder_ == null) {
6189 if (value == null) {
6190 throw new NullPointerException();
6191 }
6192 constraint_ = value;
6193 onChanged();
6194 } else {
6195 inverseBuilder_.setMessage(value);
6196 }
6197 constraintCase_ = 18;
6198 return this;
6199 }
6200
6208 public Builder setInverse(
6209 com.google.ortools.sat.InverseConstraintProto.Builder builderForValue) {
6210 if (inverseBuilder_ == null) {
6211 constraint_ = builderForValue.build();
6212 onChanged();
6213 } else {
6214 inverseBuilder_.setMessage(builderForValue.build());
6215 }
6216 constraintCase_ = 18;
6217 return this;
6218 }
6219
6227 public Builder mergeInverse(com.google.ortools.sat.InverseConstraintProto value) {
6228 if (inverseBuilder_ == null) {
6229 if (constraintCase_ == 18 &&
6230 constraint_ != com.google.ortools.sat.InverseConstraintProto.getDefaultInstance()) {
6231 constraint_ = com.google.ortools.sat.InverseConstraintProto.newBuilder((com.google.ortools.sat.InverseConstraintProto) constraint_)
6232 .mergeFrom(value).buildPartial();
6233 } else {
6234 constraint_ = value;
6235 }
6236 onChanged();
6237 } else {
6238 if (constraintCase_ == 18) {
6239 inverseBuilder_.mergeFrom(value);
6240 } else {
6241 inverseBuilder_.setMessage(value);
6242 }
6243 }
6244 constraintCase_ = 18;
6245 return this;
6246 }
6247
6255 public Builder clearInverse() {
6256 if (inverseBuilder_ == null) {
6257 if (constraintCase_ == 18) {
6258 constraintCase_ = 0;
6259 constraint_ = null;
6260 onChanged();
6261 }
6262 } else {
6263 if (constraintCase_ == 18) {
6264 constraintCase_ = 0;
6265 constraint_ = null;
6266 }
6267 inverseBuilder_.clear();
6268 }
6269 return this;
6270 }
6271
6280 return internalGetInverseFieldBuilder().getBuilder();
6281 }
6282
6290 @java.lang.Override
6292 if ((constraintCase_ == 18) && (inverseBuilder_ != null)) {
6293 return inverseBuilder_.getMessageOrBuilder();
6294 } else {
6295 if (constraintCase_ == 18) {
6296 return (com.google.ortools.sat.InverseConstraintProto) constraint_;
6297 }
6298 return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6299 }
6300 }
6301
6309 private com.google.protobuf.SingleFieldBuilder<
6310 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>
6311 internalGetInverseFieldBuilder() {
6312 if (inverseBuilder_ == null) {
6313 if (!(constraintCase_ == 18)) {
6314 constraint_ = com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
6315 }
6316 inverseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6317 com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>(
6318 (com.google.ortools.sat.InverseConstraintProto) constraint_,
6319 getParentForChildren(),
6320 isClean());
6321 constraint_ = null;
6322 }
6323 constraintCase_ = 18;
6324 onChanged();
6325 return inverseBuilder_;
6326 }
6327
6328 private com.google.protobuf.SingleFieldBuilder<
6329 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder> reservoirBuilder_;
6340 @java.lang.Override
6341 public boolean hasReservoir() {
6342 return constraintCase_ == 24;
6343 }
6344
6354 @java.lang.Override
6356 if (reservoirBuilder_ == null) {
6357 if (constraintCase_ == 24) {
6358 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
6359 }
6360 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6361 } else {
6362 if (constraintCase_ == 24) {
6363 return reservoirBuilder_.getMessage();
6364 }
6365 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6366 }
6367 }
6368
6377 public Builder setReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
6378 if (reservoirBuilder_ == null) {
6379 if (value == null) {
6380 throw new NullPointerException();
6381 }
6382 constraint_ = value;
6383 onChanged();
6384 } else {
6385 reservoirBuilder_.setMessage(value);
6386 }
6387 constraintCase_ = 24;
6388 return this;
6389 }
6390
6399 public Builder setReservoir(
6400 com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue) {
6401 if (reservoirBuilder_ == null) {
6402 constraint_ = builderForValue.build();
6403 onChanged();
6404 } else {
6405 reservoirBuilder_.setMessage(builderForValue.build());
6406 }
6407 constraintCase_ = 24;
6408 return this;
6409 }
6410
6419 public Builder mergeReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
6420 if (reservoirBuilder_ == null) {
6421 if (constraintCase_ == 24 &&
6422 constraint_ != com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance()) {
6423 constraint_ = com.google.ortools.sat.ReservoirConstraintProto.newBuilder((com.google.ortools.sat.ReservoirConstraintProto) constraint_)
6424 .mergeFrom(value).buildPartial();
6425 } else {
6426 constraint_ = value;
6427 }
6428 onChanged();
6429 } else {
6430 if (constraintCase_ == 24) {
6431 reservoirBuilder_.mergeFrom(value);
6432 } else {
6433 reservoirBuilder_.setMessage(value);
6434 }
6435 }
6436 constraintCase_ = 24;
6437 return this;
6438 }
6439
6448 public Builder clearReservoir() {
6449 if (reservoirBuilder_ == null) {
6450 if (constraintCase_ == 24) {
6451 constraintCase_ = 0;
6452 constraint_ = null;
6453 onChanged();
6454 }
6455 } else {
6456 if (constraintCase_ == 24) {
6457 constraintCase_ = 0;
6458 constraint_ = null;
6459 }
6460 reservoirBuilder_.clear();
6461 }
6462 return this;
6463 }
6464
6474 return internalGetReservoirFieldBuilder().getBuilder();
6475 }
6476
6485 @java.lang.Override
6487 if ((constraintCase_ == 24) && (reservoirBuilder_ != null)) {
6488 return reservoirBuilder_.getMessageOrBuilder();
6489 } else {
6490 if (constraintCase_ == 24) {
6491 return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
6492 }
6493 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6494 }
6495 }
6496
6505 private com.google.protobuf.SingleFieldBuilder<
6506 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>
6507 internalGetReservoirFieldBuilder() {
6508 if (reservoirBuilder_ == null) {
6509 if (!(constraintCase_ == 24)) {
6510 constraint_ = com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
6511 }
6512 reservoirBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6513 com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>(
6514 (com.google.ortools.sat.ReservoirConstraintProto) constraint_,
6515 getParentForChildren(),
6516 isClean());
6517 constraint_ = null;
6518 }
6519 constraintCase_ = 24;
6520 onChanged();
6521 return reservoirBuilder_;
6522 }
6523
6524 private com.google.protobuf.SingleFieldBuilder<
6525 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder> intervalBuilder_;
6535 @java.lang.Override
6536 public boolean hasInterval() {
6537 return constraintCase_ == 19;
6538 }
6539
6548 @java.lang.Override
6550 if (intervalBuilder_ == null) {
6551 if (constraintCase_ == 19) {
6552 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
6553 }
6554 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6555 } else {
6556 if (constraintCase_ == 19) {
6557 return intervalBuilder_.getMessage();
6558 }
6559 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6560 }
6561 }
6562
6570 public Builder setInterval(com.google.ortools.sat.IntervalConstraintProto value) {
6571 if (intervalBuilder_ == null) {
6572 if (value == null) {
6573 throw new NullPointerException();
6574 }
6575 constraint_ = value;
6576 onChanged();
6577 } else {
6578 intervalBuilder_.setMessage(value);
6579 }
6580 constraintCase_ = 19;
6581 return this;
6582 }
6583
6591 public Builder setInterval(
6592 com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue) {
6593 if (intervalBuilder_ == null) {
6594 constraint_ = builderForValue.build();
6595 onChanged();
6596 } else {
6597 intervalBuilder_.setMessage(builderForValue.build());
6598 }
6599 constraintCase_ = 19;
6600 return this;
6601 }
6602
6610 public Builder mergeInterval(com.google.ortools.sat.IntervalConstraintProto value) {
6611 if (intervalBuilder_ == null) {
6612 if (constraintCase_ == 19 &&
6613 constraint_ != com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance()) {
6614 constraint_ = com.google.ortools.sat.IntervalConstraintProto.newBuilder((com.google.ortools.sat.IntervalConstraintProto) constraint_)
6615 .mergeFrom(value).buildPartial();
6616 } else {
6617 constraint_ = value;
6618 }
6619 onChanged();
6620 } else {
6621 if (constraintCase_ == 19) {
6622 intervalBuilder_.mergeFrom(value);
6623 } else {
6624 intervalBuilder_.setMessage(value);
6625 }
6626 }
6627 constraintCase_ = 19;
6628 return this;
6629 }
6630
6638 public Builder clearInterval() {
6639 if (intervalBuilder_ == null) {
6640 if (constraintCase_ == 19) {
6641 constraintCase_ = 0;
6642 constraint_ = null;
6643 onChanged();
6644 }
6645 } else {
6646 if (constraintCase_ == 19) {
6647 constraintCase_ = 0;
6648 constraint_ = null;
6649 }
6650 intervalBuilder_.clear();
6651 }
6652 return this;
6653 }
6654
6663 return internalGetIntervalFieldBuilder().getBuilder();
6664 }
6665
6673 @java.lang.Override
6675 if ((constraintCase_ == 19) && (intervalBuilder_ != null)) {
6676 return intervalBuilder_.getMessageOrBuilder();
6677 } else {
6678 if (constraintCase_ == 19) {
6679 return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
6680 }
6681 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6682 }
6683 }
6684
6692 private com.google.protobuf.SingleFieldBuilder<
6693 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>
6694 internalGetIntervalFieldBuilder() {
6695 if (intervalBuilder_ == null) {
6696 if (!(constraintCase_ == 19)) {
6697 constraint_ = com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
6698 }
6699 intervalBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6700 com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>(
6701 (com.google.ortools.sat.IntervalConstraintProto) constraint_,
6702 getParentForChildren(),
6703 isClean());
6704 constraint_ = null;
6705 }
6706 constraintCase_ = 19;
6707 onChanged();
6708 return intervalBuilder_;
6709 }
6710
6711 private com.google.protobuf.SingleFieldBuilder<
6712 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder> noOverlapBuilder_;
6723 @java.lang.Override
6724 public boolean hasNoOverlap() {
6725 return constraintCase_ == 20;
6726 }
6727
6737 @java.lang.Override
6739 if (noOverlapBuilder_ == null) {
6740 if (constraintCase_ == 20) {
6741 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
6742 }
6743 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6744 } else {
6745 if (constraintCase_ == 20) {
6746 return noOverlapBuilder_.getMessage();
6747 }
6748 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6749 }
6750 }
6751
6760 public Builder setNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
6761 if (noOverlapBuilder_ == null) {
6762 if (value == null) {
6763 throw new NullPointerException();
6764 }
6765 constraint_ = value;
6766 onChanged();
6767 } else {
6768 noOverlapBuilder_.setMessage(value);
6769 }
6770 constraintCase_ = 20;
6771 return this;
6772 }
6773
6782 public Builder setNoOverlap(
6783 com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue) {
6784 if (noOverlapBuilder_ == null) {
6785 constraint_ = builderForValue.build();
6786 onChanged();
6787 } else {
6788 noOverlapBuilder_.setMessage(builderForValue.build());
6789 }
6790 constraintCase_ = 20;
6791 return this;
6792 }
6793
6802 public Builder mergeNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
6803 if (noOverlapBuilder_ == null) {
6804 if (constraintCase_ == 20 &&
6805 constraint_ != com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance()) {
6806 constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.newBuilder((com.google.ortools.sat.NoOverlapConstraintProto) constraint_)
6807 .mergeFrom(value).buildPartial();
6808 } else {
6809 constraint_ = value;
6810 }
6811 onChanged();
6812 } else {
6813 if (constraintCase_ == 20) {
6814 noOverlapBuilder_.mergeFrom(value);
6815 } else {
6816 noOverlapBuilder_.setMessage(value);
6817 }
6818 }
6819 constraintCase_ = 20;
6820 return this;
6821 }
6822
6831 public Builder clearNoOverlap() {
6832 if (noOverlapBuilder_ == null) {
6833 if (constraintCase_ == 20) {
6834 constraintCase_ = 0;
6835 constraint_ = null;
6836 onChanged();
6837 }
6838 } else {
6839 if (constraintCase_ == 20) {
6840 constraintCase_ = 0;
6841 constraint_ = null;
6842 }
6843 noOverlapBuilder_.clear();
6844 }
6845 return this;
6846 }
6847
6857 return internalGetNoOverlapFieldBuilder().getBuilder();
6858 }
6859
6868 @java.lang.Override
6870 if ((constraintCase_ == 20) && (noOverlapBuilder_ != null)) {
6871 return noOverlapBuilder_.getMessageOrBuilder();
6872 } else {
6873 if (constraintCase_ == 20) {
6874 return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
6875 }
6876 return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6877 }
6878 }
6879
6888 private com.google.protobuf.SingleFieldBuilder<
6889 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>
6890 internalGetNoOverlapFieldBuilder() {
6891 if (noOverlapBuilder_ == null) {
6892 if (!(constraintCase_ == 20)) {
6893 constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
6894 }
6895 noOverlapBuilder_ = new com.google.protobuf.SingleFieldBuilder<
6896 com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>(
6897 (com.google.ortools.sat.NoOverlapConstraintProto) constraint_,
6898 getParentForChildren(),
6899 isClean());
6900 constraint_ = null;
6901 }
6902 constraintCase_ = 20;
6903 onChanged();
6904 return noOverlapBuilder_;
6905 }
6906
6907 private com.google.protobuf.SingleFieldBuilder<
6908 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder> noOverlap2DBuilder_;
6917 @java.lang.Override
6918 public boolean hasNoOverlap2D() {
6919 return constraintCase_ == 21;
6920 }
6921
6929 @java.lang.Override
6931 if (noOverlap2DBuilder_ == null) {
6932 if (constraintCase_ == 21) {
6933 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
6934 }
6935 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6936 } else {
6937 if (constraintCase_ == 21) {
6938 return noOverlap2DBuilder_.getMessage();
6939 }
6940 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
6941 }
6942 }
6943
6950 public Builder setNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
6951 if (noOverlap2DBuilder_ == null) {
6952 if (value == null) {
6953 throw new NullPointerException();
6954 }
6955 constraint_ = value;
6956 onChanged();
6957 } else {
6958 noOverlap2DBuilder_.setMessage(value);
6959 }
6960 constraintCase_ = 21;
6961 return this;
6962 }
6963
6970 public Builder setNoOverlap2D(
6971 com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue) {
6972 if (noOverlap2DBuilder_ == null) {
6973 constraint_ = builderForValue.build();
6974 onChanged();
6975 } else {
6976 noOverlap2DBuilder_.setMessage(builderForValue.build());
6977 }
6978 constraintCase_ = 21;
6979 return this;
6980 }
6981
6988 public Builder mergeNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
6989 if (noOverlap2DBuilder_ == null) {
6990 if (constraintCase_ == 21 &&
6991 constraint_ != com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance()) {
6992 constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.newBuilder((com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_)
6993 .mergeFrom(value).buildPartial();
6994 } else {
6995 constraint_ = value;
6996 }
6997 onChanged();
6998 } else {
6999 if (constraintCase_ == 21) {
7000 noOverlap2DBuilder_.mergeFrom(value);
7001 } else {
7002 noOverlap2DBuilder_.setMessage(value);
7003 }
7004 }
7005 constraintCase_ = 21;
7006 return this;
7007 }
7008
7015 public Builder clearNoOverlap2D() {
7016 if (noOverlap2DBuilder_ == null) {
7017 if (constraintCase_ == 21) {
7018 constraintCase_ = 0;
7019 constraint_ = null;
7020 onChanged();
7021 }
7022 } else {
7023 if (constraintCase_ == 21) {
7024 constraintCase_ = 0;
7025 constraint_ = null;
7026 }
7027 noOverlap2DBuilder_.clear();
7028 }
7029 return this;
7030 }
7031
7039 return internalGetNoOverlap2DFieldBuilder().getBuilder();
7040 }
7041
7048 @java.lang.Override
7050 if ((constraintCase_ == 21) && (noOverlap2DBuilder_ != null)) {
7051 return noOverlap2DBuilder_.getMessageOrBuilder();
7052 } else {
7053 if (constraintCase_ == 21) {
7054 return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
7055 }
7056 return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
7057 }
7058 }
7059
7066 private com.google.protobuf.SingleFieldBuilder<
7067 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>
7068 internalGetNoOverlap2DFieldBuilder() {
7069 if (noOverlap2DBuilder_ == null) {
7070 if (!(constraintCase_ == 21)) {
7071 constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
7072 }
7073 noOverlap2DBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7074 com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>(
7075 (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_,
7076 getParentForChildren(),
7077 isClean());
7078 constraint_ = null;
7079 }
7080 constraintCase_ = 21;
7081 onChanged();
7082 return noOverlap2DBuilder_;
7083 }
7084
7085 private com.google.protobuf.SingleFieldBuilder<
7086 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder> cumulativeBuilder_;
7097 @java.lang.Override
7098 public boolean hasCumulative() {
7099 return constraintCase_ == 22;
7100 }
7101
7111 @java.lang.Override
7113 if (cumulativeBuilder_ == null) {
7114 if (constraintCase_ == 22) {
7115 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
7116 }
7117 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7118 } else {
7119 if (constraintCase_ == 22) {
7120 return cumulativeBuilder_.getMessage();
7121 }
7122 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7123 }
7124 }
7125
7134 public Builder setCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
7135 if (cumulativeBuilder_ == null) {
7136 if (value == null) {
7137 throw new NullPointerException();
7138 }
7139 constraint_ = value;
7140 onChanged();
7141 } else {
7142 cumulativeBuilder_.setMessage(value);
7143 }
7144 constraintCase_ = 22;
7145 return this;
7146 }
7147
7156 public Builder setCumulative(
7157 com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue) {
7158 if (cumulativeBuilder_ == null) {
7159 constraint_ = builderForValue.build();
7160 onChanged();
7161 } else {
7162 cumulativeBuilder_.setMessage(builderForValue.build());
7163 }
7164 constraintCase_ = 22;
7165 return this;
7166 }
7167
7176 public Builder mergeCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
7177 if (cumulativeBuilder_ == null) {
7178 if (constraintCase_ == 22 &&
7179 constraint_ != com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance()) {
7180 constraint_ = com.google.ortools.sat.CumulativeConstraintProto.newBuilder((com.google.ortools.sat.CumulativeConstraintProto) constraint_)
7181 .mergeFrom(value).buildPartial();
7182 } else {
7183 constraint_ = value;
7184 }
7185 onChanged();
7186 } else {
7187 if (constraintCase_ == 22) {
7188 cumulativeBuilder_.mergeFrom(value);
7189 } else {
7190 cumulativeBuilder_.setMessage(value);
7191 }
7192 }
7193 constraintCase_ = 22;
7194 return this;
7195 }
7196
7205 public Builder clearCumulative() {
7206 if (cumulativeBuilder_ == null) {
7207 if (constraintCase_ == 22) {
7208 constraintCase_ = 0;
7209 constraint_ = null;
7210 onChanged();
7211 }
7212 } else {
7213 if (constraintCase_ == 22) {
7214 constraintCase_ = 0;
7215 constraint_ = null;
7216 }
7217 cumulativeBuilder_.clear();
7218 }
7219 return this;
7220 }
7221
7231 return internalGetCumulativeFieldBuilder().getBuilder();
7232 }
7233
7242 @java.lang.Override
7244 if ((constraintCase_ == 22) && (cumulativeBuilder_ != null)) {
7245 return cumulativeBuilder_.getMessageOrBuilder();
7246 } else {
7247 if (constraintCase_ == 22) {
7248 return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
7249 }
7250 return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7251 }
7252 }
7253
7262 private com.google.protobuf.SingleFieldBuilder<
7263 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>
7264 internalGetCumulativeFieldBuilder() {
7265 if (cumulativeBuilder_ == null) {
7266 if (!(constraintCase_ == 22)) {
7267 constraint_ = com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
7268 }
7269 cumulativeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7270 com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>(
7271 (com.google.ortools.sat.CumulativeConstraintProto) constraint_,
7272 getParentForChildren(),
7273 isClean());
7274 constraint_ = null;
7275 }
7276 constraintCase_ = 22;
7277 onChanged();
7278 return cumulativeBuilder_;
7279 }
7280
7281 private com.google.protobuf.SingleFieldBuilder<
7282 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder> dummyConstraintBuilder_;
7292 @java.lang.Override
7293 public boolean hasDummyConstraint() {
7294 return constraintCase_ == 30;
7295 }
7296
7305 @java.lang.Override
7307 if (dummyConstraintBuilder_ == null) {
7308 if (constraintCase_ == 30) {
7309 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
7310 }
7311 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7312 } else {
7313 if (constraintCase_ == 30) {
7314 return dummyConstraintBuilder_.getMessage();
7315 }
7316 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7317 }
7318 }
7319
7327 public Builder setDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value) {
7328 if (dummyConstraintBuilder_ == null) {
7329 if (value == null) {
7330 throw new NullPointerException();
7331 }
7332 constraint_ = value;
7333 onChanged();
7334 } else {
7335 dummyConstraintBuilder_.setMessage(value);
7336 }
7337 constraintCase_ = 30;
7338 return this;
7339 }
7340
7348 public Builder setDummyConstraint(
7349 com.google.ortools.sat.ListOfVariablesProto.Builder builderForValue) {
7350 if (dummyConstraintBuilder_ == null) {
7351 constraint_ = builderForValue.build();
7352 onChanged();
7353 } else {
7354 dummyConstraintBuilder_.setMessage(builderForValue.build());
7355 }
7356 constraintCase_ = 30;
7357 return this;
7358 }
7359
7367 public Builder mergeDummyConstraint(com.google.ortools.sat.ListOfVariablesProto value) {
7368 if (dummyConstraintBuilder_ == null) {
7369 if (constraintCase_ == 30 &&
7370 constraint_ != com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance()) {
7371 constraint_ = com.google.ortools.sat.ListOfVariablesProto.newBuilder((com.google.ortools.sat.ListOfVariablesProto) constraint_)
7372 .mergeFrom(value).buildPartial();
7373 } else {
7374 constraint_ = value;
7375 }
7376 onChanged();
7377 } else {
7378 if (constraintCase_ == 30) {
7379 dummyConstraintBuilder_.mergeFrom(value);
7380 } else {
7381 dummyConstraintBuilder_.setMessage(value);
7382 }
7383 }
7384 constraintCase_ = 30;
7385 return this;
7386 }
7387
7395 public Builder clearDummyConstraint() {
7396 if (dummyConstraintBuilder_ == null) {
7397 if (constraintCase_ == 30) {
7398 constraintCase_ = 0;
7399 constraint_ = null;
7400 onChanged();
7401 }
7402 } else {
7403 if (constraintCase_ == 30) {
7404 constraintCase_ = 0;
7405 constraint_ = null;
7406 }
7407 dummyConstraintBuilder_.clear();
7408 }
7409 return this;
7410 }
7411
7420 return internalGetDummyConstraintFieldBuilder().getBuilder();
7421 }
7422
7430 @java.lang.Override
7432 if ((constraintCase_ == 30) && (dummyConstraintBuilder_ != null)) {
7433 return dummyConstraintBuilder_.getMessageOrBuilder();
7434 } else {
7435 if (constraintCase_ == 30) {
7436 return (com.google.ortools.sat.ListOfVariablesProto) constraint_;
7437 }
7438 return com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7439 }
7440 }
7441
7449 private com.google.protobuf.SingleFieldBuilder<
7450 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder>
7451 internalGetDummyConstraintFieldBuilder() {
7452 if (dummyConstraintBuilder_ == null) {
7453 if (!(constraintCase_ == 30)) {
7454 constraint_ = com.google.ortools.sat.ListOfVariablesProto.getDefaultInstance();
7455 }
7456 dummyConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7457 com.google.ortools.sat.ListOfVariablesProto, com.google.ortools.sat.ListOfVariablesProto.Builder, com.google.ortools.sat.ListOfVariablesProtoOrBuilder>(
7458 (com.google.ortools.sat.ListOfVariablesProto) constraint_,
7459 getParentForChildren(),
7460 isClean());
7461 constraint_ = null;
7462 }
7463 constraintCase_ = 30;
7464 onChanged();
7465 return dummyConstraintBuilder_;
7466 }
7467
7468 // @@protoc_insertion_point(builder_scope:operations_research.sat.ConstraintProto)
7469 }
7470
7471 // @@protoc_insertion_point(class_scope:operations_research.sat.ConstraintProto)
7472 private static final com.google.ortools.sat.ConstraintProto DEFAULT_INSTANCE;
7473 static {
7474 DEFAULT_INSTANCE = new com.google.ortools.sat.ConstraintProto();
7475 }
7476
7478 return DEFAULT_INSTANCE;
7479 }
7480
7481 private static final com.google.protobuf.Parser<ConstraintProto>
7482 PARSER = new com.google.protobuf.AbstractParser<ConstraintProto>() {
7483 @java.lang.Override
7484 public ConstraintProto parsePartialFrom(
7485 com.google.protobuf.CodedInputStream input,
7486 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7487 throws com.google.protobuf.InvalidProtocolBufferException {
7488 Builder builder = newBuilder();
7489 try {
7490 builder.mergeFrom(input, extensionRegistry);
7491 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7492 throw e.setUnfinishedMessage(builder.buildPartial());
7493 } catch (com.google.protobuf.UninitializedMessageException e) {
7494 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
7495 } catch (java.io.IOException e) {
7496 throw new com.google.protobuf.InvalidProtocolBufferException(e)
7497 .setUnfinishedMessage(builder.buildPartial());
7498 }
7499 return builder.buildPartial();
7500 }
7501 };
7502
7503 public static com.google.protobuf.Parser<ConstraintProto> parser() {
7504 return PARSER;
7505 }
7506
7507 @java.lang.Override
7508 public com.google.protobuf.Parser<ConstraintProto> getParserForType() {
7509 return PARSER;
7510 }
7511
7512 @java.lang.Override
7514 return DEFAULT_INSTANCE;
7515 }
7516
7517}
7518
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()