514 int size = memoizedSize;
515 if (size != -1)
return size;
518 if (((bitField0_ & 0x00000001) != 0)) {
519 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
521 if (generalConstraintCase_ == 2) {
522 size += com.google.protobuf.CodedOutputStream
523 .computeMessageSize(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
525 if (generalConstraintCase_ == 3) {
526 size += com.google.protobuf.CodedOutputStream
527 .computeMessageSize(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
529 if (generalConstraintCase_ == 4) {
530 size += com.google.protobuf.CodedOutputStream
531 .computeMessageSize(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
533 if (generalConstraintCase_ == 5) {
534 size += com.google.protobuf.CodedOutputStream
535 .computeMessageSize(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
537 if (generalConstraintCase_ == 6) {
538 size += com.google.protobuf.CodedOutputStream
539 .computeMessageSize(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
541 if (generalConstraintCase_ == 7) {
542 size += com.google.protobuf.CodedOutputStream
543 .computeMessageSize(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
545 if (generalConstraintCase_ == 8) {
546 size += com.google.protobuf.CodedOutputStream
547 .computeMessageSize(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
549 if (generalConstraintCase_ == 9) {
550 size += com.google.protobuf.CodedOutputStream
551 .computeMessageSize(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
553 size += getUnknownFields().getSerializedSize();
765 public static final class Builder
extends
766 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
769 public static final com.google.protobuf.Descriptors.Descriptor
771 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
775 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
777 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
778 .ensureFieldAccessorsInitialized(
779 com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class);
788 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
797 if (indicatorConstraintBuilder_ !=
null) {
798 indicatorConstraintBuilder_.clear();
800 if (sosConstraintBuilder_ !=
null) {
801 sosConstraintBuilder_.clear();
803 if (quadraticConstraintBuilder_ !=
null) {
804 quadraticConstraintBuilder_.clear();
806 if (absConstraintBuilder_ !=
null) {
807 absConstraintBuilder_.clear();
809 if (andConstraintBuilder_ !=
null) {
810 andConstraintBuilder_.clear();
812 if (orConstraintBuilder_ !=
null) {
813 orConstraintBuilder_.clear();
815 if (minConstraintBuilder_ !=
null) {
816 minConstraintBuilder_.clear();
818 if (maxConstraintBuilder_ !=
null) {
819 maxConstraintBuilder_.clear();
821 generalConstraintCase_ = 0;
822 generalConstraint_ =
null;
827 public com.google.protobuf.Descriptors.Descriptor
829 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
834 return com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance();
841 throw newUninitializedMessageException(result);
849 if (bitField0_ != 0) { buildPartial0(result); }
850 buildPartialOneofs(result);
855 private void buildPartial0(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
856 int from_bitField0_ = bitField0_;
857 int to_bitField0_ = 0;
858 if (((from_bitField0_ & 0x00000001) != 0)) {
859 result.name_ = name_;
860 to_bitField0_ |= 0x00000001;
862 result.bitField0_ |= to_bitField0_;
865 private void buildPartialOneofs(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
866 result.generalConstraintCase_ = generalConstraintCase_;
867 result.generalConstraint_ = this.generalConstraint_;
868 if (generalConstraintCase_ == 2 &&
869 indicatorConstraintBuilder_ !=
null) {
870 result.generalConstraint_ = indicatorConstraintBuilder_.build();
872 if (generalConstraintCase_ == 3 &&
873 sosConstraintBuilder_ !=
null) {
874 result.generalConstraint_ = sosConstraintBuilder_.build();
876 if (generalConstraintCase_ == 4 &&
877 quadraticConstraintBuilder_ !=
null) {
878 result.generalConstraint_ = quadraticConstraintBuilder_.build();
880 if (generalConstraintCase_ == 5 &&
881 absConstraintBuilder_ !=
null) {
882 result.generalConstraint_ = absConstraintBuilder_.build();
884 if (generalConstraintCase_ == 6 &&
885 andConstraintBuilder_ !=
null) {
886 result.generalConstraint_ = andConstraintBuilder_.build();
888 if (generalConstraintCase_ == 7 &&
889 orConstraintBuilder_ !=
null) {
890 result.generalConstraint_ = orConstraintBuilder_.build();
892 if (generalConstraintCase_ == 8 &&
893 minConstraintBuilder_ !=
null) {
894 result.generalConstraint_ = minConstraintBuilder_.build();
896 if (generalConstraintCase_ == 9 &&
897 maxConstraintBuilder_ !=
null) {
898 result.generalConstraint_ = maxConstraintBuilder_.build();
903 public Builder
mergeFrom(com.google.protobuf.Message other) {
904 if (other instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto) {
905 return mergeFrom((com.google.ortools.linearsolver.MPGeneralConstraintProto)other);
907 super.mergeFrom(other);
912 public Builder
mergeFrom(com.google.ortools.linearsolver.MPGeneralConstraintProto other) {
913 if (other == com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance())
return this;
914 if (other.hasName()) {
916 bitField0_ |= 0x00000001;
919 switch (other.getGeneralConstraintCase()) {
920 case INDICATOR_CONSTRAINT: {
924 case SOS_CONSTRAINT: {
928 case QUADRATIC_CONSTRAINT: {
932 case ABS_CONSTRAINT: {
936 case AND_CONSTRAINT: {
940 case OR_CONSTRAINT: {
944 case MIN_CONSTRAINT: {
948 case MAX_CONSTRAINT: {
952 case GENERALCONSTRAINT_NOT_SET: {
956 this.mergeUnknownFields(other.getUnknownFields());
968 com.google.protobuf.CodedInputStream input,
969 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
970 throws java.io.IOException {
971 if (extensionRegistry ==
null) {
972 throw new java.lang.NullPointerException();
975 boolean done =
false;
977 int tag = input.readTag();
983 name_ = input.readBytes();
984 bitField0_ |= 0x00000001;
989 getIndicatorConstraintFieldBuilder().getBuilder(),
991 generalConstraintCase_ = 2;
996 getSosConstraintFieldBuilder().getBuilder(),
998 generalConstraintCase_ = 3;
1003 getQuadraticConstraintFieldBuilder().getBuilder(),
1005 generalConstraintCase_ = 4;
1010 getAbsConstraintFieldBuilder().getBuilder(),
1012 generalConstraintCase_ = 5;
1017 getAndConstraintFieldBuilder().getBuilder(),
1019 generalConstraintCase_ = 6;
1024 getOrConstraintFieldBuilder().getBuilder(),
1026 generalConstraintCase_ = 7;
1031 getMinConstraintFieldBuilder().getBuilder(),
1033 generalConstraintCase_ = 8;
1038 getMaxConstraintFieldBuilder().getBuilder(),
1040 generalConstraintCase_ = 9;
1044 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1051 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1052 throw e.unwrapIOException();
1058 private int generalConstraintCase_ = 0;
1059 private java.lang.Object generalConstraint_;
1063 generalConstraintCase_);
1067 generalConstraintCase_ = 0;
1068 generalConstraint_ =
null;
1073 private int bitField0_;
1075 private java.lang.Object name_ =
"";
1085 return ((bitField0_ & 0x00000001) != 0);
1096 java.lang.Object ref = name_;
1097 if (!(ref instanceof java.lang.String)) {
1098 com.google.protobuf.ByteString bs =
1099 (com.google.protobuf.ByteString) ref;
1100 java.lang.String s = bs.toStringUtf8();
1101 if (bs.isValidUtf8()) {
1106 return (java.lang.String) ref;
1117 public com.google.protobuf.ByteString
1119 java.lang.Object ref = name_;
1120 if (ref instanceof String) {
1121 com.google.protobuf.ByteString b =
1122 com.google.protobuf.ByteString.copyFromUtf8(
1123 (java.lang.String) ref);
1127 return (com.google.protobuf.ByteString) ref;
1140 java.lang.String value) {
1141 if (value ==
null) {
throw new NullPointerException(); }
1143 bitField0_ |= 0x00000001;
1157 bitField0_ = (bitField0_ & ~0x00000001);
1171 com.google.protobuf.ByteString value) {
1172 if (value ==
null) {
throw new NullPointerException(); }
1174 bitField0_ |= 0x00000001;
1179 private com.google.protobuf.SingleFieldBuilder<
1180 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder> indicatorConstraintBuilder_;
1187 return generalConstraintCase_ == 2;
1195 if (indicatorConstraintBuilder_ ==
null) {
1196 if (generalConstraintCase_ == 2) {
1197 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1199 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1201 if (generalConstraintCase_ == 2) {
1202 return indicatorConstraintBuilder_.getMessage();
1204 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1211 if (indicatorConstraintBuilder_ ==
null) {
1212 if (value ==
null) {
1213 throw new NullPointerException();
1215 generalConstraint_ = value;
1218 indicatorConstraintBuilder_.setMessage(value);
1220 generalConstraintCase_ = 2;
1227 com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue) {
1228 if (indicatorConstraintBuilder_ ==
null) {
1229 generalConstraint_ = builderForValue.build();
1232 indicatorConstraintBuilder_.setMessage(builderForValue.build());
1234 generalConstraintCase_ = 2;
1241 if (indicatorConstraintBuilder_ ==
null) {
1242 if (generalConstraintCase_ == 2 &&
1243 generalConstraint_ != com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance()) {
1244 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.newBuilder((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_)
1245 .mergeFrom(value).buildPartial();
1247 generalConstraint_ = value;
1251 if (generalConstraintCase_ == 2) {
1252 indicatorConstraintBuilder_.mergeFrom(value);
1254 indicatorConstraintBuilder_.setMessage(value);
1257 generalConstraintCase_ = 2;
1264 if (indicatorConstraintBuilder_ ==
null) {
1265 if (generalConstraintCase_ == 2) {
1266 generalConstraintCase_ = 0;
1267 generalConstraint_ =
null;
1271 if (generalConstraintCase_ == 2) {
1272 generalConstraintCase_ = 0;
1273 generalConstraint_ =
null;
1275 indicatorConstraintBuilder_.clear();
1283 return getIndicatorConstraintFieldBuilder().getBuilder();
1290 if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ !=
null)) {
1291 return indicatorConstraintBuilder_.getMessageOrBuilder();
1293 if (generalConstraintCase_ == 2) {
1294 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1296 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1302 private com.google.protobuf.SingleFieldBuilder<
1303 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>
1304 getIndicatorConstraintFieldBuilder() {
1305 if (indicatorConstraintBuilder_ ==
null) {
1306 if (!(generalConstraintCase_ == 2)) {
1307 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1309 indicatorConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1310 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>(
1311 (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_,
1312 getParentForChildren(),
1314 generalConstraint_ =
null;
1316 generalConstraintCase_ = 2;
1318 return indicatorConstraintBuilder_;
1321 private com.google.protobuf.SingleFieldBuilder<
1322 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder> sosConstraintBuilder_;
1329 return generalConstraintCase_ == 3;
1337 if (sosConstraintBuilder_ ==
null) {
1338 if (generalConstraintCase_ == 3) {
1339 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1341 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1343 if (generalConstraintCase_ == 3) {
1344 return sosConstraintBuilder_.getMessage();
1346 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1353 if (sosConstraintBuilder_ ==
null) {
1354 if (value ==
null) {
1355 throw new NullPointerException();
1357 generalConstraint_ = value;
1360 sosConstraintBuilder_.setMessage(value);
1362 generalConstraintCase_ = 3;
1369 com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue) {
1370 if (sosConstraintBuilder_ ==
null) {
1371 generalConstraint_ = builderForValue.build();
1374 sosConstraintBuilder_.setMessage(builderForValue.build());
1376 generalConstraintCase_ = 3;
1383 if (sosConstraintBuilder_ ==
null) {
1384 if (generalConstraintCase_ == 3 &&
1385 generalConstraint_ != com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance()) {
1386 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.newBuilder((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_)
1387 .mergeFrom(value).buildPartial();
1389 generalConstraint_ = value;
1393 if (generalConstraintCase_ == 3) {
1394 sosConstraintBuilder_.mergeFrom(value);
1396 sosConstraintBuilder_.setMessage(value);
1399 generalConstraintCase_ = 3;
1406 if (sosConstraintBuilder_ ==
null) {
1407 if (generalConstraintCase_ == 3) {
1408 generalConstraintCase_ = 0;
1409 generalConstraint_ =
null;
1413 if (generalConstraintCase_ == 3) {
1414 generalConstraintCase_ = 0;
1415 generalConstraint_ =
null;
1417 sosConstraintBuilder_.clear();
1425 return getSosConstraintFieldBuilder().getBuilder();
1432 if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ !=
null)) {
1433 return sosConstraintBuilder_.getMessageOrBuilder();
1435 if (generalConstraintCase_ == 3) {
1436 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1438 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1444 private com.google.protobuf.SingleFieldBuilder<
1445 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>
1446 getSosConstraintFieldBuilder() {
1447 if (sosConstraintBuilder_ ==
null) {
1448 if (!(generalConstraintCase_ == 3)) {
1449 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1451 sosConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1452 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>(
1453 (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_,
1454 getParentForChildren(),
1456 generalConstraint_ =
null;
1458 generalConstraintCase_ = 3;
1460 return sosConstraintBuilder_;
1463 private com.google.protobuf.SingleFieldBuilder<
1464 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder> quadraticConstraintBuilder_;
1471 return generalConstraintCase_ == 4;
1479 if (quadraticConstraintBuilder_ ==
null) {
1480 if (generalConstraintCase_ == 4) {
1481 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1483 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1485 if (generalConstraintCase_ == 4) {
1486 return quadraticConstraintBuilder_.getMessage();
1488 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1495 if (quadraticConstraintBuilder_ ==
null) {
1496 if (value ==
null) {
1497 throw new NullPointerException();
1499 generalConstraint_ = value;
1502 quadraticConstraintBuilder_.setMessage(value);
1504 generalConstraintCase_ = 4;
1511 com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue) {
1512 if (quadraticConstraintBuilder_ ==
null) {
1513 generalConstraint_ = builderForValue.build();
1516 quadraticConstraintBuilder_.setMessage(builderForValue.build());
1518 generalConstraintCase_ = 4;
1525 if (quadraticConstraintBuilder_ ==
null) {
1526 if (generalConstraintCase_ == 4 &&
1527 generalConstraint_ != com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance()) {
1528 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.newBuilder((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_)
1529 .mergeFrom(value).buildPartial();
1531 generalConstraint_ = value;
1535 if (generalConstraintCase_ == 4) {
1536 quadraticConstraintBuilder_.mergeFrom(value);
1538 quadraticConstraintBuilder_.setMessage(value);
1541 generalConstraintCase_ = 4;
1548 if (quadraticConstraintBuilder_ ==
null) {
1549 if (generalConstraintCase_ == 4) {
1550 generalConstraintCase_ = 0;
1551 generalConstraint_ =
null;
1555 if (generalConstraintCase_ == 4) {
1556 generalConstraintCase_ = 0;
1557 generalConstraint_ =
null;
1559 quadraticConstraintBuilder_.clear();
1567 return getQuadraticConstraintFieldBuilder().getBuilder();
1574 if ((generalConstraintCase_ == 4) && (quadraticConstraintBuilder_ !=
null)) {
1575 return quadraticConstraintBuilder_.getMessageOrBuilder();
1577 if (generalConstraintCase_ == 4) {
1578 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1580 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1586 private com.google.protobuf.SingleFieldBuilder<
1587 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>
1588 getQuadraticConstraintFieldBuilder() {
1589 if (quadraticConstraintBuilder_ ==
null) {
1590 if (!(generalConstraintCase_ == 4)) {
1591 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1593 quadraticConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1594 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>(
1595 (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_,
1596 getParentForChildren(),
1598 generalConstraint_ =
null;
1600 generalConstraintCase_ = 4;
1602 return quadraticConstraintBuilder_;
1605 private com.google.protobuf.SingleFieldBuilder<
1606 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder> absConstraintBuilder_;
1613 return generalConstraintCase_ == 5;
1621 if (absConstraintBuilder_ ==
null) {
1622 if (generalConstraintCase_ == 5) {
1623 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1625 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1627 if (generalConstraintCase_ == 5) {
1628 return absConstraintBuilder_.getMessage();
1630 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1637 if (absConstraintBuilder_ ==
null) {
1638 if (value ==
null) {
1639 throw new NullPointerException();
1641 generalConstraint_ = value;
1644 absConstraintBuilder_.setMessage(value);
1646 generalConstraintCase_ = 5;
1653 com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue) {
1654 if (absConstraintBuilder_ ==
null) {
1655 generalConstraint_ = builderForValue.build();
1658 absConstraintBuilder_.setMessage(builderForValue.build());
1660 generalConstraintCase_ = 5;
1667 if (absConstraintBuilder_ ==
null) {
1668 if (generalConstraintCase_ == 5 &&
1669 generalConstraint_ != com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance()) {
1670 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.newBuilder((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_)
1671 .mergeFrom(value).buildPartial();
1673 generalConstraint_ = value;
1677 if (generalConstraintCase_ == 5) {
1678 absConstraintBuilder_.mergeFrom(value);
1680 absConstraintBuilder_.setMessage(value);
1683 generalConstraintCase_ = 5;
1690 if (absConstraintBuilder_ ==
null) {
1691 if (generalConstraintCase_ == 5) {
1692 generalConstraintCase_ = 0;
1693 generalConstraint_ =
null;
1697 if (generalConstraintCase_ == 5) {
1698 generalConstraintCase_ = 0;
1699 generalConstraint_ =
null;
1701 absConstraintBuilder_.clear();
1709 return getAbsConstraintFieldBuilder().getBuilder();
1716 if ((generalConstraintCase_ == 5) && (absConstraintBuilder_ !=
null)) {
1717 return absConstraintBuilder_.getMessageOrBuilder();
1719 if (generalConstraintCase_ == 5) {
1720 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1722 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1728 private com.google.protobuf.SingleFieldBuilder<
1729 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>
1730 getAbsConstraintFieldBuilder() {
1731 if (absConstraintBuilder_ ==
null) {
1732 if (!(generalConstraintCase_ == 5)) {
1733 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1735 absConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1736 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>(
1737 (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_,
1738 getParentForChildren(),
1740 generalConstraint_ =
null;
1742 generalConstraintCase_ = 5;
1744 return absConstraintBuilder_;
1747 private com.google.protobuf.SingleFieldBuilder<
1748 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> andConstraintBuilder_;
1760 return generalConstraintCase_ == 6;
1773 if (andConstraintBuilder_ ==
null) {
1774 if (generalConstraintCase_ == 6) {
1775 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1777 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1779 if (generalConstraintCase_ == 6) {
1780 return andConstraintBuilder_.getMessage();
1782 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1794 if (andConstraintBuilder_ ==
null) {
1795 if (value ==
null) {
1796 throw new NullPointerException();
1798 generalConstraint_ = value;
1801 andConstraintBuilder_.setMessage(value);
1803 generalConstraintCase_ = 6;
1815 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
1816 if (andConstraintBuilder_ ==
null) {
1817 generalConstraint_ = builderForValue.build();
1820 andConstraintBuilder_.setMessage(builderForValue.build());
1822 generalConstraintCase_ = 6;
1834 if (andConstraintBuilder_ ==
null) {
1835 if (generalConstraintCase_ == 6 &&
1836 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
1837 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
1838 .mergeFrom(value).buildPartial();
1840 generalConstraint_ = value;
1844 if (generalConstraintCase_ == 6) {
1845 andConstraintBuilder_.mergeFrom(value);
1847 andConstraintBuilder_.setMessage(value);
1850 generalConstraintCase_ = 6;
1862 if (andConstraintBuilder_ ==
null) {
1863 if (generalConstraintCase_ == 6) {
1864 generalConstraintCase_ = 0;
1865 generalConstraint_ =
null;
1869 if (generalConstraintCase_ == 6) {
1870 generalConstraintCase_ = 0;
1871 generalConstraint_ =
null;
1873 andConstraintBuilder_.clear();
1886 return getAndConstraintFieldBuilder().getBuilder();
1898 if ((generalConstraintCase_ == 6) && (andConstraintBuilder_ !=
null)) {
1899 return andConstraintBuilder_.getMessageOrBuilder();
1901 if (generalConstraintCase_ == 6) {
1902 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1904 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1915 private com.google.protobuf.SingleFieldBuilder<
1916 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
1917 getAndConstraintFieldBuilder() {
1918 if (andConstraintBuilder_ ==
null) {
1919 if (!(generalConstraintCase_ == 6)) {
1920 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1922 andConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1923 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
1924 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
1925 getParentForChildren(),
1927 generalConstraint_ =
null;
1929 generalConstraintCase_ = 6;
1931 return andConstraintBuilder_;
1934 private com.google.protobuf.SingleFieldBuilder<
1935 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> orConstraintBuilder_;
1947 return generalConstraintCase_ == 7;
1960 if (orConstraintBuilder_ ==
null) {
1961 if (generalConstraintCase_ == 7) {
1962 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1964 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1966 if (generalConstraintCase_ == 7) {
1967 return orConstraintBuilder_.getMessage();
1969 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1981 if (orConstraintBuilder_ ==
null) {
1982 if (value ==
null) {
1983 throw new NullPointerException();
1985 generalConstraint_ = value;
1988 orConstraintBuilder_.setMessage(value);
1990 generalConstraintCase_ = 7;
2002 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
2003 if (orConstraintBuilder_ ==
null) {
2004 generalConstraint_ = builderForValue.build();
2007 orConstraintBuilder_.setMessage(builderForValue.build());
2009 generalConstraintCase_ = 7;
2021 if (orConstraintBuilder_ ==
null) {
2022 if (generalConstraintCase_ == 7 &&
2023 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
2024 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
2025 .mergeFrom(value).buildPartial();
2027 generalConstraint_ = value;
2031 if (generalConstraintCase_ == 7) {
2032 orConstraintBuilder_.mergeFrom(value);
2034 orConstraintBuilder_.setMessage(value);
2037 generalConstraintCase_ = 7;
2049 if (orConstraintBuilder_ ==
null) {
2050 if (generalConstraintCase_ == 7) {
2051 generalConstraintCase_ = 0;
2052 generalConstraint_ =
null;
2056 if (generalConstraintCase_ == 7) {
2057 generalConstraintCase_ = 0;
2058 generalConstraint_ =
null;
2060 orConstraintBuilder_.clear();
2073 return getOrConstraintFieldBuilder().getBuilder();
2085 if ((generalConstraintCase_ == 7) && (orConstraintBuilder_ !=
null)) {
2086 return orConstraintBuilder_.getMessageOrBuilder();
2088 if (generalConstraintCase_ == 7) {
2089 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
2091 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2102 private com.google.protobuf.SingleFieldBuilder<
2103 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
2104 getOrConstraintFieldBuilder() {
2105 if (orConstraintBuilder_ ==
null) {
2106 if (!(generalConstraintCase_ == 7)) {
2107 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2109 orConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2110 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
2111 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
2112 getParentForChildren(),
2114 generalConstraint_ =
null;
2116 generalConstraintCase_ = 7;
2118 return orConstraintBuilder_;
2121 private com.google.protobuf.SingleFieldBuilder<
2122 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> minConstraintBuilder_;
2133 return generalConstraintCase_ == 8;
2145 if (minConstraintBuilder_ ==
null) {
2146 if (generalConstraintCase_ == 8) {
2147 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2149 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2151 if (generalConstraintCase_ == 8) {
2152 return minConstraintBuilder_.getMessage();
2154 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2164 public Builder
setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2165 if (minConstraintBuilder_ ==
null) {
2166 if (value ==
null) {
2167 throw new NullPointerException();
2169 generalConstraint_ = value;
2172 minConstraintBuilder_.setMessage(value);
2174 generalConstraintCase_ = 8;
2185 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2186 if (minConstraintBuilder_ ==
null) {
2187 generalConstraint_ = builderForValue.build();
2190 minConstraintBuilder_.setMessage(builderForValue.build());
2192 generalConstraintCase_ = 8;
2203 if (minConstraintBuilder_ ==
null) {
2204 if (generalConstraintCase_ == 8 &&
2205 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2206 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2207 .mergeFrom(value).buildPartial();
2209 generalConstraint_ = value;
2213 if (generalConstraintCase_ == 8) {
2214 minConstraintBuilder_.mergeFrom(value);
2216 minConstraintBuilder_.setMessage(value);
2219 generalConstraintCase_ = 8;
2230 if (minConstraintBuilder_ ==
null) {
2231 if (generalConstraintCase_ == 8) {
2232 generalConstraintCase_ = 0;
2233 generalConstraint_ =
null;
2237 if (generalConstraintCase_ == 8) {
2238 generalConstraintCase_ = 0;
2239 generalConstraint_ =
null;
2241 minConstraintBuilder_.clear();
2253 return getMinConstraintFieldBuilder().getBuilder();
2264 if ((generalConstraintCase_ == 8) && (minConstraintBuilder_ !=
null)) {
2265 return minConstraintBuilder_.getMessageOrBuilder();
2267 if (generalConstraintCase_ == 8) {
2268 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2270 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2280 private com.google.protobuf.SingleFieldBuilder<
2281 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2282 getMinConstraintFieldBuilder() {
2283 if (minConstraintBuilder_ ==
null) {
2284 if (!(generalConstraintCase_ == 8)) {
2285 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2287 minConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2288 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2289 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2290 getParentForChildren(),
2292 generalConstraint_ =
null;
2294 generalConstraintCase_ = 8;
2296 return minConstraintBuilder_;
2299 private com.google.protobuf.SingleFieldBuilder<
2300 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> maxConstraintBuilder_;
2311 return generalConstraintCase_ == 9;
2323 if (maxConstraintBuilder_ ==
null) {
2324 if (generalConstraintCase_ == 9) {
2325 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2327 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2329 if (generalConstraintCase_ == 9) {
2330 return maxConstraintBuilder_.getMessage();
2332 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2342 public Builder
setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2343 if (maxConstraintBuilder_ ==
null) {
2344 if (value ==
null) {
2345 throw new NullPointerException();
2347 generalConstraint_ = value;
2350 maxConstraintBuilder_.setMessage(value);
2352 generalConstraintCase_ = 9;
2363 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2364 if (maxConstraintBuilder_ ==
null) {
2365 generalConstraint_ = builderForValue.build();
2368 maxConstraintBuilder_.setMessage(builderForValue.build());
2370 generalConstraintCase_ = 9;
2381 if (maxConstraintBuilder_ ==
null) {
2382 if (generalConstraintCase_ == 9 &&
2383 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2384 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2385 .mergeFrom(value).buildPartial();
2387 generalConstraint_ = value;
2391 if (generalConstraintCase_ == 9) {
2392 maxConstraintBuilder_.mergeFrom(value);
2394 maxConstraintBuilder_.setMessage(value);
2397 generalConstraintCase_ = 9;
2408 if (maxConstraintBuilder_ ==
null) {
2409 if (generalConstraintCase_ == 9) {
2410 generalConstraintCase_ = 0;
2411 generalConstraint_ =
null;
2415 if (generalConstraintCase_ == 9) {
2416 generalConstraintCase_ = 0;
2417 generalConstraint_ =
null;
2419 maxConstraintBuilder_.clear();
2431 return getMaxConstraintFieldBuilder().getBuilder();
2442 if ((generalConstraintCase_ == 9) && (maxConstraintBuilder_ !=
null)) {
2443 return maxConstraintBuilder_.getMessageOrBuilder();
2445 if (generalConstraintCase_ == 9) {
2446 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2448 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2458 private com.google.protobuf.SingleFieldBuilder<
2459 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2460 getMaxConstraintFieldBuilder() {
2461 if (maxConstraintBuilder_ ==
null) {
2462 if (!(generalConstraintCase_ == 9)) {
2463 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2465 maxConstraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
2466 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2467 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2468 getParentForChildren(),
2470 generalConstraint_ =
null;
2472 generalConstraintCase_ = 9;
2474 return maxConstraintBuilder_;