Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPGeneralConstraintProto.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/linear_solver/linear_solver.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.linearsolver;
7
15@com.google.protobuf.Generated
16public final class MPGeneralConstraintProto extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.MPGeneralConstraintProto)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 MPGeneralConstraintProto.class.getName());
29 }
30 // Use MPGeneralConstraintProto.newBuilder() to construct.
31 private MPGeneralConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private MPGeneralConstraintProto() {
35 name_ = "";
36 }
37
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
41 }
42
43 @java.lang.Override
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class);
49 }
50
51 private int bitField0_;
52 private int generalConstraintCase_ = 0;
53 @SuppressWarnings("serial")
54 private java.lang.Object generalConstraint_;
55 public enum GeneralConstraintCase
56 implements com.google.protobuf.Internal.EnumLite,
57 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
67 private final int value;
68 private GeneralConstraintCase(int value) {
69 this.value = value;
70 }
76 @java.lang.Deprecated
77 public static GeneralConstraintCase valueOf(int value) {
78 return forNumber(value);
79 }
80
81 public static GeneralConstraintCase forNumber(int value) {
82 switch (value) {
83 case 2: return INDICATOR_CONSTRAINT;
84 case 3: return SOS_CONSTRAINT;
85 case 4: return QUADRATIC_CONSTRAINT;
86 case 5: return ABS_CONSTRAINT;
87 case 6: return AND_CONSTRAINT;
88 case 7: return OR_CONSTRAINT;
89 case 8: return MIN_CONSTRAINT;
90 case 9: return MAX_CONSTRAINT;
91 case 0: return GENERALCONSTRAINT_NOT_SET;
92 default: return null;
93 }
94 }
95 public int getNumber() {
96 return this.value;
97 }
98 };
99
100 public GeneralConstraintCase
103 generalConstraintCase_);
104 }
105
106 public static final int NAME_FIELD_NUMBER = 1;
107 @SuppressWarnings("serial")
108 private volatile java.lang.Object name_ = "";
117 @java.lang.Override
118 public boolean hasName() {
119 return ((bitField0_ & 0x00000001) != 0);
120 }
121
129 @java.lang.Override
130 public java.lang.String getName() {
131 java.lang.Object ref = name_;
132 if (ref instanceof java.lang.String) {
133 return (java.lang.String) ref;
134 } else {
135 com.google.protobuf.ByteString bs =
136 (com.google.protobuf.ByteString) ref;
137 java.lang.String s = bs.toStringUtf8();
138 if (bs.isValidUtf8()) {
139 name_ = s;
140 }
141 return s;
142 }
143 }
144
152 @java.lang.Override
153 public com.google.protobuf.ByteString
155 java.lang.Object ref = name_;
156 if (ref instanceof java.lang.String) {
157 com.google.protobuf.ByteString b =
158 com.google.protobuf.ByteString.copyFromUtf8(
159 (java.lang.String) ref);
160 name_ = b;
161 return b;
162 } else {
163 return (com.google.protobuf.ByteString) ref;
164 }
165 }
166
167 public static final int INDICATOR_CONSTRAINT_FIELD_NUMBER = 2;
172 @java.lang.Override
173 public boolean hasIndicatorConstraint() {
174 return generalConstraintCase_ == 2;
175 }
176
180 @java.lang.Override
182 if (generalConstraintCase_ == 2) {
183 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
184 }
185 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
186 }
187
190 @java.lang.Override
192 if (generalConstraintCase_ == 2) {
193 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
194 }
195 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
196 }
197
198 public static final int SOS_CONSTRAINT_FIELD_NUMBER = 3;
203 @java.lang.Override
204 public boolean hasSosConstraint() {
205 return generalConstraintCase_ == 3;
206 }
207
211 @java.lang.Override
213 if (generalConstraintCase_ == 3) {
214 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
215 }
216 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
217 }
218
221 @java.lang.Override
223 if (generalConstraintCase_ == 3) {
224 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
225 }
226 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
227 }
228
229 public static final int QUADRATIC_CONSTRAINT_FIELD_NUMBER = 4;
234 @java.lang.Override
235 public boolean hasQuadraticConstraint() {
236 return generalConstraintCase_ == 4;
237 }
238
242 @java.lang.Override
244 if (generalConstraintCase_ == 4) {
245 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
246 }
247 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
248 }
249
252 @java.lang.Override
254 if (generalConstraintCase_ == 4) {
255 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
256 }
257 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
258 }
259
260 public static final int ABS_CONSTRAINT_FIELD_NUMBER = 5;
265 @java.lang.Override
266 public boolean hasAbsConstraint() {
267 return generalConstraintCase_ == 5;
268 }
269
273 @java.lang.Override
275 if (generalConstraintCase_ == 5) {
276 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
277 }
278 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
279 }
280
283 @java.lang.Override
285 if (generalConstraintCase_ == 5) {
286 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
287 }
288 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
289 }
290
291 public static final int AND_CONSTRAINT_FIELD_NUMBER = 6;
301 @java.lang.Override
302 public boolean hasAndConstraint() {
303 return generalConstraintCase_ == 6;
304 }
305
314 @java.lang.Override
316 if (generalConstraintCase_ == 6) {
317 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
318 }
319 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
320 }
321
329 @java.lang.Override
331 if (generalConstraintCase_ == 6) {
332 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
333 }
334 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
335 }
336
337 public static final int OR_CONSTRAINT_FIELD_NUMBER = 7;
347 @java.lang.Override
348 public boolean hasOrConstraint() {
349 return generalConstraintCase_ == 7;
350 }
351
360 @java.lang.Override
362 if (generalConstraintCase_ == 7) {
363 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
364 }
365 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
366 }
367
375 @java.lang.Override
377 if (generalConstraintCase_ == 7) {
378 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
379 }
380 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
381 }
382
383 public static final int MIN_CONSTRAINT_FIELD_NUMBER = 8;
392 @java.lang.Override
393 public boolean hasMinConstraint() {
394 return generalConstraintCase_ == 8;
395 }
396
404 @java.lang.Override
406 if (generalConstraintCase_ == 8) {
407 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
408 }
409 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
410 }
411
418 @java.lang.Override
420 if (generalConstraintCase_ == 8) {
421 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
422 }
423 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
424 }
425
426 public static final int MAX_CONSTRAINT_FIELD_NUMBER = 9;
435 @java.lang.Override
436 public boolean hasMaxConstraint() {
437 return generalConstraintCase_ == 9;
438 }
439
447 @java.lang.Override
449 if (generalConstraintCase_ == 9) {
450 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
451 }
452 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
453 }
454
461 @java.lang.Override
463 if (generalConstraintCase_ == 9) {
464 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
465 }
466 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
467 }
468
469 private byte memoizedIsInitialized = -1;
470 @java.lang.Override
471 public final boolean isInitialized() {
472 byte isInitialized = memoizedIsInitialized;
473 if (isInitialized == 1) return true;
474 if (isInitialized == 0) return false;
475
476 memoizedIsInitialized = 1;
477 return true;
478 }
479
480 @java.lang.Override
481 public void writeTo(com.google.protobuf.CodedOutputStream output)
482 throws java.io.IOException {
483 if (((bitField0_ & 0x00000001) != 0)) {
484 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
485 }
486 if (generalConstraintCase_ == 2) {
487 output.writeMessage(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
488 }
489 if (generalConstraintCase_ == 3) {
490 output.writeMessage(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
491 }
492 if (generalConstraintCase_ == 4) {
493 output.writeMessage(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
494 }
495 if (generalConstraintCase_ == 5) {
496 output.writeMessage(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
497 }
498 if (generalConstraintCase_ == 6) {
499 output.writeMessage(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
500 }
501 if (generalConstraintCase_ == 7) {
502 output.writeMessage(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
503 }
504 if (generalConstraintCase_ == 8) {
505 output.writeMessage(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
506 }
507 if (generalConstraintCase_ == 9) {
508 output.writeMessage(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
509 }
510 getUnknownFields().writeTo(output);
511 }
512
513 @java.lang.Override
514 public int getSerializedSize() {
515 int size = memoizedSize;
516 if (size != -1) return size;
517
518 size = 0;
519 if (((bitField0_ & 0x00000001) != 0)) {
520 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
521 }
522 if (generalConstraintCase_ == 2) {
523 size += com.google.protobuf.CodedOutputStream
524 .computeMessageSize(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
525 }
526 if (generalConstraintCase_ == 3) {
527 size += com.google.protobuf.CodedOutputStream
528 .computeMessageSize(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
529 }
530 if (generalConstraintCase_ == 4) {
531 size += com.google.protobuf.CodedOutputStream
532 .computeMessageSize(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
533 }
534 if (generalConstraintCase_ == 5) {
535 size += com.google.protobuf.CodedOutputStream
536 .computeMessageSize(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
537 }
538 if (generalConstraintCase_ == 6) {
539 size += com.google.protobuf.CodedOutputStream
540 .computeMessageSize(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
541 }
542 if (generalConstraintCase_ == 7) {
543 size += com.google.protobuf.CodedOutputStream
544 .computeMessageSize(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
545 }
546 if (generalConstraintCase_ == 8) {
547 size += com.google.protobuf.CodedOutputStream
548 .computeMessageSize(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
549 }
550 if (generalConstraintCase_ == 9) {
551 size += com.google.protobuf.CodedOutputStream
552 .computeMessageSize(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
553 }
554 size += getUnknownFields().getSerializedSize();
555 memoizedSize = size;
556 return size;
557 }
558
559 @java.lang.Override
560 public boolean equals(final java.lang.Object obj) {
561 if (obj == this) {
562 return true;
563 }
564 if (!(obj instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto)) {
565 return super.equals(obj);
566 }
567 com.google.ortools.linearsolver.MPGeneralConstraintProto other = (com.google.ortools.linearsolver.MPGeneralConstraintProto) obj;
568
569 if (hasName() != other.hasName()) return false;
570 if (hasName()) {
571 if (!getName()
572 .equals(other.getName())) return false;
573 }
574 if (!getGeneralConstraintCase().equals(other.getGeneralConstraintCase())) return false;
575 switch (generalConstraintCase_) {
576 case 2:
578 .equals(other.getIndicatorConstraint())) return false;
579 break;
580 case 3:
581 if (!getSosConstraint()
582 .equals(other.getSosConstraint())) return false;
583 break;
584 case 4:
586 .equals(other.getQuadraticConstraint())) return false;
587 break;
588 case 5:
589 if (!getAbsConstraint()
590 .equals(other.getAbsConstraint())) return false;
591 break;
592 case 6:
593 if (!getAndConstraint()
594 .equals(other.getAndConstraint())) return false;
595 break;
596 case 7:
597 if (!getOrConstraint()
598 .equals(other.getOrConstraint())) return false;
599 break;
600 case 8:
601 if (!getMinConstraint()
602 .equals(other.getMinConstraint())) return false;
603 break;
604 case 9:
605 if (!getMaxConstraint()
606 .equals(other.getMaxConstraint())) return false;
607 break;
608 case 0:
609 default:
610 }
611 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
612 return true;
613 }
614
615 @java.lang.Override
616 public int hashCode() {
617 if (memoizedHashCode != 0) {
618 return memoizedHashCode;
619 }
620 int hash = 41;
621 hash = (19 * hash) + getDescriptor().hashCode();
622 if (hasName()) {
623 hash = (37 * hash) + NAME_FIELD_NUMBER;
624 hash = (53 * hash) + getName().hashCode();
625 }
626 switch (generalConstraintCase_) {
627 case 2:
628 hash = (37 * hash) + INDICATOR_CONSTRAINT_FIELD_NUMBER;
629 hash = (53 * hash) + getIndicatorConstraint().hashCode();
630 break;
631 case 3:
632 hash = (37 * hash) + SOS_CONSTRAINT_FIELD_NUMBER;
633 hash = (53 * hash) + getSosConstraint().hashCode();
634 break;
635 case 4:
636 hash = (37 * hash) + QUADRATIC_CONSTRAINT_FIELD_NUMBER;
637 hash = (53 * hash) + getQuadraticConstraint().hashCode();
638 break;
639 case 5:
640 hash = (37 * hash) + ABS_CONSTRAINT_FIELD_NUMBER;
641 hash = (53 * hash) + getAbsConstraint().hashCode();
642 break;
643 case 6:
644 hash = (37 * hash) + AND_CONSTRAINT_FIELD_NUMBER;
645 hash = (53 * hash) + getAndConstraint().hashCode();
646 break;
647 case 7:
648 hash = (37 * hash) + OR_CONSTRAINT_FIELD_NUMBER;
649 hash = (53 * hash) + getOrConstraint().hashCode();
650 break;
651 case 8:
652 hash = (37 * hash) + MIN_CONSTRAINT_FIELD_NUMBER;
653 hash = (53 * hash) + getMinConstraint().hashCode();
654 break;
655 case 9:
656 hash = (37 * hash) + MAX_CONSTRAINT_FIELD_NUMBER;
657 hash = (53 * hash) + getMaxConstraint().hashCode();
658 break;
659 case 0:
660 default:
661 }
662 hash = (29 * hash) + getUnknownFields().hashCode();
663 memoizedHashCode = hash;
664 return hash;
665 }
666
668 java.nio.ByteBuffer data)
669 throws com.google.protobuf.InvalidProtocolBufferException {
670 return PARSER.parseFrom(data);
671 }
673 java.nio.ByteBuffer data,
674 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
675 throws com.google.protobuf.InvalidProtocolBufferException {
676 return PARSER.parseFrom(data, extensionRegistry);
677 }
679 com.google.protobuf.ByteString data)
680 throws com.google.protobuf.InvalidProtocolBufferException {
681 return PARSER.parseFrom(data);
682 }
684 com.google.protobuf.ByteString data,
685 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
686 throws com.google.protobuf.InvalidProtocolBufferException {
687 return PARSER.parseFrom(data, extensionRegistry);
688 }
690 throws com.google.protobuf.InvalidProtocolBufferException {
691 return PARSER.parseFrom(data);
692 }
694 byte[] data,
695 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
696 throws com.google.protobuf.InvalidProtocolBufferException {
697 return PARSER.parseFrom(data, extensionRegistry);
698 }
700 throws java.io.IOException {
701 return com.google.protobuf.GeneratedMessage
702 .parseWithIOException(PARSER, input);
703 }
705 java.io.InputStream input,
706 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
707 throws java.io.IOException {
708 return com.google.protobuf.GeneratedMessage
709 .parseWithIOException(PARSER, input, extensionRegistry);
710 }
711
713 throws java.io.IOException {
714 return com.google.protobuf.GeneratedMessage
715 .parseDelimitedWithIOException(PARSER, input);
716 }
717
719 java.io.InputStream input,
720 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
721 throws java.io.IOException {
722 return com.google.protobuf.GeneratedMessage
723 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
724 }
726 com.google.protobuf.CodedInputStream input)
727 throws java.io.IOException {
728 return com.google.protobuf.GeneratedMessage
729 .parseWithIOException(PARSER, input);
730 }
732 com.google.protobuf.CodedInputStream input,
733 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
734 throws java.io.IOException {
735 return com.google.protobuf.GeneratedMessage
736 .parseWithIOException(PARSER, input, extensionRegistry);
737 }
738
739 @java.lang.Override
740 public Builder newBuilderForType() { return newBuilder(); }
741 public static Builder newBuilder() {
742 return DEFAULT_INSTANCE.toBuilder();
743 }
744 public static Builder newBuilder(com.google.ortools.linearsolver.MPGeneralConstraintProto prototype) {
745 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
746 }
747 @java.lang.Override
749 return this == DEFAULT_INSTANCE
750 ? new Builder() : new Builder().mergeFrom(this);
751 }
752
753 @java.lang.Override
755 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
756 Builder builder = new Builder(parent);
757 return builder;
758 }
759
766 public static final class Builder extends
767 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
768 // @@protoc_insertion_point(builder_implements:operations_research.MPGeneralConstraintProto)
770 public static final com.google.protobuf.Descriptors.Descriptor
772 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
773 }
774
775 @java.lang.Override
776 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
778 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
779 .ensureFieldAccessorsInitialized(
780 com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class);
781 }
782
783 // Construct using com.google.ortools.linearsolver.MPGeneralConstraintProto.newBuilder()
784 private Builder() {
785
786 }
787
788 private Builder(
789 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
790 super(parent);
791
792 }
793 @java.lang.Override
794 public Builder clear() {
795 super.clear();
796 bitField0_ = 0;
797 name_ = "";
798 if (indicatorConstraintBuilder_ != null) {
799 indicatorConstraintBuilder_.clear();
800 }
801 if (sosConstraintBuilder_ != null) {
802 sosConstraintBuilder_.clear();
803 }
804 if (quadraticConstraintBuilder_ != null) {
805 quadraticConstraintBuilder_.clear();
806 }
807 if (absConstraintBuilder_ != null) {
808 absConstraintBuilder_.clear();
809 }
810 if (andConstraintBuilder_ != null) {
811 andConstraintBuilder_.clear();
812 }
813 if (orConstraintBuilder_ != null) {
814 orConstraintBuilder_.clear();
815 }
816 if (minConstraintBuilder_ != null) {
817 minConstraintBuilder_.clear();
818 }
819 if (maxConstraintBuilder_ != null) {
820 maxConstraintBuilder_.clear();
821 }
822 generalConstraintCase_ = 0;
823 generalConstraint_ = null;
824 return this;
825 }
826
827 @java.lang.Override
828 public com.google.protobuf.Descriptors.Descriptor
830 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
831 }
832
833 @java.lang.Override
835 return com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance();
836 }
837
838 @java.lang.Override
841 if (!result.isInitialized()) {
842 throw newUninitializedMessageException(result);
843 }
844 return result;
845 }
846
847 @java.lang.Override
849 com.google.ortools.linearsolver.MPGeneralConstraintProto result = new com.google.ortools.linearsolver.MPGeneralConstraintProto(this);
850 if (bitField0_ != 0) { buildPartial0(result); }
851 buildPartialOneofs(result);
852 onBuilt();
853 return result;
854 }
855
856 private void buildPartial0(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
857 int from_bitField0_ = bitField0_;
858 int to_bitField0_ = 0;
859 if (((from_bitField0_ & 0x00000001) != 0)) {
860 result.name_ = name_;
861 to_bitField0_ |= 0x00000001;
862 }
863 result.bitField0_ |= to_bitField0_;
864 }
865
866 private void buildPartialOneofs(com.google.ortools.linearsolver.MPGeneralConstraintProto result) {
867 result.generalConstraintCase_ = generalConstraintCase_;
868 result.generalConstraint_ = this.generalConstraint_;
869 if (generalConstraintCase_ == 2 &&
870 indicatorConstraintBuilder_ != null) {
871 result.generalConstraint_ = indicatorConstraintBuilder_.build();
872 }
873 if (generalConstraintCase_ == 3 &&
874 sosConstraintBuilder_ != null) {
875 result.generalConstraint_ = sosConstraintBuilder_.build();
876 }
877 if (generalConstraintCase_ == 4 &&
878 quadraticConstraintBuilder_ != null) {
879 result.generalConstraint_ = quadraticConstraintBuilder_.build();
880 }
881 if (generalConstraintCase_ == 5 &&
882 absConstraintBuilder_ != null) {
883 result.generalConstraint_ = absConstraintBuilder_.build();
884 }
885 if (generalConstraintCase_ == 6 &&
886 andConstraintBuilder_ != null) {
887 result.generalConstraint_ = andConstraintBuilder_.build();
888 }
889 if (generalConstraintCase_ == 7 &&
890 orConstraintBuilder_ != null) {
891 result.generalConstraint_ = orConstraintBuilder_.build();
892 }
893 if (generalConstraintCase_ == 8 &&
894 minConstraintBuilder_ != null) {
895 result.generalConstraint_ = minConstraintBuilder_.build();
896 }
897 if (generalConstraintCase_ == 9 &&
898 maxConstraintBuilder_ != null) {
899 result.generalConstraint_ = maxConstraintBuilder_.build();
900 }
901 }
902
903 @java.lang.Override
904 public Builder mergeFrom(com.google.protobuf.Message other) {
905 if (other instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto) {
906 return mergeFrom((com.google.ortools.linearsolver.MPGeneralConstraintProto)other);
907 } else {
908 super.mergeFrom(other);
909 return this;
910 }
911 }
912
913 public Builder mergeFrom(com.google.ortools.linearsolver.MPGeneralConstraintProto other) {
914 if (other == com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance()) return this;
915 if (other.hasName()) {
916 name_ = other.name_;
917 bitField0_ |= 0x00000001;
918 onChanged();
919 }
920 switch (other.getGeneralConstraintCase()) {
921 case INDICATOR_CONSTRAINT: {
922 mergeIndicatorConstraint(other.getIndicatorConstraint());
923 break;
924 }
925 case SOS_CONSTRAINT: {
926 mergeSosConstraint(other.getSosConstraint());
927 break;
928 }
929 case QUADRATIC_CONSTRAINT: {
930 mergeQuadraticConstraint(other.getQuadraticConstraint());
931 break;
932 }
933 case ABS_CONSTRAINT: {
934 mergeAbsConstraint(other.getAbsConstraint());
935 break;
936 }
937 case AND_CONSTRAINT: {
938 mergeAndConstraint(other.getAndConstraint());
939 break;
940 }
941 case OR_CONSTRAINT: {
942 mergeOrConstraint(other.getOrConstraint());
943 break;
944 }
945 case MIN_CONSTRAINT: {
946 mergeMinConstraint(other.getMinConstraint());
947 break;
948 }
949 case MAX_CONSTRAINT: {
950 mergeMaxConstraint(other.getMaxConstraint());
951 break;
952 }
953 case GENERALCONSTRAINT_NOT_SET: {
954 break;
955 }
956 }
957 this.mergeUnknownFields(other.getUnknownFields());
958 onChanged();
959 return this;
960 }
961
962 @java.lang.Override
963 public final boolean isInitialized() {
964 return true;
965 }
966
967 @java.lang.Override
968 public Builder mergeFrom(
969 com.google.protobuf.CodedInputStream input,
970 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
971 throws java.io.IOException {
972 if (extensionRegistry == null) {
973 throw new java.lang.NullPointerException();
974 }
975 try {
976 boolean done = false;
977 while (!done) {
978 int tag = input.readTag();
979 switch (tag) {
980 case 0:
981 done = true;
982 break;
983 case 10: {
984 name_ = input.readBytes();
985 bitField0_ |= 0x00000001;
986 break;
987 } // case 10
988 case 18: {
989 input.readMessage(
990 internalGetIndicatorConstraintFieldBuilder().getBuilder(),
991 extensionRegistry);
992 generalConstraintCase_ = 2;
993 break;
994 } // case 18
995 case 26: {
996 input.readMessage(
997 internalGetSosConstraintFieldBuilder().getBuilder(),
998 extensionRegistry);
999 generalConstraintCase_ = 3;
1000 break;
1001 } // case 26
1002 case 34: {
1003 input.readMessage(
1004 internalGetQuadraticConstraintFieldBuilder().getBuilder(),
1005 extensionRegistry);
1006 generalConstraintCase_ = 4;
1007 break;
1008 } // case 34
1009 case 42: {
1010 input.readMessage(
1011 internalGetAbsConstraintFieldBuilder().getBuilder(),
1012 extensionRegistry);
1013 generalConstraintCase_ = 5;
1014 break;
1015 } // case 42
1016 case 50: {
1017 input.readMessage(
1018 internalGetAndConstraintFieldBuilder().getBuilder(),
1019 extensionRegistry);
1020 generalConstraintCase_ = 6;
1021 break;
1022 } // case 50
1023 case 58: {
1024 input.readMessage(
1025 internalGetOrConstraintFieldBuilder().getBuilder(),
1026 extensionRegistry);
1027 generalConstraintCase_ = 7;
1028 break;
1029 } // case 58
1030 case 66: {
1031 input.readMessage(
1032 internalGetMinConstraintFieldBuilder().getBuilder(),
1033 extensionRegistry);
1034 generalConstraintCase_ = 8;
1035 break;
1036 } // case 66
1037 case 74: {
1038 input.readMessage(
1039 internalGetMaxConstraintFieldBuilder().getBuilder(),
1040 extensionRegistry);
1041 generalConstraintCase_ = 9;
1042 break;
1043 } // case 74
1044 default: {
1045 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1046 done = true; // was an endgroup tag
1047 }
1048 break;
1049 } // default:
1050 } // switch (tag)
1051 } // while (!done)
1052 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1053 throw e.unwrapIOException();
1054 } finally {
1055 onChanged();
1056 } // finally
1057 return this;
1058 }
1059 private int generalConstraintCase_ = 0;
1060 private java.lang.Object generalConstraint_;
1064 generalConstraintCase_);
1065 }
1066
1067 public Builder clearGeneralConstraint() {
1068 generalConstraintCase_ = 0;
1069 generalConstraint_ = null;
1070 onChanged();
1071 return this;
1072 }
1073
1074 private int bitField0_;
1075
1076 private java.lang.Object name_ = "";
1085 public boolean hasName() {
1086 return ((bitField0_ & 0x00000001) != 0);
1087 }
1088
1096 public java.lang.String getName() {
1097 java.lang.Object ref = name_;
1098 if (!(ref instanceof java.lang.String)) {
1099 com.google.protobuf.ByteString bs =
1100 (com.google.protobuf.ByteString) ref;
1101 java.lang.String s = bs.toStringUtf8();
1102 if (bs.isValidUtf8()) {
1103 name_ = s;
1104 }
1105 return s;
1106 } else {
1107 return (java.lang.String) ref;
1108 }
1109 }
1110
1118 public com.google.protobuf.ByteString
1120 java.lang.Object ref = name_;
1121 if (ref instanceof String) {
1122 com.google.protobuf.ByteString b =
1123 com.google.protobuf.ByteString.copyFromUtf8(
1124 (java.lang.String) ref);
1125 name_ = b;
1126 return b;
1127 } else {
1128 return (com.google.protobuf.ByteString) ref;
1129 }
1130 }
1131
1140 public Builder setName(
1141 java.lang.String value) {
1142 if (value == null) { throw new NullPointerException(); }
1143 name_ = value;
1144 bitField0_ |= 0x00000001;
1145 onChanged();
1146 return this;
1147 }
1148
1156 public Builder clearName() {
1157 name_ = getDefaultInstance().getName();
1158 bitField0_ = (bitField0_ & ~0x00000001);
1159 onChanged();
1160 return this;
1161 }
1162
1171 public Builder setNameBytes(
1172 com.google.protobuf.ByteString value) {
1173 if (value == null) { throw new NullPointerException(); }
1174 name_ = value;
1175 bitField0_ |= 0x00000001;
1176 onChanged();
1177 return this;
1178 }
1179
1180 private com.google.protobuf.SingleFieldBuilder<
1181 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder> indicatorConstraintBuilder_;
1186 @java.lang.Override
1187 public boolean hasIndicatorConstraint() {
1188 return generalConstraintCase_ == 2;
1189 }
1190
1194 @java.lang.Override
1196 if (indicatorConstraintBuilder_ == null) {
1197 if (generalConstraintCase_ == 2) {
1198 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1199 }
1200 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1201 } else {
1202 if (generalConstraintCase_ == 2) {
1203 return indicatorConstraintBuilder_.getMessage();
1204 }
1205 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1206 }
1207 }
1208
1211 public Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value) {
1212 if (indicatorConstraintBuilder_ == null) {
1213 if (value == null) {
1214 throw new NullPointerException();
1215 }
1216 generalConstraint_ = value;
1217 onChanged();
1218 } else {
1219 indicatorConstraintBuilder_.setMessage(value);
1220 }
1221 generalConstraintCase_ = 2;
1222 return this;
1223 }
1224
1228 com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue) {
1229 if (indicatorConstraintBuilder_ == null) {
1230 generalConstraint_ = builderForValue.build();
1231 onChanged();
1232 } else {
1233 indicatorConstraintBuilder_.setMessage(builderForValue.build());
1234 }
1235 generalConstraintCase_ = 2;
1236 return this;
1237 }
1238
1241 public Builder mergeIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value) {
1242 if (indicatorConstraintBuilder_ == null) {
1243 if (generalConstraintCase_ == 2 &&
1244 generalConstraint_ != com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance()) {
1245 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.newBuilder((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_)
1246 .mergeFrom(value).buildPartial();
1247 } else {
1248 generalConstraint_ = value;
1249 }
1250 onChanged();
1251 } else {
1252 if (generalConstraintCase_ == 2) {
1253 indicatorConstraintBuilder_.mergeFrom(value);
1254 } else {
1255 indicatorConstraintBuilder_.setMessage(value);
1256 }
1257 }
1258 generalConstraintCase_ = 2;
1259 return this;
1260 }
1261
1264 public Builder clearIndicatorConstraint() {
1265 if (indicatorConstraintBuilder_ == null) {
1266 if (generalConstraintCase_ == 2) {
1267 generalConstraintCase_ = 0;
1268 generalConstraint_ = null;
1269 onChanged();
1270 }
1271 } else {
1272 if (generalConstraintCase_ == 2) {
1273 generalConstraintCase_ = 0;
1274 generalConstraint_ = null;
1275 }
1276 indicatorConstraintBuilder_.clear();
1277 }
1278 return this;
1279 }
1280
1284 return internalGetIndicatorConstraintFieldBuilder().getBuilder();
1285 }
1286
1289 @java.lang.Override
1291 if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ != null)) {
1292 return indicatorConstraintBuilder_.getMessageOrBuilder();
1293 } else {
1294 if (generalConstraintCase_ == 2) {
1295 return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1296 }
1297 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1298 }
1299 }
1300
1303 private com.google.protobuf.SingleFieldBuilder<
1304 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>
1305 internalGetIndicatorConstraintFieldBuilder() {
1306 if (indicatorConstraintBuilder_ == null) {
1307 if (!(generalConstraintCase_ == 2)) {
1308 generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
1309 }
1310 indicatorConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1311 com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>(
1312 (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_,
1313 getParentForChildren(),
1314 isClean());
1315 generalConstraint_ = null;
1316 }
1317 generalConstraintCase_ = 2;
1318 onChanged();
1319 return indicatorConstraintBuilder_;
1320 }
1321
1322 private com.google.protobuf.SingleFieldBuilder<
1323 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder> sosConstraintBuilder_;
1328 @java.lang.Override
1329 public boolean hasSosConstraint() {
1330 return generalConstraintCase_ == 3;
1331 }
1332
1336 @java.lang.Override
1338 if (sosConstraintBuilder_ == null) {
1339 if (generalConstraintCase_ == 3) {
1340 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1341 }
1342 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1343 } else {
1344 if (generalConstraintCase_ == 3) {
1345 return sosConstraintBuilder_.getMessage();
1346 }
1347 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1348 }
1349 }
1350
1353 public Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value) {
1354 if (sosConstraintBuilder_ == null) {
1355 if (value == null) {
1356 throw new NullPointerException();
1357 }
1358 generalConstraint_ = value;
1359 onChanged();
1360 } else {
1361 sosConstraintBuilder_.setMessage(value);
1362 }
1363 generalConstraintCase_ = 3;
1364 return this;
1365 }
1366
1369 public Builder setSosConstraint(
1370 com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue) {
1371 if (sosConstraintBuilder_ == null) {
1372 generalConstraint_ = builderForValue.build();
1373 onChanged();
1374 } else {
1375 sosConstraintBuilder_.setMessage(builderForValue.build());
1376 }
1377 generalConstraintCase_ = 3;
1378 return this;
1379 }
1380
1383 public Builder mergeSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value) {
1384 if (sosConstraintBuilder_ == null) {
1385 if (generalConstraintCase_ == 3 &&
1386 generalConstraint_ != com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance()) {
1387 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.newBuilder((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_)
1388 .mergeFrom(value).buildPartial();
1389 } else {
1390 generalConstraint_ = value;
1391 }
1392 onChanged();
1393 } else {
1394 if (generalConstraintCase_ == 3) {
1395 sosConstraintBuilder_.mergeFrom(value);
1396 } else {
1397 sosConstraintBuilder_.setMessage(value);
1398 }
1399 }
1400 generalConstraintCase_ = 3;
1401 return this;
1402 }
1403
1406 public Builder clearSosConstraint() {
1407 if (sosConstraintBuilder_ == null) {
1408 if (generalConstraintCase_ == 3) {
1409 generalConstraintCase_ = 0;
1410 generalConstraint_ = null;
1411 onChanged();
1412 }
1413 } else {
1414 if (generalConstraintCase_ == 3) {
1415 generalConstraintCase_ = 0;
1416 generalConstraint_ = null;
1417 }
1418 sosConstraintBuilder_.clear();
1419 }
1420 return this;
1421 }
1422
1426 return internalGetSosConstraintFieldBuilder().getBuilder();
1427 }
1428
1431 @java.lang.Override
1433 if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ != null)) {
1434 return sosConstraintBuilder_.getMessageOrBuilder();
1435 } else {
1436 if (generalConstraintCase_ == 3) {
1437 return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1438 }
1439 return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1440 }
1441 }
1442
1445 private com.google.protobuf.SingleFieldBuilder<
1446 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>
1447 internalGetSosConstraintFieldBuilder() {
1448 if (sosConstraintBuilder_ == null) {
1449 if (!(generalConstraintCase_ == 3)) {
1450 generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance();
1451 }
1452 sosConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1453 com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>(
1454 (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_,
1455 getParentForChildren(),
1456 isClean());
1457 generalConstraint_ = null;
1458 }
1459 generalConstraintCase_ = 3;
1460 onChanged();
1461 return sosConstraintBuilder_;
1462 }
1463
1464 private com.google.protobuf.SingleFieldBuilder<
1465 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder> quadraticConstraintBuilder_;
1470 @java.lang.Override
1471 public boolean hasQuadraticConstraint() {
1472 return generalConstraintCase_ == 4;
1473 }
1474
1478 @java.lang.Override
1480 if (quadraticConstraintBuilder_ == null) {
1481 if (generalConstraintCase_ == 4) {
1482 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1483 }
1484 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1485 } else {
1486 if (generalConstraintCase_ == 4) {
1487 return quadraticConstraintBuilder_.getMessage();
1488 }
1489 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1490 }
1491 }
1492
1495 public Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value) {
1496 if (quadraticConstraintBuilder_ == null) {
1497 if (value == null) {
1498 throw new NullPointerException();
1499 }
1500 generalConstraint_ = value;
1501 onChanged();
1502 } else {
1503 quadraticConstraintBuilder_.setMessage(value);
1504 }
1505 generalConstraintCase_ = 4;
1506 return this;
1507 }
1508
1512 com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue) {
1513 if (quadraticConstraintBuilder_ == null) {
1514 generalConstraint_ = builderForValue.build();
1515 onChanged();
1516 } else {
1517 quadraticConstraintBuilder_.setMessage(builderForValue.build());
1518 }
1519 generalConstraintCase_ = 4;
1520 return this;
1521 }
1522
1525 public Builder mergeQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value) {
1526 if (quadraticConstraintBuilder_ == null) {
1527 if (generalConstraintCase_ == 4 &&
1528 generalConstraint_ != com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance()) {
1529 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.newBuilder((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_)
1530 .mergeFrom(value).buildPartial();
1531 } else {
1532 generalConstraint_ = value;
1533 }
1534 onChanged();
1535 } else {
1536 if (generalConstraintCase_ == 4) {
1537 quadraticConstraintBuilder_.mergeFrom(value);
1538 } else {
1539 quadraticConstraintBuilder_.setMessage(value);
1540 }
1541 }
1542 generalConstraintCase_ = 4;
1543 return this;
1544 }
1545
1548 public Builder clearQuadraticConstraint() {
1549 if (quadraticConstraintBuilder_ == null) {
1550 if (generalConstraintCase_ == 4) {
1551 generalConstraintCase_ = 0;
1552 generalConstraint_ = null;
1553 onChanged();
1554 }
1555 } else {
1556 if (generalConstraintCase_ == 4) {
1557 generalConstraintCase_ = 0;
1558 generalConstraint_ = null;
1559 }
1560 quadraticConstraintBuilder_.clear();
1561 }
1562 return this;
1563 }
1564
1568 return internalGetQuadraticConstraintFieldBuilder().getBuilder();
1569 }
1570
1573 @java.lang.Override
1575 if ((generalConstraintCase_ == 4) && (quadraticConstraintBuilder_ != null)) {
1576 return quadraticConstraintBuilder_.getMessageOrBuilder();
1577 } else {
1578 if (generalConstraintCase_ == 4) {
1579 return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1580 }
1581 return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1582 }
1583 }
1584
1587 private com.google.protobuf.SingleFieldBuilder<
1588 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>
1589 internalGetQuadraticConstraintFieldBuilder() {
1590 if (quadraticConstraintBuilder_ == null) {
1591 if (!(generalConstraintCase_ == 4)) {
1592 generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance();
1593 }
1594 quadraticConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1595 com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>(
1596 (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_,
1597 getParentForChildren(),
1598 isClean());
1599 generalConstraint_ = null;
1600 }
1601 generalConstraintCase_ = 4;
1602 onChanged();
1603 return quadraticConstraintBuilder_;
1604 }
1605
1606 private com.google.protobuf.SingleFieldBuilder<
1607 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder> absConstraintBuilder_;
1612 @java.lang.Override
1613 public boolean hasAbsConstraint() {
1614 return generalConstraintCase_ == 5;
1615 }
1616
1620 @java.lang.Override
1622 if (absConstraintBuilder_ == null) {
1623 if (generalConstraintCase_ == 5) {
1624 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1625 }
1626 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1627 } else {
1628 if (generalConstraintCase_ == 5) {
1629 return absConstraintBuilder_.getMessage();
1630 }
1631 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1632 }
1633 }
1634
1637 public Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value) {
1638 if (absConstraintBuilder_ == null) {
1639 if (value == null) {
1640 throw new NullPointerException();
1641 }
1642 generalConstraint_ = value;
1643 onChanged();
1644 } else {
1645 absConstraintBuilder_.setMessage(value);
1646 }
1647 generalConstraintCase_ = 5;
1648 return this;
1649 }
1650
1653 public Builder setAbsConstraint(
1654 com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue) {
1655 if (absConstraintBuilder_ == null) {
1656 generalConstraint_ = builderForValue.build();
1657 onChanged();
1658 } else {
1659 absConstraintBuilder_.setMessage(builderForValue.build());
1660 }
1661 generalConstraintCase_ = 5;
1662 return this;
1663 }
1664
1667 public Builder mergeAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value) {
1668 if (absConstraintBuilder_ == null) {
1669 if (generalConstraintCase_ == 5 &&
1670 generalConstraint_ != com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance()) {
1671 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.newBuilder((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_)
1672 .mergeFrom(value).buildPartial();
1673 } else {
1674 generalConstraint_ = value;
1675 }
1676 onChanged();
1677 } else {
1678 if (generalConstraintCase_ == 5) {
1679 absConstraintBuilder_.mergeFrom(value);
1680 } else {
1681 absConstraintBuilder_.setMessage(value);
1682 }
1683 }
1684 generalConstraintCase_ = 5;
1685 return this;
1686 }
1687
1690 public Builder clearAbsConstraint() {
1691 if (absConstraintBuilder_ == null) {
1692 if (generalConstraintCase_ == 5) {
1693 generalConstraintCase_ = 0;
1694 generalConstraint_ = null;
1695 onChanged();
1696 }
1697 } else {
1698 if (generalConstraintCase_ == 5) {
1699 generalConstraintCase_ = 0;
1700 generalConstraint_ = null;
1701 }
1702 absConstraintBuilder_.clear();
1703 }
1704 return this;
1705 }
1706
1710 return internalGetAbsConstraintFieldBuilder().getBuilder();
1711 }
1712
1715 @java.lang.Override
1717 if ((generalConstraintCase_ == 5) && (absConstraintBuilder_ != null)) {
1718 return absConstraintBuilder_.getMessageOrBuilder();
1719 } else {
1720 if (generalConstraintCase_ == 5) {
1721 return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1722 }
1723 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1724 }
1725 }
1726
1729 private com.google.protobuf.SingleFieldBuilder<
1730 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>
1731 internalGetAbsConstraintFieldBuilder() {
1732 if (absConstraintBuilder_ == null) {
1733 if (!(generalConstraintCase_ == 5)) {
1734 generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
1735 }
1736 absConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1737 com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>(
1738 (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_,
1739 getParentForChildren(),
1740 isClean());
1741 generalConstraint_ = null;
1742 }
1743 generalConstraintCase_ = 5;
1744 onChanged();
1745 return absConstraintBuilder_;
1746 }
1747
1748 private com.google.protobuf.SingleFieldBuilder<
1749 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> andConstraintBuilder_;
1759 @java.lang.Override
1760 public boolean hasAndConstraint() {
1761 return generalConstraintCase_ == 6;
1762 }
1763
1772 @java.lang.Override
1774 if (andConstraintBuilder_ == null) {
1775 if (generalConstraintCase_ == 6) {
1776 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1777 }
1778 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1779 } else {
1780 if (generalConstraintCase_ == 6) {
1781 return andConstraintBuilder_.getMessage();
1782 }
1783 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1784 }
1785 }
1786
1794 public Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) {
1795 if (andConstraintBuilder_ == null) {
1796 if (value == null) {
1797 throw new NullPointerException();
1798 }
1799 generalConstraint_ = value;
1800 onChanged();
1801 } else {
1802 andConstraintBuilder_.setMessage(value);
1803 }
1804 generalConstraintCase_ = 6;
1805 return this;
1806 }
1807
1815 public Builder setAndConstraint(
1816 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
1817 if (andConstraintBuilder_ == null) {
1818 generalConstraint_ = builderForValue.build();
1819 onChanged();
1820 } else {
1821 andConstraintBuilder_.setMessage(builderForValue.build());
1822 }
1823 generalConstraintCase_ = 6;
1824 return this;
1825 }
1826
1834 public Builder mergeAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) {
1835 if (andConstraintBuilder_ == null) {
1836 if (generalConstraintCase_ == 6 &&
1837 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
1838 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
1839 .mergeFrom(value).buildPartial();
1840 } else {
1841 generalConstraint_ = value;
1842 }
1843 onChanged();
1844 } else {
1845 if (generalConstraintCase_ == 6) {
1846 andConstraintBuilder_.mergeFrom(value);
1847 } else {
1848 andConstraintBuilder_.setMessage(value);
1849 }
1850 }
1851 generalConstraintCase_ = 6;
1852 return this;
1853 }
1854
1862 public Builder clearAndConstraint() {
1863 if (andConstraintBuilder_ == null) {
1864 if (generalConstraintCase_ == 6) {
1865 generalConstraintCase_ = 0;
1866 generalConstraint_ = null;
1867 onChanged();
1868 }
1869 } else {
1870 if (generalConstraintCase_ == 6) {
1871 generalConstraintCase_ = 0;
1872 generalConstraint_ = null;
1873 }
1874 andConstraintBuilder_.clear();
1875 }
1876 return this;
1877 }
1878
1887 return internalGetAndConstraintFieldBuilder().getBuilder();
1888 }
1889
1897 @java.lang.Override
1899 if ((generalConstraintCase_ == 6) && (andConstraintBuilder_ != null)) {
1900 return andConstraintBuilder_.getMessageOrBuilder();
1901 } else {
1902 if (generalConstraintCase_ == 6) {
1903 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1904 }
1905 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1906 }
1907 }
1908
1916 private com.google.protobuf.SingleFieldBuilder<
1917 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
1918 internalGetAndConstraintFieldBuilder() {
1919 if (andConstraintBuilder_ == null) {
1920 if (!(generalConstraintCase_ == 6)) {
1921 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1922 }
1923 andConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1924 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
1925 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
1926 getParentForChildren(),
1927 isClean());
1928 generalConstraint_ = null;
1929 }
1930 generalConstraintCase_ = 6;
1931 onChanged();
1932 return andConstraintBuilder_;
1933 }
1934
1935 private com.google.protobuf.SingleFieldBuilder<
1936 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> orConstraintBuilder_;
1946 @java.lang.Override
1947 public boolean hasOrConstraint() {
1948 return generalConstraintCase_ == 7;
1949 }
1950
1959 @java.lang.Override
1961 if (orConstraintBuilder_ == null) {
1962 if (generalConstraintCase_ == 7) {
1963 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1964 }
1965 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1966 } else {
1967 if (generalConstraintCase_ == 7) {
1968 return orConstraintBuilder_.getMessage();
1969 }
1970 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
1971 }
1972 }
1973
1981 public Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) {
1982 if (orConstraintBuilder_ == null) {
1983 if (value == null) {
1984 throw new NullPointerException();
1985 }
1986 generalConstraint_ = value;
1987 onChanged();
1988 } else {
1989 orConstraintBuilder_.setMessage(value);
1990 }
1991 generalConstraintCase_ = 7;
1992 return this;
1993 }
1994
2002 public Builder setOrConstraint(
2003 com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) {
2004 if (orConstraintBuilder_ == null) {
2005 generalConstraint_ = builderForValue.build();
2006 onChanged();
2007 } else {
2008 orConstraintBuilder_.setMessage(builderForValue.build());
2009 }
2010 generalConstraintCase_ = 7;
2011 return this;
2012 }
2013
2021 public Builder mergeOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) {
2022 if (orConstraintBuilder_ == null) {
2023 if (generalConstraintCase_ == 7 &&
2024 generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) {
2025 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_)
2026 .mergeFrom(value).buildPartial();
2027 } else {
2028 generalConstraint_ = value;
2029 }
2030 onChanged();
2031 } else {
2032 if (generalConstraintCase_ == 7) {
2033 orConstraintBuilder_.mergeFrom(value);
2034 } else {
2035 orConstraintBuilder_.setMessage(value);
2036 }
2037 }
2038 generalConstraintCase_ = 7;
2039 return this;
2040 }
2041
2049 public Builder clearOrConstraint() {
2050 if (orConstraintBuilder_ == null) {
2051 if (generalConstraintCase_ == 7) {
2052 generalConstraintCase_ = 0;
2053 generalConstraint_ = null;
2054 onChanged();
2055 }
2056 } else {
2057 if (generalConstraintCase_ == 7) {
2058 generalConstraintCase_ = 0;
2059 generalConstraint_ = null;
2060 }
2061 orConstraintBuilder_.clear();
2062 }
2063 return this;
2064 }
2065
2074 return internalGetOrConstraintFieldBuilder().getBuilder();
2075 }
2076
2084 @java.lang.Override
2086 if ((generalConstraintCase_ == 7) && (orConstraintBuilder_ != null)) {
2087 return orConstraintBuilder_.getMessageOrBuilder();
2088 } else {
2089 if (generalConstraintCase_ == 7) {
2090 return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
2091 }
2092 return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2093 }
2094 }
2095
2103 private com.google.protobuf.SingleFieldBuilder<
2104 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>
2105 internalGetOrConstraintFieldBuilder() {
2106 if (orConstraintBuilder_ == null) {
2107 if (!(generalConstraintCase_ == 7)) {
2108 generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance();
2109 }
2110 orConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2111 com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>(
2112 (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
2113 getParentForChildren(),
2114 isClean());
2115 generalConstraint_ = null;
2116 }
2117 generalConstraintCase_ = 7;
2118 onChanged();
2119 return orConstraintBuilder_;
2120 }
2121
2122 private com.google.protobuf.SingleFieldBuilder<
2123 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> minConstraintBuilder_;
2132 @java.lang.Override
2133 public boolean hasMinConstraint() {
2134 return generalConstraintCase_ == 8;
2135 }
2136
2144 @java.lang.Override
2146 if (minConstraintBuilder_ == null) {
2147 if (generalConstraintCase_ == 8) {
2148 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2149 }
2150 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2151 } else {
2152 if (generalConstraintCase_ == 8) {
2153 return minConstraintBuilder_.getMessage();
2154 }
2155 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2156 }
2157 }
2158
2165 public Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2166 if (minConstraintBuilder_ == null) {
2167 if (value == null) {
2168 throw new NullPointerException();
2169 }
2170 generalConstraint_ = value;
2171 onChanged();
2172 } else {
2173 minConstraintBuilder_.setMessage(value);
2174 }
2175 generalConstraintCase_ = 8;
2176 return this;
2177 }
2178
2185 public Builder setMinConstraint(
2186 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2187 if (minConstraintBuilder_ == null) {
2188 generalConstraint_ = builderForValue.build();
2189 onChanged();
2190 } else {
2191 minConstraintBuilder_.setMessage(builderForValue.build());
2192 }
2193 generalConstraintCase_ = 8;
2194 return this;
2195 }
2196
2203 public Builder mergeMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2204 if (minConstraintBuilder_ == null) {
2205 if (generalConstraintCase_ == 8 &&
2206 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2207 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2208 .mergeFrom(value).buildPartial();
2209 } else {
2210 generalConstraint_ = value;
2211 }
2212 onChanged();
2213 } else {
2214 if (generalConstraintCase_ == 8) {
2215 minConstraintBuilder_.mergeFrom(value);
2216 } else {
2217 minConstraintBuilder_.setMessage(value);
2218 }
2219 }
2220 generalConstraintCase_ = 8;
2221 return this;
2222 }
2223
2230 public Builder clearMinConstraint() {
2231 if (minConstraintBuilder_ == null) {
2232 if (generalConstraintCase_ == 8) {
2233 generalConstraintCase_ = 0;
2234 generalConstraint_ = null;
2235 onChanged();
2236 }
2237 } else {
2238 if (generalConstraintCase_ == 8) {
2239 generalConstraintCase_ = 0;
2240 generalConstraint_ = null;
2241 }
2242 minConstraintBuilder_.clear();
2243 }
2244 return this;
2245 }
2246
2254 return internalGetMinConstraintFieldBuilder().getBuilder();
2255 }
2256
2263 @java.lang.Override
2265 if ((generalConstraintCase_ == 8) && (minConstraintBuilder_ != null)) {
2266 return minConstraintBuilder_.getMessageOrBuilder();
2267 } else {
2268 if (generalConstraintCase_ == 8) {
2269 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2270 }
2271 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2272 }
2273 }
2274
2281 private com.google.protobuf.SingleFieldBuilder<
2282 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2283 internalGetMinConstraintFieldBuilder() {
2284 if (minConstraintBuilder_ == null) {
2285 if (!(generalConstraintCase_ == 8)) {
2286 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2287 }
2288 minConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2289 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2290 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2291 getParentForChildren(),
2292 isClean());
2293 generalConstraint_ = null;
2294 }
2295 generalConstraintCase_ = 8;
2296 onChanged();
2297 return minConstraintBuilder_;
2298 }
2299
2300 private com.google.protobuf.SingleFieldBuilder<
2301 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> maxConstraintBuilder_;
2310 @java.lang.Override
2311 public boolean hasMaxConstraint() {
2312 return generalConstraintCase_ == 9;
2313 }
2314
2322 @java.lang.Override
2324 if (maxConstraintBuilder_ == null) {
2325 if (generalConstraintCase_ == 9) {
2326 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2327 }
2328 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2329 } else {
2330 if (generalConstraintCase_ == 9) {
2331 return maxConstraintBuilder_.getMessage();
2332 }
2333 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2334 }
2335 }
2336
2343 public Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2344 if (maxConstraintBuilder_ == null) {
2345 if (value == null) {
2346 throw new NullPointerException();
2347 }
2348 generalConstraint_ = value;
2349 onChanged();
2350 } else {
2351 maxConstraintBuilder_.setMessage(value);
2352 }
2353 generalConstraintCase_ = 9;
2354 return this;
2355 }
2356
2363 public Builder setMaxConstraint(
2364 com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) {
2365 if (maxConstraintBuilder_ == null) {
2366 generalConstraint_ = builderForValue.build();
2367 onChanged();
2368 } else {
2369 maxConstraintBuilder_.setMessage(builderForValue.build());
2370 }
2371 generalConstraintCase_ = 9;
2372 return this;
2373 }
2374
2381 public Builder mergeMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) {
2382 if (maxConstraintBuilder_ == null) {
2383 if (generalConstraintCase_ == 9 &&
2384 generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) {
2385 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_)
2386 .mergeFrom(value).buildPartial();
2387 } else {
2388 generalConstraint_ = value;
2389 }
2390 onChanged();
2391 } else {
2392 if (generalConstraintCase_ == 9) {
2393 maxConstraintBuilder_.mergeFrom(value);
2394 } else {
2395 maxConstraintBuilder_.setMessage(value);
2396 }
2397 }
2398 generalConstraintCase_ = 9;
2399 return this;
2400 }
2401
2408 public Builder clearMaxConstraint() {
2409 if (maxConstraintBuilder_ == null) {
2410 if (generalConstraintCase_ == 9) {
2411 generalConstraintCase_ = 0;
2412 generalConstraint_ = null;
2413 onChanged();
2414 }
2415 } else {
2416 if (generalConstraintCase_ == 9) {
2417 generalConstraintCase_ = 0;
2418 generalConstraint_ = null;
2419 }
2420 maxConstraintBuilder_.clear();
2421 }
2422 return this;
2423 }
2424
2432 return internalGetMaxConstraintFieldBuilder().getBuilder();
2433 }
2434
2441 @java.lang.Override
2443 if ((generalConstraintCase_ == 9) && (maxConstraintBuilder_ != null)) {
2444 return maxConstraintBuilder_.getMessageOrBuilder();
2445 } else {
2446 if (generalConstraintCase_ == 9) {
2447 return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2448 }
2449 return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2450 }
2451 }
2452
2459 private com.google.protobuf.SingleFieldBuilder<
2460 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>
2461 internalGetMaxConstraintFieldBuilder() {
2462 if (maxConstraintBuilder_ == null) {
2463 if (!(generalConstraintCase_ == 9)) {
2464 generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance();
2465 }
2466 maxConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2467 com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>(
2468 (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_,
2469 getParentForChildren(),
2470 isClean());
2471 generalConstraint_ = null;
2472 }
2473 generalConstraintCase_ = 9;
2474 onChanged();
2475 return maxConstraintBuilder_;
2476 }
2477
2478 // @@protoc_insertion_point(builder_scope:operations_research.MPGeneralConstraintProto)
2479 }
2480
2481 // @@protoc_insertion_point(class_scope:operations_research.MPGeneralConstraintProto)
2482 private static final com.google.ortools.linearsolver.MPGeneralConstraintProto DEFAULT_INSTANCE;
2483 static {
2484 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPGeneralConstraintProto();
2485 }
2486
2488 return DEFAULT_INSTANCE;
2489 }
2490
2491 private static final com.google.protobuf.Parser<MPGeneralConstraintProto>
2492 PARSER = new com.google.protobuf.AbstractParser<MPGeneralConstraintProto>() {
2493 @java.lang.Override
2494 public MPGeneralConstraintProto parsePartialFrom(
2495 com.google.protobuf.CodedInputStream input,
2496 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2497 throws com.google.protobuf.InvalidProtocolBufferException {
2498 Builder builder = newBuilder();
2499 try {
2500 builder.mergeFrom(input, extensionRegistry);
2501 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2502 throw e.setUnfinishedMessage(builder.buildPartial());
2503 } catch (com.google.protobuf.UninitializedMessageException e) {
2504 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2505 } catch (java.io.IOException e) {
2506 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2507 .setUnfinishedMessage(builder.buildPartial());
2508 }
2509 return builder.buildPartial();
2510 }
2511 };
2512
2513 public static com.google.protobuf.Parser<MPGeneralConstraintProto> parser() {
2514 return PARSER;
2515 }
2516
2517 @java.lang.Override
2518 public com.google.protobuf.Parser<MPGeneralConstraintProto> getParserForType() {
2519 return PARSER;
2520 }
2521
2522 @java.lang.Override
2526
2527}
2528
com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder()
Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint()
Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue)
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint()
Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue)
Builder mergeMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
Builder mergeAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value)
com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType()
Builder mergeIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value)
Builder mergeAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPArrayConstraint.Builder getAndConstraintBuilder()
com.google.ortools.linearsolver.MPArrayConstraint.Builder getOrConstraintBuilder()
com.google.ortools.linearsolver.MPSosConstraint getSosConstraint()
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder()
Builder mergeSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value)
com.google.ortools.linearsolver.MPGeneralConstraintProto buildPartial()
Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value)
Builder mergeMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue)
com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMaxConstraintBuilder()
Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue)
Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue)
com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder()
com.google.ortools.linearsolver.MPQuadraticConstraint.Builder getQuadraticConstraintBuilder()
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder()
Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue)
Builder mergeQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value)
com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint()
Builder mergeFrom(com.google.ortools.linearsolver.MPGeneralConstraintProto other)
com.google.ortools.linearsolver.MPIndicatorConstraint.Builder getIndicatorConstraintBuilder()
com.google.ortools.linearsolver.MPSosConstraint.Builder getSosConstraintBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value)
com.google.ortools.linearsolver.MPGeneralConstraintProto build()
com.google.ortools.linearsolver.MPAbsConstraint.Builder getAbsConstraintBuilder()
Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value)
Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue)
com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder()
Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value)
com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder()
Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue)
com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMinConstraintBuilder()
com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint()
Builder mergeOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< MPGeneralConstraintProto > getParserForType()
com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder()
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(byte[] data)
com.google.ortools.linearsolver.MPSosConstraint getSosConstraint()
com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.ByteString data)
static Builder newBuilder(com.google.ortools.linearsolver.MPGeneralConstraintProto prototype)
com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint()
com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom(java.io.InputStream input)
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.protobuf.Parser< MPGeneralConstraintProto > parser()
com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstance()
com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint()
com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder()
com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder()
com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)