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