Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
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
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
14public final class MPModelProto extends
15 com.google.protobuf.GeneratedMessage implements
16 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto)
18private static final long serialVersionUID = 0L;
19 static {
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
22 /* major= */ 4,
23 /* minor= */ 26,
24 /* patch= */ 1,
25 /* suffix= */ "",
26 MPModelProto.class.getName());
27 }
28 // Use MPModelProto.newBuilder() to construct.
29 private MPModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 super(builder);
31 }
32 private MPModelProto() {
33 variable_ = java.util.Collections.emptyList();
34 constraint_ = java.util.Collections.emptyList();
35 generalConstraint_ = java.util.Collections.emptyList();
36 name_ = "";
37 annotation_ = java.util.Collections.emptyList();
38 }
39
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
43 }
44
45 @java.lang.Override
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
51 }
52
53 public interface AnnotationOrBuilder extends
54 // @@protoc_insertion_point(interface_extends:operations_research.MPModelProto.Annotation)
55 com.google.protobuf.MessageOrBuilder {
56
61 boolean hasTargetType();
67
77 boolean hasTargetIndex();
88
97 boolean hasTargetName();
106 java.lang.String getTargetName();
115 com.google.protobuf.ByteString
117
127 boolean hasPayloadKey();
137 java.lang.String getPayloadKey();
147 com.google.protobuf.ByteString
149
159 java.lang.String getPayloadValue();
164 com.google.protobuf.ByteString
166 }
175 public static final class Annotation extends
176 com.google.protobuf.GeneratedMessage implements
177 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto.Annotation)
179 private static final long serialVersionUID = 0L;
180 static {
181 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
182 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
183 /* major= */ 4,
184 /* minor= */ 26,
185 /* patch= */ 1,
186 /* suffix= */ "",
187 Annotation.class.getName());
188 }
189 // Use Annotation.newBuilder() to construct.
190 private Annotation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
191 super(builder);
192 }
193 private Annotation() {
194 targetType_ = 0;
195 targetName_ = "";
196 payloadKey_ = "";
197 payloadValue_ = "";
198 }
199
200 public static final com.google.protobuf.Descriptors.Descriptor
202 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
203 }
204
205 @java.lang.Override
206 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
208 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
209 .ensureFieldAccessorsInitialized(
210 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
211 }
212
221 public enum TargetType
222 implements com.google.protobuf.ProtocolMessageEnum {
235 ;
236
237 static {
238 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
239 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
240 /* major= */ 4,
241 /* minor= */ 26,
242 /* patch= */ 1,
243 /* suffix= */ "",
244 TargetType.class.getName());
245 }
249 public static final int VARIABLE_DEFAULT_VALUE = 0;
253 public static final int CONSTRAINT_VALUE = 1;
257 public static final int GENERAL_CONSTRAINT_VALUE = 2;
258
259
260 public final int getNumber() {
261 return value;
262 }
263
269 @java.lang.Deprecated
270 public static TargetType valueOf(int value) {
271 return forNumber(value);
272 }
273
278 public static TargetType forNumber(int value) {
279 switch (value) {
280 case 0: return VARIABLE_DEFAULT;
281 case 1: return CONSTRAINT;
282 case 2: return GENERAL_CONSTRAINT;
283 default: return null;
284 }
285 }
286
287 public static com.google.protobuf.Internal.EnumLiteMap<TargetType>
289 return internalValueMap;
290 }
291 private static final com.google.protobuf.Internal.EnumLiteMap<
292 TargetType> internalValueMap =
293 new com.google.protobuf.Internal.EnumLiteMap<TargetType>() {
294 public TargetType findValueByNumber(int number) {
295 return TargetType.forNumber(number);
296 }
297 };
298
299 public final com.google.protobuf.Descriptors.EnumValueDescriptor
301 return getDescriptor().getValues().get(ordinal());
302 }
303 public final com.google.protobuf.Descriptors.EnumDescriptor
305 return getDescriptor();
306 }
307 public static final com.google.protobuf.Descriptors.EnumDescriptor
309 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDescriptor().getEnumTypes().get(0);
310 }
311
312 private static final TargetType[] VALUES = values();
313
314 public static TargetType valueOf(
315 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
316 if (desc.getType() != getDescriptor()) {
317 throw new java.lang.IllegalArgumentException(
318 "EnumValueDescriptor is not for this type.");
319 }
320 return VALUES[desc.getIndex()];
321 }
322
323 private final int value;
324
325 private TargetType(int value) {
326 this.value = value;
327 }
328
329 // @@protoc_insertion_point(enum_scope:operations_research.MPModelProto.Annotation.TargetType)
330 }
331
332 private int bitField0_;
333 public static final int TARGET_TYPE_FIELD_NUMBER = 1;
334 private int targetType_ = 0;
339 @java.lang.Override public boolean hasTargetType() {
340 return ((bitField0_ & 0x00000001) != 0);
341 }
347 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
348 return result == null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
349 }
350
351 public static final int TARGET_INDEX_FIELD_NUMBER = 2;
352 private int targetIndex_ = 0;
362 @java.lang.Override
363 public boolean hasTargetIndex() {
364 return ((bitField0_ & 0x00000002) != 0);
365 }
375 @java.lang.Override
376 public int getTargetIndex() {
377 return targetIndex_;
378 }
379
380 public static final int TARGET_NAME_FIELD_NUMBER = 3;
381 @SuppressWarnings("serial")
382 private volatile java.lang.Object targetName_ = "";
391 @java.lang.Override
392 public boolean hasTargetName() {
393 return ((bitField0_ & 0x00000004) != 0);
394 }
403 @java.lang.Override
404 public java.lang.String getTargetName() {
405 java.lang.Object ref = targetName_;
406 if (ref instanceof java.lang.String) {
407 return (java.lang.String) ref;
408 } else {
409 com.google.protobuf.ByteString bs =
410 (com.google.protobuf.ByteString) ref;
411 java.lang.String s = bs.toStringUtf8();
412 if (bs.isValidUtf8()) {
413 targetName_ = s;
414 }
415 return s;
416 }
417 }
426 @java.lang.Override
427 public com.google.protobuf.ByteString
429 java.lang.Object ref = targetName_;
430 if (ref instanceof java.lang.String) {
431 com.google.protobuf.ByteString b =
432 com.google.protobuf.ByteString.copyFromUtf8(
433 (java.lang.String) ref);
434 targetName_ = b;
435 return b;
436 } else {
437 return (com.google.protobuf.ByteString) ref;
438 }
439 }
440
441 public static final int PAYLOAD_KEY_FIELD_NUMBER = 4;
442 @SuppressWarnings("serial")
443 private volatile java.lang.Object payloadKey_ = "";
453 @java.lang.Override
454 public boolean hasPayloadKey() {
455 return ((bitField0_ & 0x00000008) != 0);
456 }
466 @java.lang.Override
467 public java.lang.String getPayloadKey() {
468 java.lang.Object ref = payloadKey_;
469 if (ref instanceof java.lang.String) {
470 return (java.lang.String) ref;
471 } else {
472 com.google.protobuf.ByteString bs =
473 (com.google.protobuf.ByteString) ref;
474 java.lang.String s = bs.toStringUtf8();
475 if (bs.isValidUtf8()) {
476 payloadKey_ = s;
477 }
478 return s;
479 }
480 }
490 @java.lang.Override
491 public com.google.protobuf.ByteString
493 java.lang.Object ref = payloadKey_;
494 if (ref instanceof java.lang.String) {
495 com.google.protobuf.ByteString b =
496 com.google.protobuf.ByteString.copyFromUtf8(
497 (java.lang.String) ref);
498 payloadKey_ = b;
499 return b;
500 } else {
501 return (com.google.protobuf.ByteString) ref;
502 }
503 }
504
505 public static final int PAYLOAD_VALUE_FIELD_NUMBER = 5;
506 @SuppressWarnings("serial")
507 private volatile java.lang.Object payloadValue_ = "";
512 @java.lang.Override
513 public boolean hasPayloadValue() {
514 return ((bitField0_ & 0x00000010) != 0);
515 }
520 @java.lang.Override
521 public java.lang.String getPayloadValue() {
522 java.lang.Object ref = payloadValue_;
523 if (ref instanceof java.lang.String) {
524 return (java.lang.String) ref;
525 } else {
526 com.google.protobuf.ByteString bs =
527 (com.google.protobuf.ByteString) ref;
528 java.lang.String s = bs.toStringUtf8();
529 if (bs.isValidUtf8()) {
530 payloadValue_ = s;
531 }
532 return s;
533 }
534 }
539 @java.lang.Override
540 public com.google.protobuf.ByteString
542 java.lang.Object ref = payloadValue_;
543 if (ref instanceof java.lang.String) {
544 com.google.protobuf.ByteString b =
545 com.google.protobuf.ByteString.copyFromUtf8(
546 (java.lang.String) ref);
547 payloadValue_ = b;
548 return b;
549 } else {
550 return (com.google.protobuf.ByteString) ref;
551 }
552 }
553
554 private byte memoizedIsInitialized = -1;
555 @java.lang.Override
556 public final boolean isInitialized() {
557 byte isInitialized = memoizedIsInitialized;
558 if (isInitialized == 1) return true;
559 if (isInitialized == 0) return false;
560
561 memoizedIsInitialized = 1;
562 return true;
563 }
564
565 @java.lang.Override
566 public void writeTo(com.google.protobuf.CodedOutputStream output)
567 throws java.io.IOException {
568 if (((bitField0_ & 0x00000001) != 0)) {
569 output.writeEnum(1, targetType_);
570 }
571 if (((bitField0_ & 0x00000002) != 0)) {
572 output.writeInt32(2, targetIndex_);
573 }
574 if (((bitField0_ & 0x00000004) != 0)) {
575 com.google.protobuf.GeneratedMessage.writeString(output, 3, targetName_);
576 }
577 if (((bitField0_ & 0x00000008) != 0)) {
578 com.google.protobuf.GeneratedMessage.writeString(output, 4, payloadKey_);
579 }
580 if (((bitField0_ & 0x00000010) != 0)) {
581 com.google.protobuf.GeneratedMessage.writeString(output, 5, payloadValue_);
582 }
583 getUnknownFields().writeTo(output);
584 }
585
586 @java.lang.Override
587 public int getSerializedSize() {
588 int size = memoizedSize;
589 if (size != -1) return size;
590
591 size = 0;
592 if (((bitField0_ & 0x00000001) != 0)) {
593 size += com.google.protobuf.CodedOutputStream
594 .computeEnumSize(1, targetType_);
595 }
596 if (((bitField0_ & 0x00000002) != 0)) {
597 size += com.google.protobuf.CodedOutputStream
598 .computeInt32Size(2, targetIndex_);
599 }
600 if (((bitField0_ & 0x00000004) != 0)) {
601 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetName_);
602 }
603 if (((bitField0_ & 0x00000008) != 0)) {
604 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, payloadKey_);
605 }
606 if (((bitField0_ & 0x00000010) != 0)) {
607 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, payloadValue_);
608 }
609 size += getUnknownFields().getSerializedSize();
610 memoizedSize = size;
611 return size;
612 }
613
614 @java.lang.Override
615 public boolean equals(final java.lang.Object obj) {
616 if (obj == this) {
617 return true;
618 }
619 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto.Annotation)) {
620 return super.equals(obj);
621 }
622 com.google.ortools.linearsolver.MPModelProto.Annotation other = (com.google.ortools.linearsolver.MPModelProto.Annotation) obj;
623
624 if (hasTargetType() != other.hasTargetType()) return false;
625 if (hasTargetType()) {
626 if (targetType_ != other.targetType_) return false;
627 }
628 if (hasTargetIndex() != other.hasTargetIndex()) return false;
629 if (hasTargetIndex()) {
630 if (getTargetIndex()
631 != other.getTargetIndex()) return false;
632 }
633 if (hasTargetName() != other.hasTargetName()) return false;
634 if (hasTargetName()) {
635 if (!getTargetName()
636 .equals(other.getTargetName())) return false;
637 }
638 if (hasPayloadKey() != other.hasPayloadKey()) return false;
639 if (hasPayloadKey()) {
640 if (!getPayloadKey()
641 .equals(other.getPayloadKey())) return false;
642 }
643 if (hasPayloadValue() != other.hasPayloadValue()) return false;
644 if (hasPayloadValue()) {
645 if (!getPayloadValue()
646 .equals(other.getPayloadValue())) return false;
647 }
648 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
649 return true;
650 }
651
652 @java.lang.Override
653 public int hashCode() {
654 if (memoizedHashCode != 0) {
655 return memoizedHashCode;
656 }
657 int hash = 41;
658 hash = (19 * hash) + getDescriptor().hashCode();
659 if (hasTargetType()) {
660 hash = (37 * hash) + TARGET_TYPE_FIELD_NUMBER;
661 hash = (53 * hash) + targetType_;
662 }
663 if (hasTargetIndex()) {
664 hash = (37 * hash) + TARGET_INDEX_FIELD_NUMBER;
665 hash = (53 * hash) + getTargetIndex();
666 }
667 if (hasTargetName()) {
668 hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER;
669 hash = (53 * hash) + getTargetName().hashCode();
670 }
671 if (hasPayloadKey()) {
672 hash = (37 * hash) + PAYLOAD_KEY_FIELD_NUMBER;
673 hash = (53 * hash) + getPayloadKey().hashCode();
674 }
675 if (hasPayloadValue()) {
676 hash = (37 * hash) + PAYLOAD_VALUE_FIELD_NUMBER;
677 hash = (53 * hash) + getPayloadValue().hashCode();
678 }
679 hash = (29 * hash) + getUnknownFields().hashCode();
680 memoizedHashCode = hash;
681 return hash;
682 }
683
685 java.nio.ByteBuffer data)
686 throws com.google.protobuf.InvalidProtocolBufferException {
687 return PARSER.parseFrom(data);
688 }
690 java.nio.ByteBuffer data,
691 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692 throws com.google.protobuf.InvalidProtocolBufferException {
693 return PARSER.parseFrom(data, extensionRegistry);
694 }
696 com.google.protobuf.ByteString data)
697 throws com.google.protobuf.InvalidProtocolBufferException {
698 return PARSER.parseFrom(data);
699 }
701 com.google.protobuf.ByteString data,
702 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
703 throws com.google.protobuf.InvalidProtocolBufferException {
704 return PARSER.parseFrom(data, extensionRegistry);
705 }
707 throws com.google.protobuf.InvalidProtocolBufferException {
708 return PARSER.parseFrom(data);
709 }
711 byte[] data,
712 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
713 throws com.google.protobuf.InvalidProtocolBufferException {
714 return PARSER.parseFrom(data, extensionRegistry);
715 }
717 throws java.io.IOException {
718 return com.google.protobuf.GeneratedMessage
719 .parseWithIOException(PARSER, input);
720 }
722 java.io.InputStream input,
723 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
724 throws java.io.IOException {
725 return com.google.protobuf.GeneratedMessage
726 .parseWithIOException(PARSER, input, extensionRegistry);
727 }
728
730 throws java.io.IOException {
731 return com.google.protobuf.GeneratedMessage
732 .parseDelimitedWithIOException(PARSER, input);
733 }
734
736 java.io.InputStream input,
737 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
738 throws java.io.IOException {
739 return com.google.protobuf.GeneratedMessage
740 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
741 }
743 com.google.protobuf.CodedInputStream input)
744 throws java.io.IOException {
745 return com.google.protobuf.GeneratedMessage
746 .parseWithIOException(PARSER, input);
747 }
749 com.google.protobuf.CodedInputStream input,
750 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
751 throws java.io.IOException {
752 return com.google.protobuf.GeneratedMessage
753 .parseWithIOException(PARSER, input, extensionRegistry);
754 }
755
756 @java.lang.Override
757 public Builder newBuilderForType() { return newBuilder(); }
758 public static Builder newBuilder() {
759 return DEFAULT_INSTANCE.toBuilder();
760 }
761 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto.Annotation prototype) {
762 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
763 }
764 @java.lang.Override
766 return this == DEFAULT_INSTANCE
767 ? new Builder() : new Builder().mergeFrom(this);
768 }
769
770 @java.lang.Override
772 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
773 Builder builder = new Builder(parent);
774 return builder;
775 }
784 public static final class Builder extends
785 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
786 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto.Annotation)
787 com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder {
788 public static final com.google.protobuf.Descriptors.Descriptor
790 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
791 }
792
793 @java.lang.Override
794 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
796 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
797 .ensureFieldAccessorsInitialized(
798 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
799 }
800
801 // Construct using com.google.ortools.linearsolver.MPModelProto.Annotation.newBuilder()
802 private Builder() {
803
804 }
805
806 private Builder(
807 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
808 super(parent);
809
810 }
811 @java.lang.Override
812 public Builder clear() {
813 super.clear();
814 bitField0_ = 0;
815 targetType_ = 0;
816 targetIndex_ = 0;
817 targetName_ = "";
818 payloadKey_ = "";
819 payloadValue_ = "";
820 return this;
821 }
822
823 @java.lang.Override
824 public com.google.protobuf.Descriptors.Descriptor
826 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
827 }
828
829 @java.lang.Override
831 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance();
832 }
833
834 @java.lang.Override
837 if (!result.isInitialized()) {
838 throw newUninitializedMessageException(result);
839 }
840 return result;
841 }
842
843 @java.lang.Override
845 com.google.ortools.linearsolver.MPModelProto.Annotation result = new com.google.ortools.linearsolver.MPModelProto.Annotation(this);
846 if (bitField0_ != 0) { buildPartial0(result); }
847 onBuilt();
848 return result;
849 }
850
851 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto.Annotation result) {
852 int from_bitField0_ = bitField0_;
853 int to_bitField0_ = 0;
854 if (((from_bitField0_ & 0x00000001) != 0)) {
855 result.targetType_ = targetType_;
856 to_bitField0_ |= 0x00000001;
857 }
858 if (((from_bitField0_ & 0x00000002) != 0)) {
859 result.targetIndex_ = targetIndex_;
860 to_bitField0_ |= 0x00000002;
861 }
862 if (((from_bitField0_ & 0x00000004) != 0)) {
863 result.targetName_ = targetName_;
864 to_bitField0_ |= 0x00000004;
865 }
866 if (((from_bitField0_ & 0x00000008) != 0)) {
867 result.payloadKey_ = payloadKey_;
868 to_bitField0_ |= 0x00000008;
869 }
870 if (((from_bitField0_ & 0x00000010) != 0)) {
871 result.payloadValue_ = payloadValue_;
872 to_bitField0_ |= 0x00000010;
873 }
874 result.bitField0_ |= to_bitField0_;
875 }
876
877 @java.lang.Override
878 public Builder mergeFrom(com.google.protobuf.Message other) {
879 if (other instanceof com.google.ortools.linearsolver.MPModelProto.Annotation) {
880 return mergeFrom((com.google.ortools.linearsolver.MPModelProto.Annotation)other);
881 } else {
882 super.mergeFrom(other);
883 return this;
884 }
885 }
886
887 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto.Annotation other) {
888 if (other == com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance()) return this;
889 if (other.hasTargetType()) {
890 setTargetType(other.getTargetType());
891 }
892 if (other.hasTargetIndex()) {
893 setTargetIndex(other.getTargetIndex());
894 }
895 if (other.hasTargetName()) {
896 targetName_ = other.targetName_;
897 bitField0_ |= 0x00000004;
898 onChanged();
899 }
900 if (other.hasPayloadKey()) {
901 payloadKey_ = other.payloadKey_;
902 bitField0_ |= 0x00000008;
903 onChanged();
904 }
905 if (other.hasPayloadValue()) {
906 payloadValue_ = other.payloadValue_;
907 bitField0_ |= 0x00000010;
908 onChanged();
909 }
910 this.mergeUnknownFields(other.getUnknownFields());
911 onChanged();
912 return this;
913 }
914
915 @java.lang.Override
916 public final boolean isInitialized() {
917 return true;
918 }
919
920 @java.lang.Override
922 com.google.protobuf.CodedInputStream input,
923 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
924 throws java.io.IOException {
925 if (extensionRegistry == null) {
926 throw new java.lang.NullPointerException();
927 }
928 try {
929 boolean done = false;
930 while (!done) {
931 int tag = input.readTag();
932 switch (tag) {
933 case 0:
934 done = true;
935 break;
936 case 8: {
937 int tmpRaw = input.readEnum();
939 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(tmpRaw);
940 if (tmpValue == null) {
941 mergeUnknownVarintField(1, tmpRaw);
942 } else {
943 targetType_ = tmpRaw;
944 bitField0_ |= 0x00000001;
945 }
946 break;
947 } // case 8
948 case 16: {
949 targetIndex_ = input.readInt32();
950 bitField0_ |= 0x00000002;
951 break;
952 } // case 16
953 case 26: {
954 targetName_ = input.readBytes();
955 bitField0_ |= 0x00000004;
956 break;
957 } // case 26
958 case 34: {
959 payloadKey_ = input.readBytes();
960 bitField0_ |= 0x00000008;
961 break;
962 } // case 34
963 case 42: {
964 payloadValue_ = input.readBytes();
965 bitField0_ |= 0x00000010;
966 break;
967 } // case 42
968 default: {
969 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
970 done = true; // was an endgroup tag
971 }
972 break;
973 } // default:
974 } // switch (tag)
975 } // while (!done)
976 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
977 throw e.unwrapIOException();
978 } finally {
979 onChanged();
980 } // finally
981 return this;
982 }
983 private int bitField0_;
984
985 private int targetType_ = 0;
990 @java.lang.Override public boolean hasTargetType() {
991 return ((bitField0_ & 0x00000001) != 0);
992 }
997 @java.lang.Override
999 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
1000 return result == null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
1001 }
1007 public Builder setTargetType(com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType value) {
1008 if (value == null) {
1009 throw new NullPointerException();
1010 }
1011 bitField0_ |= 0x00000001;
1012 targetType_ = value.getNumber();
1013 onChanged();
1014 return this;
1015 }
1021 bitField0_ = (bitField0_ & ~0x00000001);
1022 targetType_ = 0;
1023 onChanged();
1024 return this;
1025 }
1026
1027 private int targetIndex_ ;
1037 @java.lang.Override
1038 public boolean hasTargetIndex() {
1039 return ((bitField0_ & 0x00000002) != 0);
1040 }
1050 @java.lang.Override
1051 public int getTargetIndex() {
1052 return targetIndex_;
1053 }
1064 public Builder setTargetIndex(int value) {
1065
1066 targetIndex_ = value;
1067 bitField0_ |= 0x00000002;
1068 onChanged();
1069 return this;
1070 }
1081 bitField0_ = (bitField0_ & ~0x00000002);
1082 targetIndex_ = 0;
1083 onChanged();
1084 return this;
1085 }
1086
1087 private java.lang.Object targetName_ = "";
1096 public boolean hasTargetName() {
1097 return ((bitField0_ & 0x00000004) != 0);
1098 }
1107 public java.lang.String getTargetName() {
1108 java.lang.Object ref = targetName_;
1109 if (!(ref instanceof java.lang.String)) {
1110 com.google.protobuf.ByteString bs =
1111 (com.google.protobuf.ByteString) ref;
1112 java.lang.String s = bs.toStringUtf8();
1113 if (bs.isValidUtf8()) {
1114 targetName_ = s;
1115 }
1116 return s;
1117 } else {
1118 return (java.lang.String) ref;
1119 }
1120 }
1129 public com.google.protobuf.ByteString
1131 java.lang.Object ref = targetName_;
1132 if (ref instanceof String) {
1133 com.google.protobuf.ByteString b =
1134 com.google.protobuf.ByteString.copyFromUtf8(
1135 (java.lang.String) ref);
1136 targetName_ = b;
1137 return b;
1138 } else {
1139 return (com.google.protobuf.ByteString) ref;
1140 }
1141 }
1152 java.lang.String value) {
1153 if (value == null) { throw new NullPointerException(); }
1154 targetName_ = value;
1155 bitField0_ |= 0x00000004;
1156 onChanged();
1157 return this;
1158 }
1168 targetName_ = getDefaultInstance().getTargetName();
1169 bitField0_ = (bitField0_ & ~0x00000004);
1170 onChanged();
1171 return this;
1172 }
1183 com.google.protobuf.ByteString value) {
1184 if (value == null) { throw new NullPointerException(); }
1185 targetName_ = value;
1186 bitField0_ |= 0x00000004;
1187 onChanged();
1188 return this;
1189 }
1190
1191 private java.lang.Object payloadKey_ = "";
1201 public boolean hasPayloadKey() {
1202 return ((bitField0_ & 0x00000008) != 0);
1203 }
1213 public java.lang.String getPayloadKey() {
1214 java.lang.Object ref = payloadKey_;
1215 if (!(ref instanceof java.lang.String)) {
1216 com.google.protobuf.ByteString bs =
1217 (com.google.protobuf.ByteString) ref;
1218 java.lang.String s = bs.toStringUtf8();
1219 if (bs.isValidUtf8()) {
1220 payloadKey_ = s;
1221 }
1222 return s;
1223 } else {
1224 return (java.lang.String) ref;
1225 }
1226 }
1236 public com.google.protobuf.ByteString
1238 java.lang.Object ref = payloadKey_;
1239 if (ref instanceof String) {
1240 com.google.protobuf.ByteString b =
1241 com.google.protobuf.ByteString.copyFromUtf8(
1242 (java.lang.String) ref);
1243 payloadKey_ = b;
1244 return b;
1245 } else {
1246 return (com.google.protobuf.ByteString) ref;
1247 }
1248 }
1260 java.lang.String value) {
1261 if (value == null) { throw new NullPointerException(); }
1262 payloadKey_ = value;
1263 bitField0_ |= 0x00000008;
1264 onChanged();
1265 return this;
1266 }
1277 payloadKey_ = getDefaultInstance().getPayloadKey();
1278 bitField0_ = (bitField0_ & ~0x00000008);
1279 onChanged();
1280 return this;
1281 }
1293 com.google.protobuf.ByteString value) {
1294 if (value == null) { throw new NullPointerException(); }
1295 payloadKey_ = value;
1296 bitField0_ |= 0x00000008;
1297 onChanged();
1298 return this;
1299 }
1300
1301 private java.lang.Object payloadValue_ = "";
1306 public boolean hasPayloadValue() {
1307 return ((bitField0_ & 0x00000010) != 0);
1308 }
1313 public java.lang.String getPayloadValue() {
1314 java.lang.Object ref = payloadValue_;
1315 if (!(ref instanceof java.lang.String)) {
1316 com.google.protobuf.ByteString bs =
1317 (com.google.protobuf.ByteString) ref;
1318 java.lang.String s = bs.toStringUtf8();
1319 if (bs.isValidUtf8()) {
1320 payloadValue_ = s;
1321 }
1322 return s;
1323 } else {
1324 return (java.lang.String) ref;
1325 }
1326 }
1331 public com.google.protobuf.ByteString
1333 java.lang.Object ref = payloadValue_;
1334 if (ref instanceof String) {
1335 com.google.protobuf.ByteString b =
1336 com.google.protobuf.ByteString.copyFromUtf8(
1337 (java.lang.String) ref);
1338 payloadValue_ = b;
1339 return b;
1340 } else {
1341 return (com.google.protobuf.ByteString) ref;
1342 }
1343 }
1350 java.lang.String value) {
1351 if (value == null) { throw new NullPointerException(); }
1352 payloadValue_ = value;
1353 bitField0_ |= 0x00000010;
1354 onChanged();
1355 return this;
1356 }
1362 payloadValue_ = getDefaultInstance().getPayloadValue();
1363 bitField0_ = (bitField0_ & ~0x00000010);
1364 onChanged();
1365 return this;
1366 }
1373 com.google.protobuf.ByteString value) {
1374 if (value == null) { throw new NullPointerException(); }
1375 payloadValue_ = value;
1376 bitField0_ |= 0x00000010;
1377 onChanged();
1378 return this;
1379 }
1380
1381 // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto.Annotation)
1382 }
1383
1384 // @@protoc_insertion_point(class_scope:operations_research.MPModelProto.Annotation)
1385 private static final com.google.ortools.linearsolver.MPModelProto.Annotation DEFAULT_INSTANCE;
1386 static {
1387 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto.Annotation();
1388 }
1389
1391 return DEFAULT_INSTANCE;
1392 }
1393
1394 private static final com.google.protobuf.Parser<Annotation>
1395 PARSER = new com.google.protobuf.AbstractParser<Annotation>() {
1396 @java.lang.Override
1397 public Annotation parsePartialFrom(
1398 com.google.protobuf.CodedInputStream input,
1399 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1400 throws com.google.protobuf.InvalidProtocolBufferException {
1401 Builder builder = newBuilder();
1402 try {
1403 builder.mergeFrom(input, extensionRegistry);
1404 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1405 throw e.setUnfinishedMessage(builder.buildPartial());
1406 } catch (com.google.protobuf.UninitializedMessageException e) {
1407 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1408 } catch (java.io.IOException e) {
1409 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1410 .setUnfinishedMessage(builder.buildPartial());
1411 }
1412 return builder.buildPartial();
1413 }
1414 };
1415
1416 public static com.google.protobuf.Parser<Annotation> parser() {
1417 return PARSER;
1418 }
1419
1420 @java.lang.Override
1421 public com.google.protobuf.Parser<Annotation> getParserForType() {
1422 return PARSER;
1423 }
1424
1425 @java.lang.Override
1427 return DEFAULT_INSTANCE;
1428 }
1429
1430 }
1431
1432 private int bitField0_;
1433 public static final int VARIABLE_FIELD_NUMBER = 3;
1434 @SuppressWarnings("serial")
1435 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_;
1443 @java.lang.Override
1444 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
1445 return variable_;
1446 }
1454 @java.lang.Override
1455 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1457 return variable_;
1458 }
1466 @java.lang.Override
1467 public int getVariableCount() {
1468 return variable_.size();
1469 }
1477 @java.lang.Override
1479 return variable_.get(index);
1480 }
1488 @java.lang.Override
1490 int index) {
1491 return variable_.get(index);
1492 }
1493
1494 public static final int CONSTRAINT_FIELD_NUMBER = 4;
1495 @SuppressWarnings("serial")
1496 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_;
1504 @java.lang.Override
1505 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
1506 return constraint_;
1507 }
1515 @java.lang.Override
1516 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1518 return constraint_;
1519 }
1527 @java.lang.Override
1528 public int getConstraintCount() {
1529 return constraint_.size();
1530 }
1538 @java.lang.Override
1540 return constraint_.get(index);
1541 }
1549 @java.lang.Override
1551 int index) {
1552 return constraint_.get(index);
1553 }
1554
1555 public static final int GENERAL_CONSTRAINT_FIELD_NUMBER = 7;
1556 @SuppressWarnings("serial")
1557 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_;
1566 @java.lang.Override
1567 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
1568 return generalConstraint_;
1569 }
1578 @java.lang.Override
1579 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
1581 return generalConstraint_;
1582 }
1591 @java.lang.Override
1593 return generalConstraint_.size();
1594 }
1603 @java.lang.Override
1605 return generalConstraint_.get(index);
1606 }
1615 @java.lang.Override
1617 int index) {
1618 return generalConstraint_.get(index);
1619 }
1620
1621 public static final int MAXIMIZE_FIELD_NUMBER = 1;
1622 private boolean maximize_ = false;
1631 @java.lang.Override
1632 public boolean hasMaximize() {
1633 return ((bitField0_ & 0x00000001) != 0);
1634 }
1643 @java.lang.Override
1644 public boolean getMaximize() {
1645 return maximize_;
1646 }
1647
1648 public static final int OBJECTIVE_OFFSET_FIELD_NUMBER = 2;
1649 private double objectiveOffset_ = 0D;
1658 @java.lang.Override
1659 public boolean hasObjectiveOffset() {
1660 return ((bitField0_ & 0x00000002) != 0);
1661 }
1670 @java.lang.Override
1671 public double getObjectiveOffset() {
1672 return objectiveOffset_;
1673 }
1674
1675 public static final int QUADRATIC_OBJECTIVE_FIELD_NUMBER = 8;
1676 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
1686 @java.lang.Override
1687 public boolean hasQuadraticObjective() {
1688 return ((bitField0_ & 0x00000004) != 0);
1689 }
1699 @java.lang.Override
1701 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1702 }
1711 @java.lang.Override
1713 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1714 }
1715
1716 public static final int NAME_FIELD_NUMBER = 5;
1717 @SuppressWarnings("serial")
1718 private volatile java.lang.Object name_ = "";
1727 @java.lang.Override
1728 public boolean hasName() {
1729 return ((bitField0_ & 0x00000008) != 0);
1730 }
1739 @java.lang.Override
1740 public java.lang.String getName() {
1741 java.lang.Object ref = name_;
1742 if (ref instanceof java.lang.String) {
1743 return (java.lang.String) ref;
1744 } else {
1745 com.google.protobuf.ByteString bs =
1746 (com.google.protobuf.ByteString) ref;
1747 java.lang.String s = bs.toStringUtf8();
1748 if (bs.isValidUtf8()) {
1749 name_ = s;
1750 }
1751 return s;
1752 }
1753 }
1762 @java.lang.Override
1763 public com.google.protobuf.ByteString
1765 java.lang.Object ref = name_;
1766 if (ref instanceof java.lang.String) {
1767 com.google.protobuf.ByteString b =
1768 com.google.protobuf.ByteString.copyFromUtf8(
1769 (java.lang.String) ref);
1770 name_ = b;
1771 return b;
1772 } else {
1773 return (com.google.protobuf.ByteString) ref;
1774 }
1775 }
1776
1777 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
1797 @java.lang.Override
1798 public boolean hasSolutionHint() {
1799 return ((bitField0_ & 0x00000010) != 0);
1800 }
1819 @java.lang.Override
1821 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1822 }
1840 @java.lang.Override
1842 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1843 }
1844
1845 public static final int ANNOTATION_FIELD_NUMBER = 9;
1846 @SuppressWarnings("serial")
1847 private java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> annotation_;
1851 @java.lang.Override
1852 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> getAnnotationList() {
1853 return annotation_;
1854 }
1858 @java.lang.Override
1859 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
1861 return annotation_;
1862 }
1866 @java.lang.Override
1867 public int getAnnotationCount() {
1868 return annotation_.size();
1869 }
1873 @java.lang.Override
1875 return annotation_.get(index);
1876 }
1880 @java.lang.Override
1882 int index) {
1883 return annotation_.get(index);
1884 }
1885
1886 private byte memoizedIsInitialized = -1;
1887 @java.lang.Override
1888 public final boolean isInitialized() {
1889 byte isInitialized = memoizedIsInitialized;
1890 if (isInitialized == 1) return true;
1891 if (isInitialized == 0) return false;
1892
1893 memoizedIsInitialized = 1;
1894 return true;
1895 }
1896
1897 @java.lang.Override
1898 public void writeTo(com.google.protobuf.CodedOutputStream output)
1899 throws java.io.IOException {
1900 if (((bitField0_ & 0x00000001) != 0)) {
1901 output.writeBool(1, maximize_);
1902 }
1903 if (((bitField0_ & 0x00000002) != 0)) {
1904 output.writeDouble(2, objectiveOffset_);
1905 }
1906 for (int i = 0; i < variable_.size(); i++) {
1907 output.writeMessage(3, variable_.get(i));
1908 }
1909 for (int i = 0; i < constraint_.size(); i++) {
1910 output.writeMessage(4, constraint_.get(i));
1911 }
1912 if (((bitField0_ & 0x00000008) != 0)) {
1913 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
1914 }
1915 if (((bitField0_ & 0x00000010) != 0)) {
1916 output.writeMessage(6, getSolutionHint());
1917 }
1918 for (int i = 0; i < generalConstraint_.size(); i++) {
1919 output.writeMessage(7, generalConstraint_.get(i));
1920 }
1921 if (((bitField0_ & 0x00000004) != 0)) {
1922 output.writeMessage(8, getQuadraticObjective());
1923 }
1924 for (int i = 0; i < annotation_.size(); i++) {
1925 output.writeMessage(9, annotation_.get(i));
1926 }
1927 getUnknownFields().writeTo(output);
1928 }
1929
1930 @java.lang.Override
1931 public int getSerializedSize() {
1932 int size = memoizedSize;
1933 if (size != -1) return size;
1934
1935 size = 0;
1936 if (((bitField0_ & 0x00000001) != 0)) {
1937 size += com.google.protobuf.CodedOutputStream
1938 .computeBoolSize(1, maximize_);
1939 }
1940 if (((bitField0_ & 0x00000002) != 0)) {
1941 size += com.google.protobuf.CodedOutputStream
1942 .computeDoubleSize(2, objectiveOffset_);
1943 }
1944 for (int i = 0; i < variable_.size(); i++) {
1945 size += com.google.protobuf.CodedOutputStream
1946 .computeMessageSize(3, variable_.get(i));
1947 }
1948 for (int i = 0; i < constraint_.size(); i++) {
1949 size += com.google.protobuf.CodedOutputStream
1950 .computeMessageSize(4, constraint_.get(i));
1951 }
1952 if (((bitField0_ & 0x00000008) != 0)) {
1953 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
1954 }
1955 if (((bitField0_ & 0x00000010) != 0)) {
1956 size += com.google.protobuf.CodedOutputStream
1957 .computeMessageSize(6, getSolutionHint());
1958 }
1959 for (int i = 0; i < generalConstraint_.size(); i++) {
1960 size += com.google.protobuf.CodedOutputStream
1961 .computeMessageSize(7, generalConstraint_.get(i));
1962 }
1963 if (((bitField0_ & 0x00000004) != 0)) {
1964 size += com.google.protobuf.CodedOutputStream
1965 .computeMessageSize(8, getQuadraticObjective());
1966 }
1967 for (int i = 0; i < annotation_.size(); i++) {
1968 size += com.google.protobuf.CodedOutputStream
1969 .computeMessageSize(9, annotation_.get(i));
1970 }
1971 size += getUnknownFields().getSerializedSize();
1972 memoizedSize = size;
1973 return size;
1974 }
1975
1976 @java.lang.Override
1977 public boolean equals(final java.lang.Object obj) {
1978 if (obj == this) {
1979 return true;
1980 }
1981 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto)) {
1982 return super.equals(obj);
1983 }
1984 com.google.ortools.linearsolver.MPModelProto other = (com.google.ortools.linearsolver.MPModelProto) obj;
1985
1986 if (!getVariableList()
1987 .equals(other.getVariableList())) return false;
1988 if (!getConstraintList()
1989 .equals(other.getConstraintList())) return false;
1991 .equals(other.getGeneralConstraintList())) return false;
1992 if (hasMaximize() != other.hasMaximize()) return false;
1993 if (hasMaximize()) {
1994 if (getMaximize()
1995 != other.getMaximize()) return false;
1996 }
1997 if (hasObjectiveOffset() != other.hasObjectiveOffset()) return false;
1998 if (hasObjectiveOffset()) {
1999 if (java.lang.Double.doubleToLongBits(getObjectiveOffset())
2000 != java.lang.Double.doubleToLongBits(
2001 other.getObjectiveOffset())) return false;
2002 }
2003 if (hasQuadraticObjective() != other.hasQuadraticObjective()) return false;
2004 if (hasQuadraticObjective()) {
2006 .equals(other.getQuadraticObjective())) return false;
2007 }
2008 if (hasName() != other.hasName()) return false;
2009 if (hasName()) {
2010 if (!getName()
2011 .equals(other.getName())) return false;
2012 }
2013 if (hasSolutionHint() != other.hasSolutionHint()) return false;
2014 if (hasSolutionHint()) {
2015 if (!getSolutionHint()
2016 .equals(other.getSolutionHint())) return false;
2017 }
2018 if (!getAnnotationList()
2019 .equals(other.getAnnotationList())) return false;
2020 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2021 return true;
2022 }
2023
2024 @java.lang.Override
2025 public int hashCode() {
2026 if (memoizedHashCode != 0) {
2027 return memoizedHashCode;
2028 }
2029 int hash = 41;
2030 hash = (19 * hash) + getDescriptor().hashCode();
2031 if (getVariableCount() > 0) {
2032 hash = (37 * hash) + VARIABLE_FIELD_NUMBER;
2033 hash = (53 * hash) + getVariableList().hashCode();
2034 }
2035 if (getConstraintCount() > 0) {
2036 hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER;
2037 hash = (53 * hash) + getConstraintList().hashCode();
2038 }
2039 if (getGeneralConstraintCount() > 0) {
2040 hash = (37 * hash) + GENERAL_CONSTRAINT_FIELD_NUMBER;
2041 hash = (53 * hash) + getGeneralConstraintList().hashCode();
2042 }
2043 if (hasMaximize()) {
2044 hash = (37 * hash) + MAXIMIZE_FIELD_NUMBER;
2045 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
2046 getMaximize());
2047 }
2048 if (hasObjectiveOffset()) {
2049 hash = (37 * hash) + OBJECTIVE_OFFSET_FIELD_NUMBER;
2050 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2051 java.lang.Double.doubleToLongBits(getObjectiveOffset()));
2052 }
2053 if (hasQuadraticObjective()) {
2054 hash = (37 * hash) + QUADRATIC_OBJECTIVE_FIELD_NUMBER;
2055 hash = (53 * hash) + getQuadraticObjective().hashCode();
2056 }
2057 if (hasName()) {
2058 hash = (37 * hash) + NAME_FIELD_NUMBER;
2059 hash = (53 * hash) + getName().hashCode();
2060 }
2061 if (hasSolutionHint()) {
2062 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
2063 hash = (53 * hash) + getSolutionHint().hashCode();
2064 }
2065 if (getAnnotationCount() > 0) {
2066 hash = (37 * hash) + ANNOTATION_FIELD_NUMBER;
2067 hash = (53 * hash) + getAnnotationList().hashCode();
2068 }
2069 hash = (29 * hash) + getUnknownFields().hashCode();
2070 memoizedHashCode = hash;
2071 return hash;
2072 }
2073
2075 java.nio.ByteBuffer data)
2076 throws com.google.protobuf.InvalidProtocolBufferException {
2077 return PARSER.parseFrom(data);
2078 }
2080 java.nio.ByteBuffer data,
2081 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2082 throws com.google.protobuf.InvalidProtocolBufferException {
2083 return PARSER.parseFrom(data, extensionRegistry);
2084 }
2086 com.google.protobuf.ByteString data)
2087 throws com.google.protobuf.InvalidProtocolBufferException {
2088 return PARSER.parseFrom(data);
2089 }
2091 com.google.protobuf.ByteString data,
2092 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2093 throws com.google.protobuf.InvalidProtocolBufferException {
2094 return PARSER.parseFrom(data, extensionRegistry);
2095 }
2097 throws com.google.protobuf.InvalidProtocolBufferException {
2098 return PARSER.parseFrom(data);
2099 }
2101 byte[] data,
2102 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2103 throws com.google.protobuf.InvalidProtocolBufferException {
2104 return PARSER.parseFrom(data, extensionRegistry);
2105 }
2106 public static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
2107 throws java.io.IOException {
2108 return com.google.protobuf.GeneratedMessage
2109 .parseWithIOException(PARSER, input);
2110 }
2112 java.io.InputStream input,
2113 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2114 throws java.io.IOException {
2115 return com.google.protobuf.GeneratedMessage
2116 .parseWithIOException(PARSER, input, extensionRegistry);
2117 }
2118
2120 throws java.io.IOException {
2121 return com.google.protobuf.GeneratedMessage
2122 .parseDelimitedWithIOException(PARSER, input);
2123 }
2124
2126 java.io.InputStream input,
2127 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2128 throws java.io.IOException {
2129 return com.google.protobuf.GeneratedMessage
2130 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
2131 }
2133 com.google.protobuf.CodedInputStream input)
2134 throws java.io.IOException {
2135 return com.google.protobuf.GeneratedMessage
2136 .parseWithIOException(PARSER, input);
2137 }
2139 com.google.protobuf.CodedInputStream input,
2140 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2141 throws java.io.IOException {
2142 return com.google.protobuf.GeneratedMessage
2143 .parseWithIOException(PARSER, input, extensionRegistry);
2144 }
2145
2146 @java.lang.Override
2147 public Builder newBuilderForType() { return newBuilder(); }
2148 public static Builder newBuilder() {
2149 return DEFAULT_INSTANCE.toBuilder();
2150 }
2151 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype) {
2152 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2153 }
2154 @java.lang.Override
2156 return this == DEFAULT_INSTANCE
2157 ? new Builder() : new Builder().mergeFrom(this);
2158 }
2159
2160 @java.lang.Override
2162 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2163 Builder builder = new Builder(parent);
2164 return builder;
2165 }
2173 public static final class Builder extends
2174 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
2175 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto)
2176 com.google.ortools.linearsolver.MPModelProtoOrBuilder {
2177 public static final com.google.protobuf.Descriptors.Descriptor
2179 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2180 }
2181
2182 @java.lang.Override
2183 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2185 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
2186 .ensureFieldAccessorsInitialized(
2187 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
2188 }
2189
2190 // Construct using com.google.ortools.linearsolver.MPModelProto.newBuilder()
2191 private Builder() {
2192 maybeForceBuilderInitialization();
2193 }
2194
2195 private Builder(
2196 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2197 super(parent);
2198 maybeForceBuilderInitialization();
2199 }
2200 private void maybeForceBuilderInitialization() {
2201 if (com.google.protobuf.GeneratedMessage
2202 .alwaysUseFieldBuilders) {
2203 getVariableFieldBuilder();
2204 getConstraintFieldBuilder();
2205 getGeneralConstraintFieldBuilder();
2206 getQuadraticObjectiveFieldBuilder();
2207 getSolutionHintFieldBuilder();
2208 getAnnotationFieldBuilder();
2209 }
2210 }
2211 @java.lang.Override
2212 public Builder clear() {
2213 super.clear();
2214 bitField0_ = 0;
2215 if (variableBuilder_ == null) {
2216 variable_ = java.util.Collections.emptyList();
2217 } else {
2218 variable_ = null;
2219 variableBuilder_.clear();
2220 }
2221 bitField0_ = (bitField0_ & ~0x00000001);
2222 if (constraintBuilder_ == null) {
2223 constraint_ = java.util.Collections.emptyList();
2224 } else {
2225 constraint_ = null;
2226 constraintBuilder_.clear();
2227 }
2228 bitField0_ = (bitField0_ & ~0x00000002);
2229 if (generalConstraintBuilder_ == null) {
2230 generalConstraint_ = java.util.Collections.emptyList();
2231 } else {
2232 generalConstraint_ = null;
2233 generalConstraintBuilder_.clear();
2234 }
2235 bitField0_ = (bitField0_ & ~0x00000004);
2236 maximize_ = false;
2237 objectiveOffset_ = 0D;
2238 quadraticObjective_ = null;
2239 if (quadraticObjectiveBuilder_ != null) {
2240 quadraticObjectiveBuilder_.dispose();
2241 quadraticObjectiveBuilder_ = null;
2242 }
2243 name_ = "";
2244 solutionHint_ = null;
2245 if (solutionHintBuilder_ != null) {
2246 solutionHintBuilder_.dispose();
2247 solutionHintBuilder_ = null;
2248 }
2249 if (annotationBuilder_ == null) {
2250 annotation_ = java.util.Collections.emptyList();
2251 } else {
2252 annotation_ = null;
2253 annotationBuilder_.clear();
2254 }
2255 bitField0_ = (bitField0_ & ~0x00000100);
2256 return this;
2257 }
2258
2259 @java.lang.Override
2260 public com.google.protobuf.Descriptors.Descriptor
2262 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2263 }
2264
2265 @java.lang.Override
2267 return com.google.ortools.linearsolver.MPModelProto.getDefaultInstance();
2268 }
2269
2270 @java.lang.Override
2273 if (!result.isInitialized()) {
2274 throw newUninitializedMessageException(result);
2275 }
2276 return result;
2277 }
2278
2279 @java.lang.Override
2281 com.google.ortools.linearsolver.MPModelProto result = new com.google.ortools.linearsolver.MPModelProto(this);
2282 buildPartialRepeatedFields(result);
2283 if (bitField0_ != 0) { buildPartial0(result); }
2284 onBuilt();
2285 return result;
2286 }
2287
2288 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPModelProto result) {
2289 if (variableBuilder_ == null) {
2290 if (((bitField0_ & 0x00000001) != 0)) {
2291 variable_ = java.util.Collections.unmodifiableList(variable_);
2292 bitField0_ = (bitField0_ & ~0x00000001);
2293 }
2294 result.variable_ = variable_;
2295 } else {
2296 result.variable_ = variableBuilder_.build();
2297 }
2298 if (constraintBuilder_ == null) {
2299 if (((bitField0_ & 0x00000002) != 0)) {
2300 constraint_ = java.util.Collections.unmodifiableList(constraint_);
2301 bitField0_ = (bitField0_ & ~0x00000002);
2302 }
2303 result.constraint_ = constraint_;
2304 } else {
2305 result.constraint_ = constraintBuilder_.build();
2306 }
2307 if (generalConstraintBuilder_ == null) {
2308 if (((bitField0_ & 0x00000004) != 0)) {
2309 generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
2310 bitField0_ = (bitField0_ & ~0x00000004);
2311 }
2312 result.generalConstraint_ = generalConstraint_;
2313 } else {
2314 result.generalConstraint_ = generalConstraintBuilder_.build();
2315 }
2316 if (annotationBuilder_ == null) {
2317 if (((bitField0_ & 0x00000100) != 0)) {
2318 annotation_ = java.util.Collections.unmodifiableList(annotation_);
2319 bitField0_ = (bitField0_ & ~0x00000100);
2320 }
2321 result.annotation_ = annotation_;
2322 } else {
2323 result.annotation_ = annotationBuilder_.build();
2324 }
2325 }
2326
2327 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto result) {
2328 int from_bitField0_ = bitField0_;
2329 int to_bitField0_ = 0;
2330 if (((from_bitField0_ & 0x00000008) != 0)) {
2331 result.maximize_ = maximize_;
2332 to_bitField0_ |= 0x00000001;
2333 }
2334 if (((from_bitField0_ & 0x00000010) != 0)) {
2335 result.objectiveOffset_ = objectiveOffset_;
2336 to_bitField0_ |= 0x00000002;
2337 }
2338 if (((from_bitField0_ & 0x00000020) != 0)) {
2339 result.quadraticObjective_ = quadraticObjectiveBuilder_ == null
2340 ? quadraticObjective_
2341 : quadraticObjectiveBuilder_.build();
2342 to_bitField0_ |= 0x00000004;
2343 }
2344 if (((from_bitField0_ & 0x00000040) != 0)) {
2345 result.name_ = name_;
2346 to_bitField0_ |= 0x00000008;
2347 }
2348 if (((from_bitField0_ & 0x00000080) != 0)) {
2349 result.solutionHint_ = solutionHintBuilder_ == null
2350 ? solutionHint_
2351 : solutionHintBuilder_.build();
2352 to_bitField0_ |= 0x00000010;
2353 }
2354 result.bitField0_ |= to_bitField0_;
2355 }
2356
2357 @java.lang.Override
2358 public Builder mergeFrom(com.google.protobuf.Message other) {
2359 if (other instanceof com.google.ortools.linearsolver.MPModelProto) {
2360 return mergeFrom((com.google.ortools.linearsolver.MPModelProto)other);
2361 } else {
2362 super.mergeFrom(other);
2363 return this;
2364 }
2365 }
2366
2367 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other) {
2368 if (other == com.google.ortools.linearsolver.MPModelProto.getDefaultInstance()) return this;
2369 if (variableBuilder_ == null) {
2370 if (!other.variable_.isEmpty()) {
2371 if (variable_.isEmpty()) {
2372 variable_ = other.variable_;
2373 bitField0_ = (bitField0_ & ~0x00000001);
2374 } else {
2375 ensureVariableIsMutable();
2376 variable_.addAll(other.variable_);
2377 }
2378 onChanged();
2379 }
2380 } else {
2381 if (!other.variable_.isEmpty()) {
2382 if (variableBuilder_.isEmpty()) {
2383 variableBuilder_.dispose();
2384 variableBuilder_ = null;
2385 variable_ = other.variable_;
2386 bitField0_ = (bitField0_ & ~0x00000001);
2387 variableBuilder_ =
2388 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2389 getVariableFieldBuilder() : null;
2390 } else {
2391 variableBuilder_.addAllMessages(other.variable_);
2392 }
2393 }
2394 }
2395 if (constraintBuilder_ == null) {
2396 if (!other.constraint_.isEmpty()) {
2397 if (constraint_.isEmpty()) {
2398 constraint_ = other.constraint_;
2399 bitField0_ = (bitField0_ & ~0x00000002);
2400 } else {
2401 ensureConstraintIsMutable();
2402 constraint_.addAll(other.constraint_);
2403 }
2404 onChanged();
2405 }
2406 } else {
2407 if (!other.constraint_.isEmpty()) {
2408 if (constraintBuilder_.isEmpty()) {
2409 constraintBuilder_.dispose();
2410 constraintBuilder_ = null;
2411 constraint_ = other.constraint_;
2412 bitField0_ = (bitField0_ & ~0x00000002);
2413 constraintBuilder_ =
2414 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2415 getConstraintFieldBuilder() : null;
2416 } else {
2417 constraintBuilder_.addAllMessages(other.constraint_);
2418 }
2419 }
2420 }
2421 if (generalConstraintBuilder_ == null) {
2422 if (!other.generalConstraint_.isEmpty()) {
2423 if (generalConstraint_.isEmpty()) {
2424 generalConstraint_ = other.generalConstraint_;
2425 bitField0_ = (bitField0_ & ~0x00000004);
2426 } else {
2427 ensureGeneralConstraintIsMutable();
2428 generalConstraint_.addAll(other.generalConstraint_);
2429 }
2430 onChanged();
2431 }
2432 } else {
2433 if (!other.generalConstraint_.isEmpty()) {
2434 if (generalConstraintBuilder_.isEmpty()) {
2435 generalConstraintBuilder_.dispose();
2436 generalConstraintBuilder_ = null;
2437 generalConstraint_ = other.generalConstraint_;
2438 bitField0_ = (bitField0_ & ~0x00000004);
2439 generalConstraintBuilder_ =
2440 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2441 getGeneralConstraintFieldBuilder() : null;
2442 } else {
2443 generalConstraintBuilder_.addAllMessages(other.generalConstraint_);
2444 }
2445 }
2446 }
2447 if (other.hasMaximize()) {
2448 setMaximize(other.getMaximize());
2449 }
2450 if (other.hasObjectiveOffset()) {
2451 setObjectiveOffset(other.getObjectiveOffset());
2452 }
2453 if (other.hasQuadraticObjective()) {
2454 mergeQuadraticObjective(other.getQuadraticObjective());
2455 }
2456 if (other.hasName()) {
2457 name_ = other.name_;
2458 bitField0_ |= 0x00000040;
2459 onChanged();
2460 }
2461 if (other.hasSolutionHint()) {
2462 mergeSolutionHint(other.getSolutionHint());
2463 }
2464 if (annotationBuilder_ == null) {
2465 if (!other.annotation_.isEmpty()) {
2466 if (annotation_.isEmpty()) {
2467 annotation_ = other.annotation_;
2468 bitField0_ = (bitField0_ & ~0x00000100);
2469 } else {
2470 ensureAnnotationIsMutable();
2471 annotation_.addAll(other.annotation_);
2472 }
2473 onChanged();
2474 }
2475 } else {
2476 if (!other.annotation_.isEmpty()) {
2477 if (annotationBuilder_.isEmpty()) {
2478 annotationBuilder_.dispose();
2479 annotationBuilder_ = null;
2480 annotation_ = other.annotation_;
2481 bitField0_ = (bitField0_ & ~0x00000100);
2482 annotationBuilder_ =
2483 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2484 getAnnotationFieldBuilder() : null;
2485 } else {
2486 annotationBuilder_.addAllMessages(other.annotation_);
2487 }
2488 }
2489 }
2490 this.mergeUnknownFields(other.getUnknownFields());
2491 onChanged();
2492 return this;
2493 }
2494
2495 @java.lang.Override
2496 public final boolean isInitialized() {
2497 return true;
2498 }
2499
2500 @java.lang.Override
2502 com.google.protobuf.CodedInputStream input,
2503 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2504 throws java.io.IOException {
2505 if (extensionRegistry == null) {
2506 throw new java.lang.NullPointerException();
2507 }
2508 try {
2509 boolean done = false;
2510 while (!done) {
2511 int tag = input.readTag();
2512 switch (tag) {
2513 case 0:
2514 done = true;
2515 break;
2516 case 8: {
2517 maximize_ = input.readBool();
2518 bitField0_ |= 0x00000008;
2519 break;
2520 } // case 8
2521 case 17: {
2522 objectiveOffset_ = input.readDouble();
2523 bitField0_ |= 0x00000010;
2524 break;
2525 } // case 17
2526 case 26: {
2528 input.readMessage(
2529 com.google.ortools.linearsolver.MPVariableProto.parser(),
2530 extensionRegistry);
2531 if (variableBuilder_ == null) {
2532 ensureVariableIsMutable();
2533 variable_.add(m);
2534 } else {
2535 variableBuilder_.addMessage(m);
2536 }
2537 break;
2538 } // case 26
2539 case 34: {
2541 input.readMessage(
2542 com.google.ortools.linearsolver.MPConstraintProto.parser(),
2543 extensionRegistry);
2544 if (constraintBuilder_ == null) {
2545 ensureConstraintIsMutable();
2546 constraint_.add(m);
2547 } else {
2548 constraintBuilder_.addMessage(m);
2549 }
2550 break;
2551 } // case 34
2552 case 42: {
2553 name_ = input.readBytes();
2554 bitField0_ |= 0x00000040;
2555 break;
2556 } // case 42
2557 case 50: {
2558 input.readMessage(
2559 getSolutionHintFieldBuilder().getBuilder(),
2560 extensionRegistry);
2561 bitField0_ |= 0x00000080;
2562 break;
2563 } // case 50
2564 case 58: {
2566 input.readMessage(
2567 com.google.ortools.linearsolver.MPGeneralConstraintProto.parser(),
2568 extensionRegistry);
2569 if (generalConstraintBuilder_ == null) {
2570 ensureGeneralConstraintIsMutable();
2571 generalConstraint_.add(m);
2572 } else {
2573 generalConstraintBuilder_.addMessage(m);
2574 }
2575 break;
2576 } // case 58
2577 case 66: {
2578 input.readMessage(
2579 getQuadraticObjectiveFieldBuilder().getBuilder(),
2580 extensionRegistry);
2581 bitField0_ |= 0x00000020;
2582 break;
2583 } // case 66
2584 case 74: {
2586 input.readMessage(
2587 com.google.ortools.linearsolver.MPModelProto.Annotation.parser(),
2588 extensionRegistry);
2589 if (annotationBuilder_ == null) {
2590 ensureAnnotationIsMutable();
2591 annotation_.add(m);
2592 } else {
2593 annotationBuilder_.addMessage(m);
2594 }
2595 break;
2596 } // case 74
2597 default: {
2598 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2599 done = true; // was an endgroup tag
2600 }
2601 break;
2602 } // default:
2603 } // switch (tag)
2604 } // while (!done)
2605 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2606 throw e.unwrapIOException();
2607 } finally {
2608 onChanged();
2609 } // finally
2610 return this;
2611 }
2612 private int bitField0_;
2613
2614 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_ =
2615 java.util.Collections.emptyList();
2616 private void ensureVariableIsMutable() {
2617 if (!((bitField0_ & 0x00000001) != 0)) {
2618 variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>(variable_);
2619 bitField0_ |= 0x00000001;
2620 }
2621 }
2622
2623 private com.google.protobuf.RepeatedFieldBuilder<
2624 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> variableBuilder_;
2625
2633 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
2634 if (variableBuilder_ == null) {
2635 return java.util.Collections.unmodifiableList(variable_);
2636 } else {
2637 return variableBuilder_.getMessageList();
2638 }
2639 }
2647 public int getVariableCount() {
2648 if (variableBuilder_ == null) {
2649 return variable_.size();
2650 } else {
2651 return variableBuilder_.getCount();
2652 }
2653 }
2662 if (variableBuilder_ == null) {
2663 return variable_.get(index);
2664 } else {
2665 return variableBuilder_.getMessage(index);
2666 }
2667 }
2676 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2677 if (variableBuilder_ == null) {
2678 if (value == null) {
2679 throw new NullPointerException();
2680 }
2681 ensureVariableIsMutable();
2682 variable_.set(index, value);
2683 onChanged();
2684 } else {
2685 variableBuilder_.setMessage(index, value);
2686 }
2687 return this;
2688 }
2697 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2698 if (variableBuilder_ == null) {
2699 ensureVariableIsMutable();
2700 variable_.set(index, builderForValue.build());
2701 onChanged();
2702 } else {
2703 variableBuilder_.setMessage(index, builderForValue.build());
2704 }
2705 return this;
2706 }
2714 public Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value) {
2715 if (variableBuilder_ == null) {
2716 if (value == null) {
2717 throw new NullPointerException();
2718 }
2719 ensureVariableIsMutable();
2720 variable_.add(value);
2721 onChanged();
2722 } else {
2723 variableBuilder_.addMessage(value);
2724 }
2725 return this;
2726 }
2735 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2736 if (variableBuilder_ == null) {
2737 if (value == null) {
2738 throw new NullPointerException();
2739 }
2740 ensureVariableIsMutable();
2741 variable_.add(index, value);
2742 onChanged();
2743 } else {
2744 variableBuilder_.addMessage(index, value);
2745 }
2746 return this;
2747 }
2756 com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2757 if (variableBuilder_ == null) {
2758 ensureVariableIsMutable();
2759 variable_.add(builderForValue.build());
2760 onChanged();
2761 } else {
2762 variableBuilder_.addMessage(builderForValue.build());
2763 }
2764 return this;
2765 }
2774 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2775 if (variableBuilder_ == null) {
2776 ensureVariableIsMutable();
2777 variable_.add(index, builderForValue.build());
2778 onChanged();
2779 } else {
2780 variableBuilder_.addMessage(index, builderForValue.build());
2781 }
2782 return this;
2783 }
2792 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto> values) {
2793 if (variableBuilder_ == null) {
2794 ensureVariableIsMutable();
2795 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2796 values, variable_);
2797 onChanged();
2798 } else {
2799 variableBuilder_.addAllMessages(values);
2800 }
2801 return this;
2802 }
2811 if (variableBuilder_ == null) {
2812 variable_ = java.util.Collections.emptyList();
2813 bitField0_ = (bitField0_ & ~0x00000001);
2814 onChanged();
2815 } else {
2816 variableBuilder_.clear();
2817 }
2818 return this;
2819 }
2827 public Builder removeVariable(int index) {
2828 if (variableBuilder_ == null) {
2829 ensureVariableIsMutable();
2830 variable_.remove(index);
2831 onChanged();
2832 } else {
2833 variableBuilder_.remove(index);
2834 }
2835 return this;
2836 }
2845 int index) {
2846 return getVariableFieldBuilder().getBuilder(index);
2847 }
2856 int index) {
2857 if (variableBuilder_ == null) {
2858 return variable_.get(index); } else {
2859 return variableBuilder_.getMessageOrBuilder(index);
2860 }
2861 }
2869 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2871 if (variableBuilder_ != null) {
2872 return variableBuilder_.getMessageOrBuilderList();
2873 } else {
2874 return java.util.Collections.unmodifiableList(variable_);
2875 }
2876 }
2885 return getVariableFieldBuilder().addBuilder(
2886 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2887 }
2896 int index) {
2897 return getVariableFieldBuilder().addBuilder(
2898 index, com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2899 }
2907 public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
2909 return getVariableFieldBuilder().getBuilderList();
2910 }
2911 private com.google.protobuf.RepeatedFieldBuilder<
2912 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2913 getVariableFieldBuilder() {
2914 if (variableBuilder_ == null) {
2915 variableBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2916 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>(
2917 variable_,
2918 ((bitField0_ & 0x00000001) != 0),
2919 getParentForChildren(),
2920 isClean());
2921 variable_ = null;
2922 }
2923 return variableBuilder_;
2924 }
2925
2926 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_ =
2927 java.util.Collections.emptyList();
2928 private void ensureConstraintIsMutable() {
2929 if (!((bitField0_ & 0x00000002) != 0)) {
2930 constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>(constraint_);
2931 bitField0_ |= 0x00000002;
2932 }
2933 }
2934
2935 private com.google.protobuf.RepeatedFieldBuilder<
2936 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
2937
2945 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
2946 if (constraintBuilder_ == null) {
2947 return java.util.Collections.unmodifiableList(constraint_);
2948 } else {
2949 return constraintBuilder_.getMessageList();
2950 }
2951 }
2959 public int getConstraintCount() {
2960 if (constraintBuilder_ == null) {
2961 return constraint_.size();
2962 } else {
2963 return constraintBuilder_.getCount();
2964 }
2965 }
2974 if (constraintBuilder_ == null) {
2975 return constraint_.get(index);
2976 } else {
2977 return constraintBuilder_.getMessage(index);
2978 }
2979 }
2988 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
2989 if (constraintBuilder_ == null) {
2990 if (value == null) {
2991 throw new NullPointerException();
2992 }
2993 ensureConstraintIsMutable();
2994 constraint_.set(index, value);
2995 onChanged();
2996 } else {
2997 constraintBuilder_.setMessage(index, value);
2998 }
2999 return this;
3000 }
3009 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3010 if (constraintBuilder_ == null) {
3011 ensureConstraintIsMutable();
3012 constraint_.set(index, builderForValue.build());
3013 onChanged();
3014 } else {
3015 constraintBuilder_.setMessage(index, builderForValue.build());
3016 }
3017 return this;
3018 }
3026 public Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value) {
3027 if (constraintBuilder_ == null) {
3028 if (value == null) {
3029 throw new NullPointerException();
3030 }
3031 ensureConstraintIsMutable();
3032 constraint_.add(value);
3033 onChanged();
3034 } else {
3035 constraintBuilder_.addMessage(value);
3036 }
3037 return this;
3038 }
3047 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
3048 if (constraintBuilder_ == null) {
3049 if (value == null) {
3050 throw new NullPointerException();
3051 }
3052 ensureConstraintIsMutable();
3053 constraint_.add(index, value);
3054 onChanged();
3055 } else {
3056 constraintBuilder_.addMessage(index, value);
3057 }
3058 return this;
3059 }
3068 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3069 if (constraintBuilder_ == null) {
3070 ensureConstraintIsMutable();
3071 constraint_.add(builderForValue.build());
3072 onChanged();
3073 } else {
3074 constraintBuilder_.addMessage(builderForValue.build());
3075 }
3076 return this;
3077 }
3086 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3087 if (constraintBuilder_ == null) {
3088 ensureConstraintIsMutable();
3089 constraint_.add(index, builderForValue.build());
3090 onChanged();
3091 } else {
3092 constraintBuilder_.addMessage(index, builderForValue.build());
3093 }
3094 return this;
3095 }
3104 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto> values) {
3105 if (constraintBuilder_ == null) {
3106 ensureConstraintIsMutable();
3107 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3108 values, constraint_);
3109 onChanged();
3110 } else {
3111 constraintBuilder_.addAllMessages(values);
3112 }
3113 return this;
3114 }
3123 if (constraintBuilder_ == null) {
3124 constraint_ = java.util.Collections.emptyList();
3125 bitField0_ = (bitField0_ & ~0x00000002);
3126 onChanged();
3127 } else {
3128 constraintBuilder_.clear();
3129 }
3130 return this;
3131 }
3139 public Builder removeConstraint(int index) {
3140 if (constraintBuilder_ == null) {
3141 ensureConstraintIsMutable();
3142 constraint_.remove(index);
3143 onChanged();
3144 } else {
3145 constraintBuilder_.remove(index);
3146 }
3147 return this;
3148 }
3157 int index) {
3158 return getConstraintFieldBuilder().getBuilder(index);
3159 }
3168 int index) {
3169 if (constraintBuilder_ == null) {
3170 return constraint_.get(index); } else {
3171 return constraintBuilder_.getMessageOrBuilder(index);
3172 }
3173 }
3181 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3183 if (constraintBuilder_ != null) {
3184 return constraintBuilder_.getMessageOrBuilderList();
3185 } else {
3186 return java.util.Collections.unmodifiableList(constraint_);
3187 }
3188 }
3197 return getConstraintFieldBuilder().addBuilder(
3198 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3199 }
3208 int index) {
3209 return getConstraintFieldBuilder().addBuilder(
3210 index, com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3211 }
3219 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
3221 return getConstraintFieldBuilder().getBuilderList();
3222 }
3223 private com.google.protobuf.RepeatedFieldBuilder<
3224 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3225 getConstraintFieldBuilder() {
3226 if (constraintBuilder_ == null) {
3227 constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
3228 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
3229 constraint_,
3230 ((bitField0_ & 0x00000002) != 0),
3231 getParentForChildren(),
3232 isClean());
3233 constraint_ = null;
3234 }
3235 return constraintBuilder_;
3236 }
3237
3238 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_ =
3239 java.util.Collections.emptyList();
3240 private void ensureGeneralConstraintIsMutable() {
3241 if (!((bitField0_ & 0x00000004) != 0)) {
3242 generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>(generalConstraint_);
3243 bitField0_ |= 0x00000004;
3244 }
3245 }
3246
3247 private com.google.protobuf.RepeatedFieldBuilder<
3248 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> generalConstraintBuilder_;
3249
3258 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
3259 if (generalConstraintBuilder_ == null) {
3260 return java.util.Collections.unmodifiableList(generalConstraint_);
3261 } else {
3262 return generalConstraintBuilder_.getMessageList();
3263 }
3264 }
3274 if (generalConstraintBuilder_ == null) {
3275 return generalConstraint_.size();
3276 } else {
3277 return generalConstraintBuilder_.getCount();
3278 }
3279 }
3289 if (generalConstraintBuilder_ == null) {
3290 return generalConstraint_.get(index);
3291 } else {
3292 return generalConstraintBuilder_.getMessage(index);
3293 }
3294 }
3304 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3305 if (generalConstraintBuilder_ == null) {
3306 if (value == null) {
3307 throw new NullPointerException();
3308 }
3309 ensureGeneralConstraintIsMutable();
3310 generalConstraint_.set(index, value);
3311 onChanged();
3312 } else {
3313 generalConstraintBuilder_.setMessage(index, value);
3314 }
3315 return this;
3316 }
3326 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3327 if (generalConstraintBuilder_ == null) {
3328 ensureGeneralConstraintIsMutable();
3329 generalConstraint_.set(index, builderForValue.build());
3330 onChanged();
3331 } else {
3332 generalConstraintBuilder_.setMessage(index, builderForValue.build());
3333 }
3334 return this;
3335 }
3344 public Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3345 if (generalConstraintBuilder_ == null) {
3346 if (value == null) {
3347 throw new NullPointerException();
3348 }
3349 ensureGeneralConstraintIsMutable();
3350 generalConstraint_.add(value);
3351 onChanged();
3352 } else {
3353 generalConstraintBuilder_.addMessage(value);
3354 }
3355 return this;
3356 }
3366 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3367 if (generalConstraintBuilder_ == null) {
3368 if (value == null) {
3369 throw new NullPointerException();
3370 }
3371 ensureGeneralConstraintIsMutable();
3372 generalConstraint_.add(index, value);
3373 onChanged();
3374 } else {
3375 generalConstraintBuilder_.addMessage(index, value);
3376 }
3377 return this;
3378 }
3388 com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3389 if (generalConstraintBuilder_ == null) {
3390 ensureGeneralConstraintIsMutable();
3391 generalConstraint_.add(builderForValue.build());
3392 onChanged();
3393 } else {
3394 generalConstraintBuilder_.addMessage(builderForValue.build());
3395 }
3396 return this;
3397 }
3407 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3408 if (generalConstraintBuilder_ == null) {
3409 ensureGeneralConstraintIsMutable();
3410 generalConstraint_.add(index, builderForValue.build());
3411 onChanged();
3412 } else {
3413 generalConstraintBuilder_.addMessage(index, builderForValue.build());
3414 }
3415 return this;
3416 }
3426 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto> values) {
3427 if (generalConstraintBuilder_ == null) {
3428 ensureGeneralConstraintIsMutable();
3429 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3430 values, generalConstraint_);
3431 onChanged();
3432 } else {
3433 generalConstraintBuilder_.addAllMessages(values);
3434 }
3435 return this;
3436 }
3446 if (generalConstraintBuilder_ == null) {
3447 generalConstraint_ = java.util.Collections.emptyList();
3448 bitField0_ = (bitField0_ & ~0x00000004);
3449 onChanged();
3450 } else {
3451 generalConstraintBuilder_.clear();
3452 }
3453 return this;
3454 }
3464 if (generalConstraintBuilder_ == null) {
3465 ensureGeneralConstraintIsMutable();
3466 generalConstraint_.remove(index);
3467 onChanged();
3468 } else {
3469 generalConstraintBuilder_.remove(index);
3470 }
3471 return this;
3472 }
3482 int index) {
3483 return getGeneralConstraintFieldBuilder().getBuilder(index);
3484 }
3494 int index) {
3495 if (generalConstraintBuilder_ == null) {
3496 return generalConstraint_.get(index); } else {
3497 return generalConstraintBuilder_.getMessageOrBuilder(index);
3498 }
3499 }
3508 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3510 if (generalConstraintBuilder_ != null) {
3511 return generalConstraintBuilder_.getMessageOrBuilderList();
3512 } else {
3513 return java.util.Collections.unmodifiableList(generalConstraint_);
3514 }
3515 }
3525 return getGeneralConstraintFieldBuilder().addBuilder(
3526 com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3527 }
3537 int index) {
3538 return getGeneralConstraintFieldBuilder().addBuilder(
3539 index, com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3540 }
3549 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder>
3551 return getGeneralConstraintFieldBuilder().getBuilderList();
3552 }
3553 private com.google.protobuf.RepeatedFieldBuilder<
3554 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3555 getGeneralConstraintFieldBuilder() {
3556 if (generalConstraintBuilder_ == null) {
3557 generalConstraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
3558 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>(
3559 generalConstraint_,
3560 ((bitField0_ & 0x00000004) != 0),
3561 getParentForChildren(),
3562 isClean());
3563 generalConstraint_ = null;
3564 }
3565 return generalConstraintBuilder_;
3566 }
3567
3568 private boolean maximize_ ;
3577 @java.lang.Override
3578 public boolean hasMaximize() {
3579 return ((bitField0_ & 0x00000008) != 0);
3580 }
3589 @java.lang.Override
3590 public boolean getMaximize() {
3591 return maximize_;
3592 }
3602 public Builder setMaximize(boolean value) {
3603
3604 maximize_ = value;
3605 bitField0_ |= 0x00000008;
3606 onChanged();
3607 return this;
3608 }
3618 bitField0_ = (bitField0_ & ~0x00000008);
3619 maximize_ = false;
3620 onChanged();
3621 return this;
3622 }
3623
3624 private double objectiveOffset_ ;
3633 @java.lang.Override
3634 public boolean hasObjectiveOffset() {
3635 return ((bitField0_ & 0x00000010) != 0);
3636 }
3645 @java.lang.Override
3646 public double getObjectiveOffset() {
3647 return objectiveOffset_;
3648 }
3658 public Builder setObjectiveOffset(double value) {
3659
3660 objectiveOffset_ = value;
3661 bitField0_ |= 0x00000010;
3662 onChanged();
3663 return this;
3664 }
3674 bitField0_ = (bitField0_ & ~0x00000010);
3675 objectiveOffset_ = 0D;
3676 onChanged();
3677 return this;
3678 }
3679
3680 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
3681 private com.google.protobuf.SingleFieldBuilder<
3682 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder> quadraticObjectiveBuilder_;
3692 public boolean hasQuadraticObjective() {
3693 return ((bitField0_ & 0x00000020) != 0);
3694 }
3705 if (quadraticObjectiveBuilder_ == null) {
3706 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3707 } else {
3708 return quadraticObjectiveBuilder_.getMessage();
3709 }
3710 }
3719 public Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
3720 if (quadraticObjectiveBuilder_ == null) {
3721 if (value == null) {
3722 throw new NullPointerException();
3723 }
3724 quadraticObjective_ = value;
3725 } else {
3726 quadraticObjectiveBuilder_.setMessage(value);
3727 }
3728 bitField0_ |= 0x00000020;
3729 onChanged();
3730 return this;
3731 }
3741 com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue) {
3742 if (quadraticObjectiveBuilder_ == null) {
3743 quadraticObjective_ = builderForValue.build();
3744 } else {
3745 quadraticObjectiveBuilder_.setMessage(builderForValue.build());
3746 }
3747 bitField0_ |= 0x00000020;
3748 onChanged();
3749 return this;
3750 }
3759 public Builder mergeQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
3760 if (quadraticObjectiveBuilder_ == null) {
3761 if (((bitField0_ & 0x00000020) != 0) &&
3762 quadraticObjective_ != null &&
3763 quadraticObjective_ != com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance()) {
3764 getQuadraticObjectiveBuilder().mergeFrom(value);
3765 } else {
3766 quadraticObjective_ = value;
3767 }
3768 } else {
3769 quadraticObjectiveBuilder_.mergeFrom(value);
3770 }
3771 if (quadraticObjective_ != null) {
3772 bitField0_ |= 0x00000020;
3773 onChanged();
3774 }
3775 return this;
3776 }
3786 bitField0_ = (bitField0_ & ~0x00000020);
3787 quadraticObjective_ = null;
3788 if (quadraticObjectiveBuilder_ != null) {
3789 quadraticObjectiveBuilder_.dispose();
3790 quadraticObjectiveBuilder_ = null;
3791 }
3792 onChanged();
3793 return this;
3794 }
3804 bitField0_ |= 0x00000020;
3805 onChanged();
3806 return getQuadraticObjectiveFieldBuilder().getBuilder();
3807 }
3817 if (quadraticObjectiveBuilder_ != null) {
3818 return quadraticObjectiveBuilder_.getMessageOrBuilder();
3819 } else {
3820 return quadraticObjective_ == null ?
3821 com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3822 }
3823 }
3832 private com.google.protobuf.SingleFieldBuilder<
3833 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>
3834 getQuadraticObjectiveFieldBuilder() {
3835 if (quadraticObjectiveBuilder_ == null) {
3836 quadraticObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3837 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>(
3839 getParentForChildren(),
3840 isClean());
3841 quadraticObjective_ = null;
3842 }
3843 return quadraticObjectiveBuilder_;
3844 }
3845
3846 private java.lang.Object name_ = "";
3855 public boolean hasName() {
3856 return ((bitField0_ & 0x00000040) != 0);
3857 }
3866 public java.lang.String getName() {
3867 java.lang.Object ref = name_;
3868 if (!(ref instanceof java.lang.String)) {
3869 com.google.protobuf.ByteString bs =
3870 (com.google.protobuf.ByteString) ref;
3871 java.lang.String s = bs.toStringUtf8();
3872 if (bs.isValidUtf8()) {
3873 name_ = s;
3874 }
3875 return s;
3876 } else {
3877 return (java.lang.String) ref;
3878 }
3879 }
3888 public com.google.protobuf.ByteString
3890 java.lang.Object ref = name_;
3891 if (ref instanceof String) {
3892 com.google.protobuf.ByteString b =
3893 com.google.protobuf.ByteString.copyFromUtf8(
3894 (java.lang.String) ref);
3895 name_ = b;
3896 return b;
3897 } else {
3898 return (com.google.protobuf.ByteString) ref;
3899 }
3900 }
3911 java.lang.String value) {
3912 if (value == null) { throw new NullPointerException(); }
3913 name_ = value;
3914 bitField0_ |= 0x00000040;
3915 onChanged();
3916 return this;
3917 }
3927 name_ = getDefaultInstance().getName();
3928 bitField0_ = (bitField0_ & ~0x00000040);
3929 onChanged();
3930 return this;
3931 }
3942 com.google.protobuf.ByteString value) {
3943 if (value == null) { throw new NullPointerException(); }
3944 name_ = value;
3945 bitField0_ |= 0x00000040;
3946 onChanged();
3947 return this;
3948 }
3949
3951 private com.google.protobuf.SingleFieldBuilder<
3952 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
3971 public boolean hasSolutionHint() {
3972 return ((bitField0_ & 0x00000080) != 0);
3973 }
3993 if (solutionHintBuilder_ == null) {
3994 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3995 } else {
3996 return solutionHintBuilder_.getMessage();
3997 }
3998 }
4016 public Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
4017 if (solutionHintBuilder_ == null) {
4018 if (value == null) {
4019 throw new NullPointerException();
4020 }
4021 solutionHint_ = value;
4022 } else {
4023 solutionHintBuilder_.setMessage(value);
4024 }
4025 bitField0_ |= 0x00000080;
4026 onChanged();
4027 return this;
4028 }
4047 com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue) {
4048 if (solutionHintBuilder_ == null) {
4049 solutionHint_ = builderForValue.build();
4050 } else {
4051 solutionHintBuilder_.setMessage(builderForValue.build());
4052 }
4053 bitField0_ |= 0x00000080;
4054 onChanged();
4055 return this;
4056 }
4074 public Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
4075 if (solutionHintBuilder_ == null) {
4076 if (((bitField0_ & 0x00000080) != 0) &&
4077 solutionHint_ != null &&
4078 solutionHint_ != com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance()) {
4079 getSolutionHintBuilder().mergeFrom(value);
4080 } else {
4081 solutionHint_ = value;
4082 }
4083 } else {
4084 solutionHintBuilder_.mergeFrom(value);
4085 }
4086 if (solutionHint_ != null) {
4087 bitField0_ |= 0x00000080;
4088 onChanged();
4089 }
4090 return this;
4091 }
4110 bitField0_ = (bitField0_ & ~0x00000080);
4111 solutionHint_ = null;
4112 if (solutionHintBuilder_ != null) {
4113 solutionHintBuilder_.dispose();
4114 solutionHintBuilder_ = null;
4115 }
4116 onChanged();
4117 return this;
4118 }
4137 bitField0_ |= 0x00000080;
4138 onChanged();
4139 return getSolutionHintFieldBuilder().getBuilder();
4140 }
4159 if (solutionHintBuilder_ != null) {
4160 return solutionHintBuilder_.getMessageOrBuilder();
4161 } else {
4162 return solutionHint_ == null ?
4163 com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
4164 }
4165 }
4183 private com.google.protobuf.SingleFieldBuilder<
4184 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>
4185 getSolutionHintFieldBuilder() {
4186 if (solutionHintBuilder_ == null) {
4187 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
4188 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>(
4190 getParentForChildren(),
4191 isClean());
4192 solutionHint_ = null;
4193 }
4194 return solutionHintBuilder_;
4195 }
4196
4197 private java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> annotation_ =
4198 java.util.Collections.emptyList();
4199 private void ensureAnnotationIsMutable() {
4200 if (!((bitField0_ & 0x00000100) != 0)) {
4201 annotation_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPModelProto.Annotation>(annotation_);
4202 bitField0_ |= 0x00000100;
4203 }
4204 }
4205
4206 private com.google.protobuf.RepeatedFieldBuilder<
4207 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder> annotationBuilder_;
4208
4212 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> getAnnotationList() {
4213 if (annotationBuilder_ == null) {
4214 return java.util.Collections.unmodifiableList(annotation_);
4215 } else {
4216 return annotationBuilder_.getMessageList();
4217 }
4218 }
4222 public int getAnnotationCount() {
4223 if (annotationBuilder_ == null) {
4224 return annotation_.size();
4225 } else {
4226 return annotationBuilder_.getCount();
4227 }
4228 }
4233 if (annotationBuilder_ == null) {
4234 return annotation_.get(index);
4235 } else {
4236 return annotationBuilder_.getMessage(index);
4237 }
4238 }
4243 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4244 if (annotationBuilder_ == null) {
4245 if (value == null) {
4246 throw new NullPointerException();
4247 }
4248 ensureAnnotationIsMutable();
4249 annotation_.set(index, value);
4250 onChanged();
4251 } else {
4252 annotationBuilder_.setMessage(index, value);
4253 }
4254 return this;
4255 }
4260 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4261 if (annotationBuilder_ == null) {
4262 ensureAnnotationIsMutable();
4263 annotation_.set(index, builderForValue.build());
4264 onChanged();
4265 } else {
4266 annotationBuilder_.setMessage(index, builderForValue.build());
4267 }
4268 return this;
4269 }
4273 public Builder addAnnotation(com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4274 if (annotationBuilder_ == null) {
4275 if (value == null) {
4276 throw new NullPointerException();
4277 }
4278 ensureAnnotationIsMutable();
4279 annotation_.add(value);
4280 onChanged();
4281 } else {
4282 annotationBuilder_.addMessage(value);
4283 }
4284 return this;
4285 }
4290 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4291 if (annotationBuilder_ == null) {
4292 if (value == null) {
4293 throw new NullPointerException();
4294 }
4295 ensureAnnotationIsMutable();
4296 annotation_.add(index, value);
4297 onChanged();
4298 } else {
4299 annotationBuilder_.addMessage(index, value);
4300 }
4301 return this;
4302 }
4307 com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4308 if (annotationBuilder_ == null) {
4309 ensureAnnotationIsMutable();
4310 annotation_.add(builderForValue.build());
4311 onChanged();
4312 } else {
4313 annotationBuilder_.addMessage(builderForValue.build());
4314 }
4315 return this;
4316 }
4321 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4322 if (annotationBuilder_ == null) {
4323 ensureAnnotationIsMutable();
4324 annotation_.add(index, builderForValue.build());
4325 onChanged();
4326 } else {
4327 annotationBuilder_.addMessage(index, builderForValue.build());
4328 }
4329 return this;
4330 }
4335 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPModelProto.Annotation> values) {
4336 if (annotationBuilder_ == null) {
4337 ensureAnnotationIsMutable();
4338 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4339 values, annotation_);
4340 onChanged();
4341 } else {
4342 annotationBuilder_.addAllMessages(values);
4343 }
4344 return this;
4345 }
4350 if (annotationBuilder_ == null) {
4351 annotation_ = java.util.Collections.emptyList();
4352 bitField0_ = (bitField0_ & ~0x00000100);
4353 onChanged();
4354 } else {
4355 annotationBuilder_.clear();
4356 }
4357 return this;
4358 }
4362 public Builder removeAnnotation(int index) {
4363 if (annotationBuilder_ == null) {
4364 ensureAnnotationIsMutable();
4365 annotation_.remove(index);
4366 onChanged();
4367 } else {
4368 annotationBuilder_.remove(index);
4369 }
4370 return this;
4371 }
4376 int index) {
4377 return getAnnotationFieldBuilder().getBuilder(index);
4378 }
4383 int index) {
4384 if (annotationBuilder_ == null) {
4385 return annotation_.get(index); } else {
4386 return annotationBuilder_.getMessageOrBuilder(index);
4387 }
4388 }
4392 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4394 if (annotationBuilder_ != null) {
4395 return annotationBuilder_.getMessageOrBuilderList();
4396 } else {
4397 return java.util.Collections.unmodifiableList(annotation_);
4398 }
4399 }
4404 return getAnnotationFieldBuilder().addBuilder(
4405 com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4406 }
4411 int index) {
4412 return getAnnotationFieldBuilder().addBuilder(
4413 index, com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4414 }
4418 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation.Builder>
4420 return getAnnotationFieldBuilder().getBuilderList();
4421 }
4422 private com.google.protobuf.RepeatedFieldBuilder<
4423 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4424 getAnnotationFieldBuilder() {
4425 if (annotationBuilder_ == null) {
4426 annotationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
4427 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>(
4428 annotation_,
4429 ((bitField0_ & 0x00000100) != 0),
4430 getParentForChildren(),
4431 isClean());
4432 annotation_ = null;
4433 }
4434 return annotationBuilder_;
4435 }
4436
4437 // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto)
4438 }
4439
4440 // @@protoc_insertion_point(class_scope:operations_research.MPModelProto)
4441 private static final com.google.ortools.linearsolver.MPModelProto DEFAULT_INSTANCE;
4442 static {
4443 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto();
4444 }
4445
4447 return DEFAULT_INSTANCE;
4448 }
4449
4450 private static final com.google.protobuf.Parser<MPModelProto>
4451 PARSER = new com.google.protobuf.AbstractParser<MPModelProto>() {
4452 @java.lang.Override
4453 public MPModelProto parsePartialFrom(
4454 com.google.protobuf.CodedInputStream input,
4455 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4456 throws com.google.protobuf.InvalidProtocolBufferException {
4457 Builder builder = newBuilder();
4458 try {
4459 builder.mergeFrom(input, extensionRegistry);
4460 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4461 throw e.setUnfinishedMessage(builder.buildPartial());
4462 } catch (com.google.protobuf.UninitializedMessageException e) {
4463 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4464 } catch (java.io.IOException e) {
4465 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4466 .setUnfinishedMessage(builder.buildPartial());
4467 }
4468 return builder.buildPartial();
4469 }
4470 };
4471
4472 public static com.google.protobuf.Parser<MPModelProto> parser() {
4473 return PARSER;
4474 }
4475
4476 @java.lang.Override
4477 public com.google.protobuf.Parser<MPModelProto> getParserForType() {
4478 return PARSER;
4479 }
4480
4481 @java.lang.Override
4483 return DEFAULT_INSTANCE;
4484 }
4485
4486}
4487
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setTargetType(com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType value)
com.google.ortools.linearsolver.MPModelProto.Annotation buildPartial()
Builder mergeFrom(com.google.protobuf.Message other)
Builder setPayloadValueBytes(com.google.protobuf.ByteString value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType getTargetType()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder setPayloadKeyBytes(com.google.protobuf.ByteString value)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto.Annotation other)
com.google.ortools.linearsolver.MPModelProto.Annotation getDefaultInstanceForType()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPModelProto.Annotation build()
Builder setTargetNameBytes(com.google.protobuf.ByteString value)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType getTargetType()
com.google.protobuf.Parser< Annotation > getParserForType()
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< Annotation > parser()
static com.google.ortools.linearsolver.MPModelProto.Annotation parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto.Annotation prototype)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPModelProto.Annotation getDefaultInstance()
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(java.nio.ByteBuffer data)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.linearsolver.MPModelProto.Annotation getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(com.google.protobuf.CodedInputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPModelProto.Annotation parseFrom(com.google.protobuf.ByteString data)
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPModelProto buildPartial()
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value)
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue)
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPModelProto build()
Builder addAllConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto > values)
Builder addAnnotation(int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue)
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
java.util.List< com.google.ortools.linearsolver.MPModelProto.Annotation.Builder > getAnnotationBuilderList()
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder(int index)
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder(int index)
com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder(int index)
java.util.List< com.google.ortools.linearsolver.MPVariableProto.Builder > getVariableBuilderList()
Builder addAnnotation(com.google.ortools.linearsolver.MPModelProto.Annotation value)
com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective()
java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder > getAnnotationOrBuilderList()
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
Builder setNameBytes(com.google.protobuf.ByteString value)
Builder setAnnotation(int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue)
Builder addAnnotation(int index, com.google.ortools.linearsolver.MPModelProto.Annotation value)
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value)
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other)
Builder addAllAnnotation(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPModelProto.Annotation > values)
Builder mergeQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value)
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder()
Builder addAllGeneralConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto > values)
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder(int index)
Builder addAnnotation(com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue)
com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder getAnnotationOrBuilder(int index)
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder()
com.google.ortools.linearsolver.MPModelProto.Annotation getAnnotation(int index)
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
Builder addAllVariable(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto > values)
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
com.google.ortools.linearsolver.PartialVariableAssignment.Builder getSolutionHintBuilder()
Builder setAnnotation(int index, com.google.ortools.linearsolver.MPModelProto.Annotation value)
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
Builder mergeFrom(com.google.protobuf.Message other)
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto.Builder > getConstraintBuilderList()
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder(int index)
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
com.google.ortools.linearsolver.MPModelProto.Annotation.Builder getAnnotationBuilder(int index)
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
java.util.List< com.google.ortools.linearsolver.MPModelProto.Annotation > getAnnotationList()
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder()
com.google.ortools.linearsolver.MPModelProto.Annotation.Builder addAnnotationBuilder(int index)
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder()
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder > getGeneralConstraintBuilderList()
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
com.google.ortools.linearsolver.MPModelProto.Annotation.Builder addAnnotationBuilder()
com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder(int index)
boolean equals(final java.lang.Object obj)
java.util.List< com.google.ortools.linearsolver.MPModelProto.Annotation > getAnnotationList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
static com.google.ortools.linearsolver.MPModelProto getDefaultInstance()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data)
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
com.google.ortools.linearsolver.MPQuadraticObjective getQuadraticObjective()
com.google.ortools.linearsolver.MPModelProto.Annotation getAnnotation(int index)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
static com.google.protobuf.Parser< MPModelProto > parser()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data)
static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype)
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input)
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder()
com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder getAnnotationOrBuilder(int index)
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder > getAnnotationOrBuilderList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.ByteString getNameBytes()
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
com.google.protobuf.Parser< MPModelProto > getParserForType()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static TargetType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< TargetType > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType getTargetType()