Java Reference

Java Reference

MPModelProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4package com.google.ortools.linearsolver;
5
13public final class MPModelProto extends
14 com.google.protobuf.GeneratedMessageV3 implements
15 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto)
17private static final long serialVersionUID = 0L;
18 // Use MPModelProto.newBuilder() to construct.
19 private MPModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20 super(builder);
21 }
22 private MPModelProto() {
23 variable_ = java.util.Collections.emptyList();
24 constraint_ = java.util.Collections.emptyList();
25 generalConstraint_ = java.util.Collections.emptyList();
26 name_ = "";
27 }
28
29 @java.lang.Override
30 @SuppressWarnings({"unused"})
31 protected java.lang.Object newInstance(
32 UnusedPrivateParameter unused) {
33 return new MPModelProto();
34 }
35
36 @java.lang.Override
37 public final com.google.protobuf.UnknownFieldSet
39 return this.unknownFields;
40 }
41 private MPModelProto(
42 com.google.protobuf.CodedInputStream input,
43 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
44 throws com.google.protobuf.InvalidProtocolBufferException {
45 this();
46 if (extensionRegistry == null) {
47 throw new java.lang.NullPointerException();
48 }
49 int mutable_bitField0_ = 0;
50 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
51 com.google.protobuf.UnknownFieldSet.newBuilder();
52 try {
53 boolean done = false;
54 while (!done) {
55 int tag = input.readTag();
56 switch (tag) {
57 case 0:
58 done = true;
59 break;
60 case 8: {
61 bitField0_ |= 0x00000001;
62 maximize_ = input.readBool();
63 break;
64 }
65 case 17: {
66 bitField0_ |= 0x00000002;
67 objectiveOffset_ = input.readDouble();
68 break;
69 }
70 case 26: {
71 if (!((mutable_bitField0_ & 0x00000001) != 0)) {
72 variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>();
73 mutable_bitField0_ |= 0x00000001;
74 }
75 variable_.add(
76 input.readMessage(com.google.ortools.linearsolver.MPVariableProto.PARSER, extensionRegistry));
77 break;
78 }
79 case 34: {
80 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
81 constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>();
82 mutable_bitField0_ |= 0x00000002;
83 }
84 constraint_.add(
85 input.readMessage(com.google.ortools.linearsolver.MPConstraintProto.PARSER, extensionRegistry));
86 break;
87 }
88 case 42: {
89 com.google.protobuf.ByteString bs = input.readBytes();
90 bitField0_ |= 0x00000008;
91 name_ = bs;
92 break;
93 }
94 case 50: {
95 com.google.ortools.linearsolver.PartialVariableAssignment.Builder subBuilder = null;
96 if (((bitField0_ & 0x00000010) != 0)) {
97 subBuilder = solutionHint_.toBuilder();
98 }
99 solutionHint_ = input.readMessage(com.google.ortools.linearsolver.PartialVariableAssignment.PARSER, extensionRegistry);
100 if (subBuilder != null) {
101 subBuilder.mergeFrom(solutionHint_);
102 solutionHint_ = subBuilder.buildPartial();
103 }
104 bitField0_ |= 0x00000010;
105 break;
106 }
107 case 58: {
108 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
109 generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>();
110 mutable_bitField0_ |= 0x00000004;
111 }
112 generalConstraint_.add(
113 input.readMessage(com.google.ortools.linearsolver.MPGeneralConstraintProto.PARSER, extensionRegistry));
114 break;
115 }
116 case 66: {
117 com.google.ortools.linearsolver.MPQuadraticObjective.Builder subBuilder = null;
118 if (((bitField0_ & 0x00000004) != 0)) {
119 subBuilder = quadraticObjective_.toBuilder();
120 }
121 quadraticObjective_ = input.readMessage(com.google.ortools.linearsolver.MPQuadraticObjective.PARSER, extensionRegistry);
122 if (subBuilder != null) {
123 subBuilder.mergeFrom(quadraticObjective_);
124 quadraticObjective_ = subBuilder.buildPartial();
125 }
126 bitField0_ |= 0x00000004;
127 break;
128 }
129 default: {
130 if (!parseUnknownField(
131 input, unknownFields, extensionRegistry, tag)) {
132 done = true;
133 }
134 break;
135 }
136 }
137 }
138 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
139 throw e.setUnfinishedMessage(this);
140 } catch (java.io.IOException e) {
141 throw new com.google.protobuf.InvalidProtocolBufferException(
142 e).setUnfinishedMessage(this);
143 } finally {
144 if (((mutable_bitField0_ & 0x00000001) != 0)) {
145 variable_ = java.util.Collections.unmodifiableList(variable_);
146 }
147 if (((mutable_bitField0_ & 0x00000002) != 0)) {
148 constraint_ = java.util.Collections.unmodifiableList(constraint_);
149 }
150 if (((mutable_bitField0_ & 0x00000004) != 0)) {
151 generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
152 }
153 this.unknownFields = unknownFields.build();
154 makeExtensionsImmutable();
155 }
156 }
157 public static final com.google.protobuf.Descriptors.Descriptor
159 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
160 }
161
162 @java.lang.Override
163 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
165 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
166 .ensureFieldAccessorsInitialized(
167 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
168 }
169
170 private int bitField0_;
171 public static final int VARIABLE_FIELD_NUMBER = 3;
172 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_;
180 @java.lang.Override
181 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
182 return variable_;
183 }
191 @java.lang.Override
192 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
194 return variable_;
195 }
203 @java.lang.Override
204 public int getVariableCount() {
205 return variable_.size();
206 }
214 @java.lang.Override
215 public com.google.ortools.linearsolver.MPVariableProto getVariable(int index) {
216 return variable_.get(index);
217 }
225 @java.lang.Override
226 public com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(
227 int index) {
228 return variable_.get(index);
229 }
230
231 public static final int CONSTRAINT_FIELD_NUMBER = 4;
232 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_;
240 @java.lang.Override
241 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
242 return constraint_;
243 }
251 @java.lang.Override
252 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
254 return constraint_;
255 }
263 @java.lang.Override
264 public int getConstraintCount() {
265 return constraint_.size();
266 }
274 @java.lang.Override
275 public com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index) {
276 return constraint_.get(index);
277 }
285 @java.lang.Override
286 public com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(
287 int index) {
288 return constraint_.get(index);
289 }
290
291 public static final int GENERAL_CONSTRAINT_FIELD_NUMBER = 7;
292 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_;
301 @java.lang.Override
302 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
303 return generalConstraint_;
304 }
313 @java.lang.Override
314 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
316 return generalConstraint_;
317 }
326 @java.lang.Override
328 return generalConstraint_.size();
329 }
338 @java.lang.Override
339 public com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index) {
340 return generalConstraint_.get(index);
341 }
350 @java.lang.Override
351 public com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(
352 int index) {
353 return generalConstraint_.get(index);
354 }
355
356 public static final int MAXIMIZE_FIELD_NUMBER = 1;
357 private boolean maximize_;
366 @java.lang.Override
367 public boolean hasMaximize() {
368 return ((bitField0_ & 0x00000001) != 0);
369 }
378 @java.lang.Override
379 public boolean getMaximize() {
380 return maximize_;
381 }
382
383 public static final int OBJECTIVE_OFFSET_FIELD_NUMBER = 2;
384 private double objectiveOffset_;
393 @java.lang.Override
394 public boolean hasObjectiveOffset() {
395 return ((bitField0_ & 0x00000002) != 0);
396 }
405 @java.lang.Override
406 public double getObjectiveOffset() {
407 return objectiveOffset_;
408 }
409
410 public static final int QUADRATIC_OBJECTIVE_FIELD_NUMBER = 8;
411 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
421 @java.lang.Override
422 public boolean hasQuadraticObjective() {
423 return ((bitField0_ & 0x00000004) != 0);
424 }
434 @java.lang.Override
435 public com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective() {
436 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
437 }
446 @java.lang.Override
447 public com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder() {
448 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
449 }
450
451 public static final int NAME_FIELD_NUMBER = 5;
452 private volatile java.lang.Object name_;
461 @java.lang.Override
462 public boolean hasName() {
463 return ((bitField0_ & 0x00000008) != 0);
464 }
473 @java.lang.Override
474 public java.lang.String getName() {
475 java.lang.Object ref = name_;
476 if (ref instanceof java.lang.String) {
477 return (java.lang.String) ref;
478 } else {
479 com.google.protobuf.ByteString bs =
480 (com.google.protobuf.ByteString) ref;
481 java.lang.String s = bs.toStringUtf8();
482 if (bs.isValidUtf8()) {
483 name_ = s;
484 }
485 return s;
486 }
487 }
496 @java.lang.Override
497 public com.google.protobuf.ByteString
499 java.lang.Object ref = name_;
500 if (ref instanceof java.lang.String) {
501 com.google.protobuf.ByteString b =
502 com.google.protobuf.ByteString.copyFromUtf8(
503 (java.lang.String) ref);
504 name_ = b;
505 return b;
506 } else {
507 return (com.google.protobuf.ByteString) ref;
508 }
509 }
510
511 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
512 private com.google.ortools.linearsolver.PartialVariableAssignment solutionHint_;
529 @java.lang.Override
530 public boolean hasSolutionHint() {
531 return ((bitField0_ & 0x00000010) != 0);
532 }
549 @java.lang.Override
550 public com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint() {
551 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
552 }
568 @java.lang.Override
569 public com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder() {
570 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
571 }
572
573 private byte memoizedIsInitialized = -1;
574 @java.lang.Override
575 public final boolean isInitialized() {
576 byte isInitialized = memoizedIsInitialized;
577 if (isInitialized == 1) return true;
578 if (isInitialized == 0) return false;
579
580 memoizedIsInitialized = 1;
581 return true;
582 }
583
584 @java.lang.Override
585 public void writeTo(com.google.protobuf.CodedOutputStream output)
586 throws java.io.IOException {
587 if (((bitField0_ & 0x00000001) != 0)) {
588 output.writeBool(1, maximize_);
589 }
590 if (((bitField0_ & 0x00000002) != 0)) {
591 output.writeDouble(2, objectiveOffset_);
592 }
593 for (int i = 0; i < variable_.size(); i++) {
594 output.writeMessage(3, variable_.get(i));
595 }
596 for (int i = 0; i < constraint_.size(); i++) {
597 output.writeMessage(4, constraint_.get(i));
598 }
599 if (((bitField0_ & 0x00000008) != 0)) {
600 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
601 }
602 if (((bitField0_ & 0x00000010) != 0)) {
603 output.writeMessage(6, getSolutionHint());
604 }
605 for (int i = 0; i < generalConstraint_.size(); i++) {
606 output.writeMessage(7, generalConstraint_.get(i));
607 }
608 if (((bitField0_ & 0x00000004) != 0)) {
609 output.writeMessage(8, getQuadraticObjective());
610 }
611 unknownFields.writeTo(output);
612 }
613
614 @java.lang.Override
615 public int getSerializedSize() {
616 int size = memoizedSize;
617 if (size != -1) return size;
618
619 size = 0;
620 if (((bitField0_ & 0x00000001) != 0)) {
621 size += com.google.protobuf.CodedOutputStream
622 .computeBoolSize(1, maximize_);
623 }
624 if (((bitField0_ & 0x00000002) != 0)) {
625 size += com.google.protobuf.CodedOutputStream
626 .computeDoubleSize(2, objectiveOffset_);
627 }
628 for (int i = 0; i < variable_.size(); i++) {
629 size += com.google.protobuf.CodedOutputStream
630 .computeMessageSize(3, variable_.get(i));
631 }
632 for (int i = 0; i < constraint_.size(); i++) {
633 size += com.google.protobuf.CodedOutputStream
634 .computeMessageSize(4, constraint_.get(i));
635 }
636 if (((bitField0_ & 0x00000008) != 0)) {
637 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
638 }
639 if (((bitField0_ & 0x00000010) != 0)) {
640 size += com.google.protobuf.CodedOutputStream
641 .computeMessageSize(6, getSolutionHint());
642 }
643 for (int i = 0; i < generalConstraint_.size(); i++) {
644 size += com.google.protobuf.CodedOutputStream
645 .computeMessageSize(7, generalConstraint_.get(i));
646 }
647 if (((bitField0_ & 0x00000004) != 0)) {
648 size += com.google.protobuf.CodedOutputStream
649 .computeMessageSize(8, getQuadraticObjective());
650 }
651 size += unknownFields.getSerializedSize();
652 memoizedSize = size;
653 return size;
654 }
655
656 @java.lang.Override
657 public boolean equals(final java.lang.Object obj) {
658 if (obj == this) {
659 return true;
660 }
661 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto)) {
662 return super.equals(obj);
663 }
664 com.google.ortools.linearsolver.MPModelProto other = (com.google.ortools.linearsolver.MPModelProto) obj;
665
666 if (!getVariableList()
667 .equals(other.getVariableList())) return false;
668 if (!getConstraintList()
669 .equals(other.getConstraintList())) return false;
671 .equals(other.getGeneralConstraintList())) return false;
672 if (hasMaximize() != other.hasMaximize()) return false;
673 if (hasMaximize()) {
674 if (getMaximize()
675 != other.getMaximize()) return false;
676 }
677 if (hasObjectiveOffset() != other.hasObjectiveOffset()) return false;
678 if (hasObjectiveOffset()) {
679 if (java.lang.Double.doubleToLongBits(getObjectiveOffset())
680 != java.lang.Double.doubleToLongBits(
681 other.getObjectiveOffset())) return false;
682 }
683 if (hasQuadraticObjective() != other.hasQuadraticObjective()) return false;
684 if (hasQuadraticObjective()) {
686 .equals(other.getQuadraticObjective())) return false;
687 }
688 if (hasName() != other.hasName()) return false;
689 if (hasName()) {
690 if (!getName()
691 .equals(other.getName())) return false;
692 }
693 if (hasSolutionHint() != other.hasSolutionHint()) return false;
694 if (hasSolutionHint()) {
695 if (!getSolutionHint()
696 .equals(other.getSolutionHint())) return false;
697 }
698 if (!unknownFields.equals(other.unknownFields)) return false;
699 return true;
700 }
701
702 @java.lang.Override
703 public int hashCode() {
704 if (memoizedHashCode != 0) {
705 return memoizedHashCode;
706 }
707 int hash = 41;
708 hash = (19 * hash) + getDescriptor().hashCode();
709 if (getVariableCount() > 0) {
710 hash = (37 * hash) + VARIABLE_FIELD_NUMBER;
711 hash = (53 * hash) + getVariableList().hashCode();
712 }
713 if (getConstraintCount() > 0) {
714 hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER;
715 hash = (53 * hash) + getConstraintList().hashCode();
716 }
717 if (getGeneralConstraintCount() > 0) {
718 hash = (37 * hash) + GENERAL_CONSTRAINT_FIELD_NUMBER;
719 hash = (53 * hash) + getGeneralConstraintList().hashCode();
720 }
721 if (hasMaximize()) {
722 hash = (37 * hash) + MAXIMIZE_FIELD_NUMBER;
723 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
724 getMaximize());
725 }
726 if (hasObjectiveOffset()) {
727 hash = (37 * hash) + OBJECTIVE_OFFSET_FIELD_NUMBER;
728 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
729 java.lang.Double.doubleToLongBits(getObjectiveOffset()));
730 }
731 if (hasQuadraticObjective()) {
732 hash = (37 * hash) + QUADRATIC_OBJECTIVE_FIELD_NUMBER;
733 hash = (53 * hash) + getQuadraticObjective().hashCode();
734 }
735 if (hasName()) {
736 hash = (37 * hash) + NAME_FIELD_NUMBER;
737 hash = (53 * hash) + getName().hashCode();
738 }
739 if (hasSolutionHint()) {
740 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
741 hash = (53 * hash) + getSolutionHint().hashCode();
742 }
743 hash = (29 * hash) + unknownFields.hashCode();
744 memoizedHashCode = hash;
745 return hash;
746 }
747
748 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
749 java.nio.ByteBuffer data)
750 throws com.google.protobuf.InvalidProtocolBufferException {
751 return PARSER.parseFrom(data);
752 }
753 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
754 java.nio.ByteBuffer data,
755 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
756 throws com.google.protobuf.InvalidProtocolBufferException {
757 return PARSER.parseFrom(data, extensionRegistry);
758 }
759 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
760 com.google.protobuf.ByteString data)
761 throws com.google.protobuf.InvalidProtocolBufferException {
762 return PARSER.parseFrom(data);
763 }
764 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
765 com.google.protobuf.ByteString data,
766 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
767 throws com.google.protobuf.InvalidProtocolBufferException {
768 return PARSER.parseFrom(data, extensionRegistry);
769 }
770 public static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data)
771 throws com.google.protobuf.InvalidProtocolBufferException {
772 return PARSER.parseFrom(data);
773 }
774 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
775 byte[] data,
776 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
777 throws com.google.protobuf.InvalidProtocolBufferException {
778 return PARSER.parseFrom(data, extensionRegistry);
779 }
780 public static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
781 throws java.io.IOException {
782 return com.google.protobuf.GeneratedMessageV3
783 .parseWithIOException(PARSER, input);
784 }
785 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
786 java.io.InputStream input,
787 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
788 throws java.io.IOException {
789 return com.google.protobuf.GeneratedMessageV3
790 .parseWithIOException(PARSER, input, extensionRegistry);
791 }
792 public static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input)
793 throws java.io.IOException {
794 return com.google.protobuf.GeneratedMessageV3
795 .parseDelimitedWithIOException(PARSER, input);
796 }
797 public static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(
798 java.io.InputStream input,
799 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
800 throws java.io.IOException {
801 return com.google.protobuf.GeneratedMessageV3
802 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
803 }
804 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
805 com.google.protobuf.CodedInputStream input)
806 throws java.io.IOException {
807 return com.google.protobuf.GeneratedMessageV3
808 .parseWithIOException(PARSER, input);
809 }
810 public static com.google.ortools.linearsolver.MPModelProto parseFrom(
811 com.google.protobuf.CodedInputStream input,
812 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
813 throws java.io.IOException {
814 return com.google.protobuf.GeneratedMessageV3
815 .parseWithIOException(PARSER, input, extensionRegistry);
816 }
817
818 @java.lang.Override
819 public Builder newBuilderForType() { return newBuilder(); }
820 public static Builder newBuilder() {
821 return DEFAULT_INSTANCE.toBuilder();
822 }
823 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype) {
824 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
825 }
826 @java.lang.Override
828 return this == DEFAULT_INSTANCE
829 ? new Builder() : new Builder().mergeFrom(this);
830 }
831
832 @java.lang.Override
834 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
835 Builder builder = new Builder(parent);
836 return builder;
837 }
845 public static final class Builder extends
846 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
847 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto)
848 com.google.ortools.linearsolver.MPModelProtoOrBuilder {
849 public static final com.google.protobuf.Descriptors.Descriptor
851 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
852 }
853
854 @java.lang.Override
855 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
857 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
858 .ensureFieldAccessorsInitialized(
859 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
860 }
861
862 // Construct using com.google.ortools.linearsolver.MPModelProto.newBuilder()
863 private Builder() {
864 maybeForceBuilderInitialization();
865 }
866
867 private Builder(
868 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
869 super(parent);
870 maybeForceBuilderInitialization();
871 }
872 private void maybeForceBuilderInitialization() {
873 if (com.google.protobuf.GeneratedMessageV3
874 .alwaysUseFieldBuilders) {
875 getVariableFieldBuilder();
876 getConstraintFieldBuilder();
877 getGeneralConstraintFieldBuilder();
878 getQuadraticObjectiveFieldBuilder();
879 getSolutionHintFieldBuilder();
880 }
881 }
882 @java.lang.Override
883 public Builder clear() {
884 super.clear();
885 if (variableBuilder_ == null) {
886 variable_ = java.util.Collections.emptyList();
887 bitField0_ = (bitField0_ & ~0x00000001);
888 } else {
889 variableBuilder_.clear();
890 }
891 if (constraintBuilder_ == null) {
892 constraint_ = java.util.Collections.emptyList();
893 bitField0_ = (bitField0_ & ~0x00000002);
894 } else {
895 constraintBuilder_.clear();
896 }
897 if (generalConstraintBuilder_ == null) {
898 generalConstraint_ = java.util.Collections.emptyList();
899 bitField0_ = (bitField0_ & ~0x00000004);
900 } else {
901 generalConstraintBuilder_.clear();
902 }
903 maximize_ = false;
904 bitField0_ = (bitField0_ & ~0x00000008);
905 objectiveOffset_ = 0D;
906 bitField0_ = (bitField0_ & ~0x00000010);
907 if (quadraticObjectiveBuilder_ == null) {
908 quadraticObjective_ = null;
909 } else {
910 quadraticObjectiveBuilder_.clear();
911 }
912 bitField0_ = (bitField0_ & ~0x00000020);
913 name_ = "";
914 bitField0_ = (bitField0_ & ~0x00000040);
915 if (solutionHintBuilder_ == null) {
916 solutionHint_ = null;
917 } else {
918 solutionHintBuilder_.clear();
919 }
920 bitField0_ = (bitField0_ & ~0x00000080);
921 return this;
922 }
923
924 @java.lang.Override
925 public com.google.protobuf.Descriptors.Descriptor
927 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
928 }
929
930 @java.lang.Override
931 public com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType() {
932 return com.google.ortools.linearsolver.MPModelProto.getDefaultInstance();
933 }
934
935 @java.lang.Override
936 public com.google.ortools.linearsolver.MPModelProto build() {
937 com.google.ortools.linearsolver.MPModelProto result = buildPartial();
938 if (!result.isInitialized()) {
939 throw newUninitializedMessageException(result);
940 }
941 return result;
942 }
943
944 @java.lang.Override
945 public com.google.ortools.linearsolver.MPModelProto buildPartial() {
946 com.google.ortools.linearsolver.MPModelProto result = new com.google.ortools.linearsolver.MPModelProto(this);
947 int from_bitField0_ = bitField0_;
948 int to_bitField0_ = 0;
949 if (variableBuilder_ == null) {
950 if (((bitField0_ & 0x00000001) != 0)) {
951 variable_ = java.util.Collections.unmodifiableList(variable_);
952 bitField0_ = (bitField0_ & ~0x00000001);
953 }
954 result.variable_ = variable_;
955 } else {
956 result.variable_ = variableBuilder_.build();
957 }
958 if (constraintBuilder_ == null) {
959 if (((bitField0_ & 0x00000002) != 0)) {
960 constraint_ = java.util.Collections.unmodifiableList(constraint_);
961 bitField0_ = (bitField0_ & ~0x00000002);
962 }
963 result.constraint_ = constraint_;
964 } else {
965 result.constraint_ = constraintBuilder_.build();
966 }
967 if (generalConstraintBuilder_ == null) {
968 if (((bitField0_ & 0x00000004) != 0)) {
969 generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
970 bitField0_ = (bitField0_ & ~0x00000004);
971 }
972 result.generalConstraint_ = generalConstraint_;
973 } else {
974 result.generalConstraint_ = generalConstraintBuilder_.build();
975 }
976 if (((from_bitField0_ & 0x00000008) != 0)) {
977 result.maximize_ = maximize_;
978 to_bitField0_ |= 0x00000001;
979 }
980 if (((from_bitField0_ & 0x00000010) != 0)) {
981 result.objectiveOffset_ = objectiveOffset_;
982 to_bitField0_ |= 0x00000002;
983 }
984 if (((from_bitField0_ & 0x00000020) != 0)) {
985 if (quadraticObjectiveBuilder_ == null) {
986 result.quadraticObjective_ = quadraticObjective_;
987 } else {
988 result.quadraticObjective_ = quadraticObjectiveBuilder_.build();
989 }
990 to_bitField0_ |= 0x00000004;
991 }
992 if (((from_bitField0_ & 0x00000040) != 0)) {
993 to_bitField0_ |= 0x00000008;
994 }
995 result.name_ = name_;
996 if (((from_bitField0_ & 0x00000080) != 0)) {
997 if (solutionHintBuilder_ == null) {
998 result.solutionHint_ = solutionHint_;
999 } else {
1000 result.solutionHint_ = solutionHintBuilder_.build();
1001 }
1002 to_bitField0_ |= 0x00000010;
1003 }
1004 result.bitField0_ = to_bitField0_;
1005 onBuilt();
1006 return result;
1007 }
1008
1009 @java.lang.Override
1010 public Builder clone() {
1011 return super.clone();
1012 }
1013 @java.lang.Override
1015 com.google.protobuf.Descriptors.FieldDescriptor field,
1016 java.lang.Object value) {
1017 return super.setField(field, value);
1018 }
1019 @java.lang.Override
1021 com.google.protobuf.Descriptors.FieldDescriptor field) {
1022 return super.clearField(field);
1023 }
1024 @java.lang.Override
1026 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1027 return super.clearOneof(oneof);
1028 }
1029 @java.lang.Override
1031 com.google.protobuf.Descriptors.FieldDescriptor field,
1032 int index, java.lang.Object value) {
1033 return super.setRepeatedField(field, index, value);
1034 }
1035 @java.lang.Override
1037 com.google.protobuf.Descriptors.FieldDescriptor field,
1038 java.lang.Object value) {
1039 return super.addRepeatedField(field, value);
1040 }
1041 @java.lang.Override
1042 public Builder mergeFrom(com.google.protobuf.Message other) {
1043 if (other instanceof com.google.ortools.linearsolver.MPModelProto) {
1044 return mergeFrom((com.google.ortools.linearsolver.MPModelProto)other);
1045 } else {
1046 super.mergeFrom(other);
1047 return this;
1048 }
1049 }
1050
1051 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other) {
1052 if (other == com.google.ortools.linearsolver.MPModelProto.getDefaultInstance()) return this;
1053 if (variableBuilder_ == null) {
1054 if (!other.variable_.isEmpty()) {
1055 if (variable_.isEmpty()) {
1056 variable_ = other.variable_;
1057 bitField0_ = (bitField0_ & ~0x00000001);
1058 } else {
1059 ensureVariableIsMutable();
1060 variable_.addAll(other.variable_);
1061 }
1062 onChanged();
1063 }
1064 } else {
1065 if (!other.variable_.isEmpty()) {
1066 if (variableBuilder_.isEmpty()) {
1067 variableBuilder_.dispose();
1068 variableBuilder_ = null;
1069 variable_ = other.variable_;
1070 bitField0_ = (bitField0_ & ~0x00000001);
1071 variableBuilder_ =
1072 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1073 getVariableFieldBuilder() : null;
1074 } else {
1075 variableBuilder_.addAllMessages(other.variable_);
1076 }
1077 }
1078 }
1079 if (constraintBuilder_ == null) {
1080 if (!other.constraint_.isEmpty()) {
1081 if (constraint_.isEmpty()) {
1082 constraint_ = other.constraint_;
1083 bitField0_ = (bitField0_ & ~0x00000002);
1084 } else {
1085 ensureConstraintIsMutable();
1086 constraint_.addAll(other.constraint_);
1087 }
1088 onChanged();
1089 }
1090 } else {
1091 if (!other.constraint_.isEmpty()) {
1092 if (constraintBuilder_.isEmpty()) {
1093 constraintBuilder_.dispose();
1094 constraintBuilder_ = null;
1095 constraint_ = other.constraint_;
1096 bitField0_ = (bitField0_ & ~0x00000002);
1097 constraintBuilder_ =
1098 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1099 getConstraintFieldBuilder() : null;
1100 } else {
1101 constraintBuilder_.addAllMessages(other.constraint_);
1102 }
1103 }
1104 }
1105 if (generalConstraintBuilder_ == null) {
1106 if (!other.generalConstraint_.isEmpty()) {
1107 if (generalConstraint_.isEmpty()) {
1108 generalConstraint_ = other.generalConstraint_;
1109 bitField0_ = (bitField0_ & ~0x00000004);
1110 } else {
1111 ensureGeneralConstraintIsMutable();
1112 generalConstraint_.addAll(other.generalConstraint_);
1113 }
1114 onChanged();
1115 }
1116 } else {
1117 if (!other.generalConstraint_.isEmpty()) {
1118 if (generalConstraintBuilder_.isEmpty()) {
1119 generalConstraintBuilder_.dispose();
1120 generalConstraintBuilder_ = null;
1121 generalConstraint_ = other.generalConstraint_;
1122 bitField0_ = (bitField0_ & ~0x00000004);
1123 generalConstraintBuilder_ =
1124 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1125 getGeneralConstraintFieldBuilder() : null;
1126 } else {
1127 generalConstraintBuilder_.addAllMessages(other.generalConstraint_);
1128 }
1129 }
1130 }
1131 if (other.hasMaximize()) {
1132 setMaximize(other.getMaximize());
1133 }
1134 if (other.hasObjectiveOffset()) {
1135 setObjectiveOffset(other.getObjectiveOffset());
1136 }
1137 if (other.hasQuadraticObjective()) {
1138 mergeQuadraticObjective(other.getQuadraticObjective());
1139 }
1140 if (other.hasName()) {
1141 bitField0_ |= 0x00000040;
1142 name_ = other.name_;
1143 onChanged();
1144 }
1145 if (other.hasSolutionHint()) {
1146 mergeSolutionHint(other.getSolutionHint());
1147 }
1148 this.mergeUnknownFields(other.unknownFields);
1149 onChanged();
1150 return this;
1151 }
1152
1153 @java.lang.Override
1154 public final boolean isInitialized() {
1155 return true;
1156 }
1157
1158 @java.lang.Override
1160 com.google.protobuf.CodedInputStream input,
1161 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1162 throws java.io.IOException {
1163 com.google.ortools.linearsolver.MPModelProto parsedMessage = null;
1164 try {
1165 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1166 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1167 parsedMessage = (com.google.ortools.linearsolver.MPModelProto) e.getUnfinishedMessage();
1168 throw e.unwrapIOException();
1169 } finally {
1170 if (parsedMessage != null) {
1171 mergeFrom(parsedMessage);
1172 }
1173 }
1174 return this;
1175 }
1176 private int bitField0_;
1177
1178 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_ =
1179 java.util.Collections.emptyList();
1180 private void ensureVariableIsMutable() {
1181 if (!((bitField0_ & 0x00000001) != 0)) {
1182 variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>(variable_);
1183 bitField0_ |= 0x00000001;
1184 }
1185 }
1186
1187 private com.google.protobuf.RepeatedFieldBuilderV3<
1188 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> variableBuilder_;
1189
1197 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
1198 if (variableBuilder_ == null) {
1199 return java.util.Collections.unmodifiableList(variable_);
1200 } else {
1201 return variableBuilder_.getMessageList();
1202 }
1203 }
1211 public int getVariableCount() {
1212 if (variableBuilder_ == null) {
1213 return variable_.size();
1214 } else {
1215 return variableBuilder_.getCount();
1216 }
1217 }
1225 public com.google.ortools.linearsolver.MPVariableProto getVariable(int index) {
1226 if (variableBuilder_ == null) {
1227 return variable_.get(index);
1228 } else {
1229 return variableBuilder_.getMessage(index);
1230 }
1231 }
1240 int index, com.google.ortools.linearsolver.MPVariableProto value) {
1241 if (variableBuilder_ == null) {
1242 if (value == null) {
1243 throw new NullPointerException();
1244 }
1245 ensureVariableIsMutable();
1246 variable_.set(index, value);
1247 onChanged();
1248 } else {
1249 variableBuilder_.setMessage(index, value);
1250 }
1251 return this;
1252 }
1261 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
1262 if (variableBuilder_ == null) {
1263 ensureVariableIsMutable();
1264 variable_.set(index, builderForValue.build());
1265 onChanged();
1266 } else {
1267 variableBuilder_.setMessage(index, builderForValue.build());
1268 }
1269 return this;
1270 }
1278 public Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value) {
1279 if (variableBuilder_ == null) {
1280 if (value == null) {
1281 throw new NullPointerException();
1282 }
1283 ensureVariableIsMutable();
1284 variable_.add(value);
1285 onChanged();
1286 } else {
1287 variableBuilder_.addMessage(value);
1288 }
1289 return this;
1290 }
1299 int index, com.google.ortools.linearsolver.MPVariableProto value) {
1300 if (variableBuilder_ == null) {
1301 if (value == null) {
1302 throw new NullPointerException();
1303 }
1304 ensureVariableIsMutable();
1305 variable_.add(index, value);
1306 onChanged();
1307 } else {
1308 variableBuilder_.addMessage(index, value);
1309 }
1310 return this;
1311 }
1320 com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
1321 if (variableBuilder_ == null) {
1322 ensureVariableIsMutable();
1323 variable_.add(builderForValue.build());
1324 onChanged();
1325 } else {
1326 variableBuilder_.addMessage(builderForValue.build());
1327 }
1328 return this;
1329 }
1338 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
1339 if (variableBuilder_ == null) {
1340 ensureVariableIsMutable();
1341 variable_.add(index, builderForValue.build());
1342 onChanged();
1343 } else {
1344 variableBuilder_.addMessage(index, builderForValue.build());
1345 }
1346 return this;
1347 }
1356 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto> values) {
1357 if (variableBuilder_ == null) {
1358 ensureVariableIsMutable();
1359 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1360 values, variable_);
1361 onChanged();
1362 } else {
1363 variableBuilder_.addAllMessages(values);
1364 }
1365 return this;
1366 }
1375 if (variableBuilder_ == null) {
1376 variable_ = java.util.Collections.emptyList();
1377 bitField0_ = (bitField0_ & ~0x00000001);
1378 onChanged();
1379 } else {
1380 variableBuilder_.clear();
1381 }
1382 return this;
1383 }
1391 public Builder removeVariable(int index) {
1392 if (variableBuilder_ == null) {
1393 ensureVariableIsMutable();
1394 variable_.remove(index);
1395 onChanged();
1396 } else {
1397 variableBuilder_.remove(index);
1398 }
1399 return this;
1400 }
1408 public com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder(
1409 int index) {
1410 return getVariableFieldBuilder().getBuilder(index);
1411 }
1419 public com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(
1420 int index) {
1421 if (variableBuilder_ == null) {
1422 return variable_.get(index); } else {
1423 return variableBuilder_.getMessageOrBuilder(index);
1424 }
1425 }
1433 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1435 if (variableBuilder_ != null) {
1436 return variableBuilder_.getMessageOrBuilderList();
1437 } else {
1438 return java.util.Collections.unmodifiableList(variable_);
1439 }
1440 }
1448 public com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder() {
1449 return getVariableFieldBuilder().addBuilder(
1450 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
1451 }
1459 public com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder(
1460 int index) {
1461 return getVariableFieldBuilder().addBuilder(
1462 index, com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
1463 }
1471 public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
1473 return getVariableFieldBuilder().getBuilderList();
1474 }
1475 private com.google.protobuf.RepeatedFieldBuilderV3<
1476 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1477 getVariableFieldBuilder() {
1478 if (variableBuilder_ == null) {
1479 variableBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1480 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>(
1481 variable_,
1482 ((bitField0_ & 0x00000001) != 0),
1483 getParentForChildren(),
1484 isClean());
1485 variable_ = null;
1486 }
1487 return variableBuilder_;
1488 }
1489
1490 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_ =
1491 java.util.Collections.emptyList();
1492 private void ensureConstraintIsMutable() {
1493 if (!((bitField0_ & 0x00000002) != 0)) {
1494 constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>(constraint_);
1495 bitField0_ |= 0x00000002;
1496 }
1497 }
1498
1499 private com.google.protobuf.RepeatedFieldBuilderV3<
1500 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
1501
1509 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
1510 if (constraintBuilder_ == null) {
1511 return java.util.Collections.unmodifiableList(constraint_);
1512 } else {
1513 return constraintBuilder_.getMessageList();
1514 }
1515 }
1523 public int getConstraintCount() {
1524 if (constraintBuilder_ == null) {
1525 return constraint_.size();
1526 } else {
1527 return constraintBuilder_.getCount();
1528 }
1529 }
1537 public com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index) {
1538 if (constraintBuilder_ == null) {
1539 return constraint_.get(index);
1540 } else {
1541 return constraintBuilder_.getMessage(index);
1542 }
1543 }
1552 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
1553 if (constraintBuilder_ == null) {
1554 if (value == null) {
1555 throw new NullPointerException();
1556 }
1557 ensureConstraintIsMutable();
1558 constraint_.set(index, value);
1559 onChanged();
1560 } else {
1561 constraintBuilder_.setMessage(index, value);
1562 }
1563 return this;
1564 }
1573 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
1574 if (constraintBuilder_ == null) {
1575 ensureConstraintIsMutable();
1576 constraint_.set(index, builderForValue.build());
1577 onChanged();
1578 } else {
1579 constraintBuilder_.setMessage(index, builderForValue.build());
1580 }
1581 return this;
1582 }
1590 public Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value) {
1591 if (constraintBuilder_ == null) {
1592 if (value == null) {
1593 throw new NullPointerException();
1594 }
1595 ensureConstraintIsMutable();
1596 constraint_.add(value);
1597 onChanged();
1598 } else {
1599 constraintBuilder_.addMessage(value);
1600 }
1601 return this;
1602 }
1611 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
1612 if (constraintBuilder_ == null) {
1613 if (value == null) {
1614 throw new NullPointerException();
1615 }
1616 ensureConstraintIsMutable();
1617 constraint_.add(index, value);
1618 onChanged();
1619 } else {
1620 constraintBuilder_.addMessage(index, value);
1621 }
1622 return this;
1623 }
1632 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
1633 if (constraintBuilder_ == null) {
1634 ensureConstraintIsMutable();
1635 constraint_.add(builderForValue.build());
1636 onChanged();
1637 } else {
1638 constraintBuilder_.addMessage(builderForValue.build());
1639 }
1640 return this;
1641 }
1650 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
1651 if (constraintBuilder_ == null) {
1652 ensureConstraintIsMutable();
1653 constraint_.add(index, builderForValue.build());
1654 onChanged();
1655 } else {
1656 constraintBuilder_.addMessage(index, builderForValue.build());
1657 }
1658 return this;
1659 }
1668 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto> values) {
1669 if (constraintBuilder_ == null) {
1670 ensureConstraintIsMutable();
1671 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1672 values, constraint_);
1673 onChanged();
1674 } else {
1675 constraintBuilder_.addAllMessages(values);
1676 }
1677 return this;
1678 }
1687 if (constraintBuilder_ == null) {
1688 constraint_ = java.util.Collections.emptyList();
1689 bitField0_ = (bitField0_ & ~0x00000002);
1690 onChanged();
1691 } else {
1692 constraintBuilder_.clear();
1693 }
1694 return this;
1695 }
1703 public Builder removeConstraint(int index) {
1704 if (constraintBuilder_ == null) {
1705 ensureConstraintIsMutable();
1706 constraint_.remove(index);
1707 onChanged();
1708 } else {
1709 constraintBuilder_.remove(index);
1710 }
1711 return this;
1712 }
1720 public com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder(
1721 int index) {
1722 return getConstraintFieldBuilder().getBuilder(index);
1723 }
1731 public com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(
1732 int index) {
1733 if (constraintBuilder_ == null) {
1734 return constraint_.get(index); } else {
1735 return constraintBuilder_.getMessageOrBuilder(index);
1736 }
1737 }
1745 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1747 if (constraintBuilder_ != null) {
1748 return constraintBuilder_.getMessageOrBuilderList();
1749 } else {
1750 return java.util.Collections.unmodifiableList(constraint_);
1751 }
1752 }
1760 public com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder() {
1761 return getConstraintFieldBuilder().addBuilder(
1762 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
1763 }
1771 public com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder(
1772 int index) {
1773 return getConstraintFieldBuilder().addBuilder(
1774 index, com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
1775 }
1783 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
1785 return getConstraintFieldBuilder().getBuilderList();
1786 }
1787 private com.google.protobuf.RepeatedFieldBuilderV3<
1788 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1789 getConstraintFieldBuilder() {
1790 if (constraintBuilder_ == null) {
1791 constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1792 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
1793 constraint_,
1794 ((bitField0_ & 0x00000002) != 0),
1795 getParentForChildren(),
1796 isClean());
1797 constraint_ = null;
1798 }
1799 return constraintBuilder_;
1800 }
1801
1802 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_ =
1803 java.util.Collections.emptyList();
1804 private void ensureGeneralConstraintIsMutable() {
1805 if (!((bitField0_ & 0x00000004) != 0)) {
1806 generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>(generalConstraint_);
1807 bitField0_ |= 0x00000004;
1808 }
1809 }
1810
1811 private com.google.protobuf.RepeatedFieldBuilderV3<
1812 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> generalConstraintBuilder_;
1813
1822 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
1823 if (generalConstraintBuilder_ == null) {
1824 return java.util.Collections.unmodifiableList(generalConstraint_);
1825 } else {
1826 return generalConstraintBuilder_.getMessageList();
1827 }
1828 }
1838 if (generalConstraintBuilder_ == null) {
1839 return generalConstraint_.size();
1840 } else {
1841 return generalConstraintBuilder_.getCount();
1842 }
1843 }
1852 public com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index) {
1853 if (generalConstraintBuilder_ == null) {
1854 return generalConstraint_.get(index);
1855 } else {
1856 return generalConstraintBuilder_.getMessage(index);
1857 }
1858 }
1868 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
1869 if (generalConstraintBuilder_ == null) {
1870 if (value == null) {
1871 throw new NullPointerException();
1872 }
1873 ensureGeneralConstraintIsMutable();
1874 generalConstraint_.set(index, value);
1875 onChanged();
1876 } else {
1877 generalConstraintBuilder_.setMessage(index, value);
1878 }
1879 return this;
1880 }
1890 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
1891 if (generalConstraintBuilder_ == null) {
1892 ensureGeneralConstraintIsMutable();
1893 generalConstraint_.set(index, builderForValue.build());
1894 onChanged();
1895 } else {
1896 generalConstraintBuilder_.setMessage(index, builderForValue.build());
1897 }
1898 return this;
1899 }
1908 public Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
1909 if (generalConstraintBuilder_ == null) {
1910 if (value == null) {
1911 throw new NullPointerException();
1912 }
1913 ensureGeneralConstraintIsMutable();
1914 generalConstraint_.add(value);
1915 onChanged();
1916 } else {
1917 generalConstraintBuilder_.addMessage(value);
1918 }
1919 return this;
1920 }
1930 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
1931 if (generalConstraintBuilder_ == null) {
1932 if (value == null) {
1933 throw new NullPointerException();
1934 }
1935 ensureGeneralConstraintIsMutable();
1936 generalConstraint_.add(index, value);
1937 onChanged();
1938 } else {
1939 generalConstraintBuilder_.addMessage(index, value);
1940 }
1941 return this;
1942 }
1952 com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
1953 if (generalConstraintBuilder_ == null) {
1954 ensureGeneralConstraintIsMutable();
1955 generalConstraint_.add(builderForValue.build());
1956 onChanged();
1957 } else {
1958 generalConstraintBuilder_.addMessage(builderForValue.build());
1959 }
1960 return this;
1961 }
1971 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
1972 if (generalConstraintBuilder_ == null) {
1973 ensureGeneralConstraintIsMutable();
1974 generalConstraint_.add(index, builderForValue.build());
1975 onChanged();
1976 } else {
1977 generalConstraintBuilder_.addMessage(index, builderForValue.build());
1978 }
1979 return this;
1980 }
1990 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto> values) {
1991 if (generalConstraintBuilder_ == null) {
1992 ensureGeneralConstraintIsMutable();
1993 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1994 values, generalConstraint_);
1995 onChanged();
1996 } else {
1997 generalConstraintBuilder_.addAllMessages(values);
1998 }
1999 return this;
2000 }
2010 if (generalConstraintBuilder_ == null) {
2011 generalConstraint_ = java.util.Collections.emptyList();
2012 bitField0_ = (bitField0_ & ~0x00000004);
2013 onChanged();
2014 } else {
2015 generalConstraintBuilder_.clear();
2016 }
2017 return this;
2018 }
2028 if (generalConstraintBuilder_ == null) {
2029 ensureGeneralConstraintIsMutable();
2030 generalConstraint_.remove(index);
2031 onChanged();
2032 } else {
2033 generalConstraintBuilder_.remove(index);
2034 }
2035 return this;
2036 }
2045 public com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder(
2046 int index) {
2047 return getGeneralConstraintFieldBuilder().getBuilder(index);
2048 }
2057 public com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(
2058 int index) {
2059 if (generalConstraintBuilder_ == null) {
2060 return generalConstraint_.get(index); } else {
2061 return generalConstraintBuilder_.getMessageOrBuilder(index);
2062 }
2063 }
2072 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
2074 if (generalConstraintBuilder_ != null) {
2075 return generalConstraintBuilder_.getMessageOrBuilderList();
2076 } else {
2077 return java.util.Collections.unmodifiableList(generalConstraint_);
2078 }
2079 }
2088 public com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder() {
2089 return getGeneralConstraintFieldBuilder().addBuilder(
2090 com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
2091 }
2100 public com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder(
2101 int index) {
2102 return getGeneralConstraintFieldBuilder().addBuilder(
2103 index, com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
2104 }
2113 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder>
2115 return getGeneralConstraintFieldBuilder().getBuilderList();
2116 }
2117 private com.google.protobuf.RepeatedFieldBuilderV3<
2118 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
2119 getGeneralConstraintFieldBuilder() {
2120 if (generalConstraintBuilder_ == null) {
2121 generalConstraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2122 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>(
2123 generalConstraint_,
2124 ((bitField0_ & 0x00000004) != 0),
2125 getParentForChildren(),
2126 isClean());
2127 generalConstraint_ = null;
2128 }
2129 return generalConstraintBuilder_;
2130 }
2131
2132 private boolean maximize_ ;
2141 @java.lang.Override
2142 public boolean hasMaximize() {
2143 return ((bitField0_ & 0x00000008) != 0);
2144 }
2153 @java.lang.Override
2154 public boolean getMaximize() {
2155 return maximize_;
2156 }
2166 public Builder setMaximize(boolean value) {
2167 bitField0_ |= 0x00000008;
2168 maximize_ = value;
2169 onChanged();
2170 return this;
2171 }
2181 bitField0_ = (bitField0_ & ~0x00000008);
2182 maximize_ = false;
2183 onChanged();
2184 return this;
2185 }
2186
2187 private double objectiveOffset_ ;
2196 @java.lang.Override
2197 public boolean hasObjectiveOffset() {
2198 return ((bitField0_ & 0x00000010) != 0);
2199 }
2208 @java.lang.Override
2209 public double getObjectiveOffset() {
2210 return objectiveOffset_;
2211 }
2221 public Builder setObjectiveOffset(double value) {
2222 bitField0_ |= 0x00000010;
2223 objectiveOffset_ = value;
2224 onChanged();
2225 return this;
2226 }
2236 bitField0_ = (bitField0_ & ~0x00000010);
2237 objectiveOffset_ = 0D;
2238 onChanged();
2239 return this;
2240 }
2241
2242 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
2243 private com.google.protobuf.SingleFieldBuilderV3<
2244 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder> quadraticObjectiveBuilder_;
2254 public boolean hasQuadraticObjective() {
2255 return ((bitField0_ & 0x00000020) != 0);
2256 }
2266 public com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective() {
2267 if (quadraticObjectiveBuilder_ == null) {
2268 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
2269 } else {
2270 return quadraticObjectiveBuilder_.getMessage();
2271 }
2272 }
2281 public Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
2282 if (quadraticObjectiveBuilder_ == null) {
2283 if (value == null) {
2284 throw new NullPointerException();
2285 }
2286 quadraticObjective_ = value;
2287 onChanged();
2288 } else {
2289 quadraticObjectiveBuilder_.setMessage(value);
2290 }
2291 bitField0_ |= 0x00000020;
2292 return this;
2293 }
2303 com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue) {
2304 if (quadraticObjectiveBuilder_ == null) {
2305 quadraticObjective_ = builderForValue.build();
2306 onChanged();
2307 } else {
2308 quadraticObjectiveBuilder_.setMessage(builderForValue.build());
2309 }
2310 bitField0_ |= 0x00000020;
2311 return this;
2312 }
2321 public Builder mergeQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
2322 if (quadraticObjectiveBuilder_ == null) {
2323 if (((bitField0_ & 0x00000020) != 0) &&
2324 quadraticObjective_ != null &&
2325 quadraticObjective_ != com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance()) {
2326 quadraticObjective_ =
2327 com.google.ortools.linearsolver.MPQuadraticObjective.newBuilder(quadraticObjective_).mergeFrom(value).buildPartial();
2328 } else {
2329 quadraticObjective_ = value;
2330 }
2331 onChanged();
2332 } else {
2333 quadraticObjectiveBuilder_.mergeFrom(value);
2334 }
2335 bitField0_ |= 0x00000020;
2336 return this;
2337 }
2347 if (quadraticObjectiveBuilder_ == null) {
2348 quadraticObjective_ = null;
2349 onChanged();
2350 } else {
2351 quadraticObjectiveBuilder_.clear();
2352 }
2353 bitField0_ = (bitField0_ & ~0x00000020);
2354 return this;
2355 }
2364 public com.google.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder() {
2365 bitField0_ |= 0x00000020;
2366 onChanged();
2367 return getQuadraticObjectiveFieldBuilder().getBuilder();
2368 }
2377 public com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder() {
2378 if (quadraticObjectiveBuilder_ != null) {
2379 return quadraticObjectiveBuilder_.getMessageOrBuilder();
2380 } else {
2381 return quadraticObjective_ == null ?
2382 com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
2383 }
2384 }
2393 private com.google.protobuf.SingleFieldBuilderV3<
2394 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>
2395 getQuadraticObjectiveFieldBuilder() {
2396 if (quadraticObjectiveBuilder_ == null) {
2397 quadraticObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2398 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>(
2400 getParentForChildren(),
2401 isClean());
2402 quadraticObjective_ = null;
2403 }
2404 return quadraticObjectiveBuilder_;
2405 }
2406
2407 private java.lang.Object name_ = "";
2416 public boolean hasName() {
2417 return ((bitField0_ & 0x00000040) != 0);
2418 }
2427 public java.lang.String getName() {
2428 java.lang.Object ref = name_;
2429 if (!(ref instanceof java.lang.String)) {
2430 com.google.protobuf.ByteString bs =
2431 (com.google.protobuf.ByteString) ref;
2432 java.lang.String s = bs.toStringUtf8();
2433 if (bs.isValidUtf8()) {
2434 name_ = s;
2435 }
2436 return s;
2437 } else {
2438 return (java.lang.String) ref;
2439 }
2440 }
2449 public com.google.protobuf.ByteString
2451 java.lang.Object ref = name_;
2452 if (ref instanceof String) {
2453 com.google.protobuf.ByteString b =
2454 com.google.protobuf.ByteString.copyFromUtf8(
2455 (java.lang.String) ref);
2456 name_ = b;
2457 return b;
2458 } else {
2459 return (com.google.protobuf.ByteString) ref;
2460 }
2461 }
2472 java.lang.String value) {
2473 if (value == null) {
2474 throw new NullPointerException();
2475 }
2476 bitField0_ |= 0x00000040;
2477 name_ = value;
2478 onChanged();
2479 return this;
2480 }
2490 bitField0_ = (bitField0_ & ~0x00000040);
2491 name_ = getDefaultInstance().getName();
2492 onChanged();
2493 return this;
2494 }
2505 com.google.protobuf.ByteString value) {
2506 if (value == null) {
2507 throw new NullPointerException();
2508 }
2509 bitField0_ |= 0x00000040;
2510 name_ = value;
2511 onChanged();
2512 return this;
2513 }
2514
2515 private com.google.ortools.linearsolver.PartialVariableAssignment solutionHint_;
2516 private com.google.protobuf.SingleFieldBuilderV3<
2517 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
2534 public boolean hasSolutionHint() {
2535 return ((bitField0_ & 0x00000080) != 0);
2536 }
2553 public com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint() {
2554 if (solutionHintBuilder_ == null) {
2555 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2556 } else {
2557 return solutionHintBuilder_.getMessage();
2558 }
2559 }
2575 public Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
2576 if (solutionHintBuilder_ == null) {
2577 if (value == null) {
2578 throw new NullPointerException();
2579 }
2580 solutionHint_ = value;
2581 onChanged();
2582 } else {
2583 solutionHintBuilder_.setMessage(value);
2584 }
2585 bitField0_ |= 0x00000080;
2586 return this;
2587 }
2604 com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue) {
2605 if (solutionHintBuilder_ == null) {
2606 solutionHint_ = builderForValue.build();
2607 onChanged();
2608 } else {
2609 solutionHintBuilder_.setMessage(builderForValue.build());
2610 }
2611 bitField0_ |= 0x00000080;
2612 return this;
2613 }
2629 public Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
2630 if (solutionHintBuilder_ == null) {
2631 if (((bitField0_ & 0x00000080) != 0) &&
2632 solutionHint_ != null &&
2633 solutionHint_ != com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance()) {
2634 solutionHint_ =
2635 com.google.ortools.linearsolver.PartialVariableAssignment.newBuilder(solutionHint_).mergeFrom(value).buildPartial();
2636 } else {
2637 solutionHint_ = value;
2638 }
2639 onChanged();
2640 } else {
2641 solutionHintBuilder_.mergeFrom(value);
2642 }
2643 bitField0_ |= 0x00000080;
2644 return this;
2645 }
2662 if (solutionHintBuilder_ == null) {
2663 solutionHint_ = null;
2664 onChanged();
2665 } else {
2666 solutionHintBuilder_.clear();
2667 }
2668 bitField0_ = (bitField0_ & ~0x00000080);
2669 return this;
2670 }
2686 public com.google.ortools.linearsolver.PartialVariableAssignment.Builder getSolutionHintBuilder() {
2687 bitField0_ |= 0x00000080;
2688 onChanged();
2689 return getSolutionHintFieldBuilder().getBuilder();
2690 }
2706 public com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder() {
2707 if (solutionHintBuilder_ != null) {
2708 return solutionHintBuilder_.getMessageOrBuilder();
2709 } else {
2710 return solutionHint_ == null ?
2711 com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2712 }
2713 }
2729 private com.google.protobuf.SingleFieldBuilderV3<
2730 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>
2731 getSolutionHintFieldBuilder() {
2732 if (solutionHintBuilder_ == null) {
2733 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2734 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>(
2736 getParentForChildren(),
2737 isClean());
2738 solutionHint_ = null;
2739 }
2740 return solutionHintBuilder_;
2741 }
2742 @java.lang.Override
2744 final com.google.protobuf.UnknownFieldSet unknownFields) {
2745 return super.setUnknownFields(unknownFields);
2746 }
2747
2748 @java.lang.Override
2750 final com.google.protobuf.UnknownFieldSet unknownFields) {
2751 return super.mergeUnknownFields(unknownFields);
2752 }
2753
2754
2755 // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto)
2756 }
2757
2758 // @@protoc_insertion_point(class_scope:operations_research.MPModelProto)
2759 private static final com.google.ortools.linearsolver.MPModelProto DEFAULT_INSTANCE;
2760 static {
2761 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto();
2762 }
2763
2764 public static com.google.ortools.linearsolver.MPModelProto getDefaultInstance() {
2765 return DEFAULT_INSTANCE;
2766 }
2767
2768 @java.lang.Deprecated public static final com.google.protobuf.Parser<MPModelProto>
2769 PARSER = new com.google.protobuf.AbstractParser<MPModelProto>() {
2770 @java.lang.Override
2771 public MPModelProto parsePartialFrom(
2772 com.google.protobuf.CodedInputStream input,
2773 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2774 throws com.google.protobuf.InvalidProtocolBufferException {
2775 return new MPModelProto(input, extensionRegistry);
2776 }
2777 };
2778
2779 public static com.google.protobuf.Parser<MPModelProto> parser() {
2780 return PARSER;
2781 }
2782
2783 @java.lang.Override
2784 public com.google.protobuf.Parser<MPModelProto> getParserForType() {
2785 return PARSER;
2786 }
2787
2788 @java.lang.Override
2789 public com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType() {
2790 return DEFAULT_INSTANCE;
2791 }
2792
2793}
2794
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue)
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
com.google.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder()
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder(int index)
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value)
com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder(int index)
Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue)
com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
Builder addAllGeneralConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto > values)
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder(int index)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder()
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
Builder setNameBytes(com.google.protobuf.ByteString value)
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value)
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other)
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder()
com.google.ortools.linearsolver.PartialVariableAssignment.Builder getSolutionHintBuilder()
Builder mergeFrom(com.google.protobuf.Message other)
java.util.List< com.google.ortools.linearsolver.MPVariableProto.Builder > getVariableBuilderList()
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
com.google.ortools.linearsolver.MPModelProto buildPartial()
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder(int index)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder > getGeneralConstraintBuilderList()
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value)
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
Builder addAllVariable(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto > values)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto.Builder > getConstraintBuilderList()
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder()
com.google.ortools.linearsolver.MPModelProto build()
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value)
Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder(int index)
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
Builder mergeQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value)
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective()
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder()
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder(int index)
Builder addAllConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto > values)
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.linearsolver.MPModelProto getDefaultInstance()
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data)
com.google.protobuf.Parser< MPModelProto > getParserForType()
static final com.google.protobuf.Parser< MPModelProto > PARSER
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< MPModelProto > parser()
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
boolean equals(final java.lang.Object obj)
final com.google.protobuf.UnknownFieldSet getUnknownFields()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.lang.Object newInstance(UnusedPrivateParameter unused)
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective()
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
com.google.protobuf.ByteString getNameBytes()
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)