Google OR-Tools v9.14
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// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/linear_solver/linear_solver.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.linearsolver;
7
15@com.google.protobuf.Generated
16public final class MPModelProto extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 MPModelProto.class.getName());
29 }
30 // Use MPModelProto.newBuilder() to construct.
31 private MPModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private MPModelProto() {
35 variable_ = java.util.Collections.emptyList();
36 constraint_ = java.util.Collections.emptyList();
37 generalConstraint_ = java.util.Collections.emptyList();
38 name_ = "";
39 annotation_ = java.util.Collections.emptyList();
40 }
41
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
45 }
46
47 @java.lang.Override
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
53 }
54
55 public interface AnnotationOrBuilder extends
56 // @@protoc_insertion_point(interface_extends:operations_research.MPModelProto.Annotation)
57 com.google.protobuf.MessageOrBuilder {
58
63 boolean hasTargetType();
69
79 boolean hasTargetIndex();
90
99 boolean hasTargetName();
108 java.lang.String getTargetName();
117 com.google.protobuf.ByteString
119
129 boolean hasPayloadKey();
139 java.lang.String getPayloadKey();
149 com.google.protobuf.ByteString
151
161 java.lang.String getPayloadValue();
166 com.google.protobuf.ByteString
168 }
169
177 public static final class Annotation extends
178 com.google.protobuf.GeneratedMessage implements
179 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto.Annotation)
181 private static final long serialVersionUID = 0L;
182 static {
183 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
184 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
185 /* major= */ 4,
186 /* minor= */ 31,
187 /* patch= */ 1,
188 /* suffix= */ "",
189 Annotation.class.getName());
190 }
191 // Use Annotation.newBuilder() to construct.
192 private Annotation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
193 super(builder);
194 }
195 private Annotation() {
196 targetType_ = 0;
197 targetName_ = "";
198 payloadKey_ = "";
199 payloadValue_ = "";
200 }
201
202 public static final com.google.protobuf.Descriptors.Descriptor
204 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
205 }
206
207 @java.lang.Override
208 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
210 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
211 .ensureFieldAccessorsInitialized(
212 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
213 }
214
223 public enum TargetType
224 implements com.google.protobuf.ProtocolMessageEnum {
237 ;
238
239 static {
240 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
241 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
242 /* major= */ 4,
243 /* minor= */ 31,
244 /* patch= */ 1,
245 /* suffix= */ "",
246 TargetType.class.getName());
247 }
251 public static final int VARIABLE_DEFAULT_VALUE = 0;
255 public static final int CONSTRAINT_VALUE = 1;
259 public static final int GENERAL_CONSTRAINT_VALUE = 2;
260
261
262 public final int getNumber() {
263 return value;
264 }
265
271 @java.lang.Deprecated
272 public static TargetType valueOf(int value) {
273 return forNumber(value);
274 }
275
280 public static TargetType forNumber(int value) {
281 switch (value) {
282 case 0: return VARIABLE_DEFAULT;
283 case 1: return CONSTRAINT;
284 case 2: return GENERAL_CONSTRAINT;
285 default: return null;
286 }
287 }
288
289 public static com.google.protobuf.Internal.EnumLiteMap<TargetType>
291 return internalValueMap;
292 }
293 private static final com.google.protobuf.Internal.EnumLiteMap<
294 TargetType> internalValueMap =
295 new com.google.protobuf.Internal.EnumLiteMap<TargetType>() {
296 public TargetType findValueByNumber(int number) {
297 return TargetType.forNumber(number);
298 }
299 };
300
301 public final com.google.protobuf.Descriptors.EnumValueDescriptor
303 return getDescriptor().getValues().get(ordinal());
304 }
305 public final com.google.protobuf.Descriptors.EnumDescriptor
307 return getDescriptor();
308 }
309 public static com.google.protobuf.Descriptors.EnumDescriptor
311 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDescriptor().getEnumTypes().get(0);
312 }
313
314 private static final TargetType[] VALUES = values();
315
316 public static TargetType valueOf(
317 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
318 if (desc.getType() != getDescriptor()) {
319 throw new java.lang.IllegalArgumentException(
320 "EnumValueDescriptor is not for this type.");
321 }
322 return VALUES[desc.getIndex()];
323 }
324
325 private final int value;
326
327 private TargetType(int value) {
328 this.value = value;
329 }
330
331 // @@protoc_insertion_point(enum_scope:operations_research.MPModelProto.Annotation.TargetType)
332 }
333
334 private int bitField0_;
335 public static final int TARGET_TYPE_FIELD_NUMBER = 1;
336 private int targetType_ = 0;
341 @java.lang.Override public boolean hasTargetType() {
342 return ((bitField0_ & 0x00000001) != 0);
343 }
344
349 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
351 }
352
353 public static final int TARGET_INDEX_FIELD_NUMBER = 2;
354 private int targetIndex_ = 0;
364 @java.lang.Override
365 public boolean hasTargetIndex() {
366 return ((bitField0_ & 0x00000002) != 0);
367 }
368
377 @java.lang.Override
378 public int getTargetIndex() {
379 return targetIndex_;
380 }
381
382 public static final int TARGET_NAME_FIELD_NUMBER = 3;
383 @SuppressWarnings("serial")
384 private volatile java.lang.Object targetName_ = "";
393 @java.lang.Override
394 public boolean hasTargetName() {
395 return ((bitField0_ & 0x00000004) != 0);
396 }
397
405 @java.lang.Override
406 public java.lang.String getTargetName() {
407 java.lang.Object ref = targetName_;
408 if (ref instanceof java.lang.String) {
409 return (java.lang.String) ref;
410 } else {
411 com.google.protobuf.ByteString bs =
412 (com.google.protobuf.ByteString) ref;
413 java.lang.String s = bs.toStringUtf8();
414 if (bs.isValidUtf8()) {
415 targetName_ = s;
416 }
417 return s;
418 }
419 }
420
428 @java.lang.Override
429 public com.google.protobuf.ByteString
431 java.lang.Object ref = targetName_;
432 if (ref instanceof java.lang.String) {
433 com.google.protobuf.ByteString b =
434 com.google.protobuf.ByteString.copyFromUtf8(
435 (java.lang.String) ref);
436 targetName_ = b;
437 return b;
438 } else {
439 return (com.google.protobuf.ByteString) ref;
440 }
441 }
442
443 public static final int PAYLOAD_KEY_FIELD_NUMBER = 4;
444 @SuppressWarnings("serial")
445 private volatile java.lang.Object payloadKey_ = "";
455 @java.lang.Override
456 public boolean hasPayloadKey() {
457 return ((bitField0_ & 0x00000008) != 0);
458 }
459
468 @java.lang.Override
469 public java.lang.String getPayloadKey() {
470 java.lang.Object ref = payloadKey_;
471 if (ref instanceof java.lang.String) {
472 return (java.lang.String) ref;
473 } else {
474 com.google.protobuf.ByteString bs =
475 (com.google.protobuf.ByteString) ref;
476 java.lang.String s = bs.toStringUtf8();
477 if (bs.isValidUtf8()) {
478 payloadKey_ = s;
479 }
480 return s;
481 }
482 }
483
492 @java.lang.Override
493 public com.google.protobuf.ByteString
495 java.lang.Object ref = payloadKey_;
496 if (ref instanceof java.lang.String) {
497 com.google.protobuf.ByteString b =
498 com.google.protobuf.ByteString.copyFromUtf8(
499 (java.lang.String) ref);
500 payloadKey_ = b;
501 return b;
502 } else {
503 return (com.google.protobuf.ByteString) ref;
504 }
505 }
506
507 public static final int PAYLOAD_VALUE_FIELD_NUMBER = 5;
508 @SuppressWarnings("serial")
509 private volatile java.lang.Object payloadValue_ = "";
514 @java.lang.Override
515 public boolean hasPayloadValue() {
516 return ((bitField0_ & 0x00000010) != 0);
517 }
518
522 @java.lang.Override
523 public java.lang.String getPayloadValue() {
524 java.lang.Object ref = payloadValue_;
525 if (ref instanceof java.lang.String) {
526 return (java.lang.String) ref;
527 } else {
528 com.google.protobuf.ByteString bs =
529 (com.google.protobuf.ByteString) ref;
530 java.lang.String s = bs.toStringUtf8();
531 if (bs.isValidUtf8()) {
532 payloadValue_ = s;
533 }
534 return s;
535 }
536 }
537
541 @java.lang.Override
542 public com.google.protobuf.ByteString
544 java.lang.Object ref = payloadValue_;
545 if (ref instanceof java.lang.String) {
546 com.google.protobuf.ByteString b =
547 com.google.protobuf.ByteString.copyFromUtf8(
548 (java.lang.String) ref);
549 payloadValue_ = b;
550 return b;
551 } else {
552 return (com.google.protobuf.ByteString) ref;
553 }
554 }
555
556 private byte memoizedIsInitialized = -1;
557 @java.lang.Override
558 public final boolean isInitialized() {
559 byte isInitialized = memoizedIsInitialized;
560 if (isInitialized == 1) return true;
561 if (isInitialized == 0) return false;
562
563 memoizedIsInitialized = 1;
564 return true;
565 }
566
567 @java.lang.Override
568 public void writeTo(com.google.protobuf.CodedOutputStream output)
569 throws java.io.IOException {
570 if (((bitField0_ & 0x00000001) != 0)) {
571 output.writeEnum(1, targetType_);
572 }
573 if (((bitField0_ & 0x00000002) != 0)) {
574 output.writeInt32(2, targetIndex_);
575 }
576 if (((bitField0_ & 0x00000004) != 0)) {
577 com.google.protobuf.GeneratedMessage.writeString(output, 3, targetName_);
578 }
579 if (((bitField0_ & 0x00000008) != 0)) {
580 com.google.protobuf.GeneratedMessage.writeString(output, 4, payloadKey_);
581 }
582 if (((bitField0_ & 0x00000010) != 0)) {
583 com.google.protobuf.GeneratedMessage.writeString(output, 5, payloadValue_);
584 }
585 getUnknownFields().writeTo(output);
586 }
587
588 @java.lang.Override
589 public int getSerializedSize() {
590 int size = memoizedSize;
591 if (size != -1) return size;
592
593 size = 0;
594 if (((bitField0_ & 0x00000001) != 0)) {
595 size += com.google.protobuf.CodedOutputStream
596 .computeEnumSize(1, targetType_);
597 }
598 if (((bitField0_ & 0x00000002) != 0)) {
599 size += com.google.protobuf.CodedOutputStream
600 .computeInt32Size(2, targetIndex_);
601 }
602 if (((bitField0_ & 0x00000004) != 0)) {
603 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetName_);
604 }
605 if (((bitField0_ & 0x00000008) != 0)) {
606 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, payloadKey_);
607 }
608 if (((bitField0_ & 0x00000010) != 0)) {
609 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, payloadValue_);
610 }
611 size += getUnknownFields().getSerializedSize();
612 memoizedSize = size;
613 return size;
614 }
615
616 @java.lang.Override
617 public boolean equals(final java.lang.Object obj) {
618 if (obj == this) {
619 return true;
620 }
621 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto.Annotation)) {
622 return super.equals(obj);
623 }
624 com.google.ortools.linearsolver.MPModelProto.Annotation other = (com.google.ortools.linearsolver.MPModelProto.Annotation) obj;
625
626 if (hasTargetType() != other.hasTargetType()) return false;
627 if (hasTargetType()) {
628 if (targetType_ != other.targetType_) return false;
629 }
630 if (hasTargetIndex() != other.hasTargetIndex()) return false;
631 if (hasTargetIndex()) {
632 if (getTargetIndex()
633 != other.getTargetIndex()) return false;
634 }
635 if (hasTargetName() != other.hasTargetName()) return false;
636 if (hasTargetName()) {
637 if (!getTargetName()
638 .equals(other.getTargetName())) return false;
639 }
640 if (hasPayloadKey() != other.hasPayloadKey()) return false;
641 if (hasPayloadKey()) {
642 if (!getPayloadKey()
643 .equals(other.getPayloadKey())) return false;
644 }
645 if (hasPayloadValue() != other.hasPayloadValue()) return false;
646 if (hasPayloadValue()) {
647 if (!getPayloadValue()
648 .equals(other.getPayloadValue())) return false;
649 }
650 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
651 return true;
652 }
653
654 @java.lang.Override
655 public int hashCode() {
656 if (memoizedHashCode != 0) {
657 return memoizedHashCode;
658 }
659 int hash = 41;
660 hash = (19 * hash) + getDescriptor().hashCode();
661 if (hasTargetType()) {
662 hash = (37 * hash) + TARGET_TYPE_FIELD_NUMBER;
663 hash = (53 * hash) + targetType_;
664 }
665 if (hasTargetIndex()) {
666 hash = (37 * hash) + TARGET_INDEX_FIELD_NUMBER;
667 hash = (53 * hash) + getTargetIndex();
668 }
669 if (hasTargetName()) {
670 hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER;
671 hash = (53 * hash) + getTargetName().hashCode();
672 }
673 if (hasPayloadKey()) {
674 hash = (37 * hash) + PAYLOAD_KEY_FIELD_NUMBER;
675 hash = (53 * hash) + getPayloadKey().hashCode();
676 }
677 if (hasPayloadValue()) {
678 hash = (37 * hash) + PAYLOAD_VALUE_FIELD_NUMBER;
679 hash = (53 * hash) + getPayloadValue().hashCode();
680 }
681 hash = (29 * hash) + getUnknownFields().hashCode();
682 memoizedHashCode = hash;
683 return hash;
684 }
685
687 java.nio.ByteBuffer data)
688 throws com.google.protobuf.InvalidProtocolBufferException {
689 return PARSER.parseFrom(data);
690 }
692 java.nio.ByteBuffer data,
693 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
694 throws com.google.protobuf.InvalidProtocolBufferException {
695 return PARSER.parseFrom(data, extensionRegistry);
696 }
698 com.google.protobuf.ByteString data)
699 throws com.google.protobuf.InvalidProtocolBufferException {
700 return PARSER.parseFrom(data);
701 }
703 com.google.protobuf.ByteString data,
704 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
705 throws com.google.protobuf.InvalidProtocolBufferException {
706 return PARSER.parseFrom(data, extensionRegistry);
707 }
709 throws com.google.protobuf.InvalidProtocolBufferException {
710 return PARSER.parseFrom(data);
711 }
713 byte[] data,
714 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
715 throws com.google.protobuf.InvalidProtocolBufferException {
716 return PARSER.parseFrom(data, extensionRegistry);
717 }
719 throws java.io.IOException {
720 return com.google.protobuf.GeneratedMessage
721 .parseWithIOException(PARSER, input);
722 }
724 java.io.InputStream input,
725 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
726 throws java.io.IOException {
727 return com.google.protobuf.GeneratedMessage
728 .parseWithIOException(PARSER, input, extensionRegistry);
729 }
730
732 throws java.io.IOException {
733 return com.google.protobuf.GeneratedMessage
734 .parseDelimitedWithIOException(PARSER, input);
735 }
736
738 java.io.InputStream input,
739 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
740 throws java.io.IOException {
741 return com.google.protobuf.GeneratedMessage
742 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
743 }
745 com.google.protobuf.CodedInputStream input)
746 throws java.io.IOException {
747 return com.google.protobuf.GeneratedMessage
748 .parseWithIOException(PARSER, input);
749 }
751 com.google.protobuf.CodedInputStream input,
752 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
753 throws java.io.IOException {
754 return com.google.protobuf.GeneratedMessage
755 .parseWithIOException(PARSER, input, extensionRegistry);
756 }
757
758 @java.lang.Override
759 public Builder newBuilderForType() { return newBuilder(); }
760 public static Builder newBuilder() {
761 return DEFAULT_INSTANCE.toBuilder();
762 }
763 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto.Annotation prototype) {
764 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
765 }
766 @java.lang.Override
768 return this == DEFAULT_INSTANCE
769 ? new Builder() : new Builder().mergeFrom(this);
770 }
771
772 @java.lang.Override
774 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
775 Builder builder = new Builder(parent);
776 return builder;
777 }
778
786 public static final class Builder extends
787 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
788 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto.Annotation)
789 com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder {
790 public static final com.google.protobuf.Descriptors.Descriptor
792 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
793 }
794
795 @java.lang.Override
796 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
798 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
799 .ensureFieldAccessorsInitialized(
800 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
801 }
802
803 // Construct using com.google.ortools.linearsolver.MPModelProto.Annotation.newBuilder()
804 private Builder() {
805
806 }
807
808 private Builder(
809 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
810 super(parent);
811
812 }
813 @java.lang.Override
814 public Builder clear() {
815 super.clear();
816 bitField0_ = 0;
817 targetType_ = 0;
818 targetIndex_ = 0;
819 targetName_ = "";
820 payloadKey_ = "";
821 payloadValue_ = "";
822 return this;
823 }
824
825 @java.lang.Override
826 public com.google.protobuf.Descriptors.Descriptor
828 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
829 }
830
831 @java.lang.Override
833 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance();
834 }
835
836 @java.lang.Override
839 if (!result.isInitialized()) {
840 throw newUninitializedMessageException(result);
841 }
842 return result;
843 }
844
845 @java.lang.Override
847 com.google.ortools.linearsolver.MPModelProto.Annotation result = new com.google.ortools.linearsolver.MPModelProto.Annotation(this);
848 if (bitField0_ != 0) { buildPartial0(result); }
849 onBuilt();
850 return result;
851 }
852
853 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto.Annotation result) {
854 int from_bitField0_ = bitField0_;
855 int to_bitField0_ = 0;
856 if (((from_bitField0_ & 0x00000001) != 0)) {
857 result.targetType_ = targetType_;
858 to_bitField0_ |= 0x00000001;
859 }
860 if (((from_bitField0_ & 0x00000002) != 0)) {
861 result.targetIndex_ = targetIndex_;
862 to_bitField0_ |= 0x00000002;
863 }
864 if (((from_bitField0_ & 0x00000004) != 0)) {
865 result.targetName_ = targetName_;
866 to_bitField0_ |= 0x00000004;
867 }
868 if (((from_bitField0_ & 0x00000008) != 0)) {
869 result.payloadKey_ = payloadKey_;
870 to_bitField0_ |= 0x00000008;
871 }
872 if (((from_bitField0_ & 0x00000010) != 0)) {
873 result.payloadValue_ = payloadValue_;
874 to_bitField0_ |= 0x00000010;
875 }
876 result.bitField0_ |= to_bitField0_;
877 }
878
879 @java.lang.Override
880 public Builder mergeFrom(com.google.protobuf.Message other) {
881 if (other instanceof com.google.ortools.linearsolver.MPModelProto.Annotation) {
882 return mergeFrom((com.google.ortools.linearsolver.MPModelProto.Annotation)other);
883 } else {
884 super.mergeFrom(other);
885 return this;
886 }
887 }
888
889 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto.Annotation other) {
890 if (other == com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance()) return this;
891 if (other.hasTargetType()) {
892 setTargetType(other.getTargetType());
893 }
894 if (other.hasTargetIndex()) {
895 setTargetIndex(other.getTargetIndex());
896 }
897 if (other.hasTargetName()) {
898 targetName_ = other.targetName_;
899 bitField0_ |= 0x00000004;
900 onChanged();
901 }
902 if (other.hasPayloadKey()) {
903 payloadKey_ = other.payloadKey_;
904 bitField0_ |= 0x00000008;
905 onChanged();
906 }
907 if (other.hasPayloadValue()) {
908 payloadValue_ = other.payloadValue_;
909 bitField0_ |= 0x00000010;
910 onChanged();
911 }
912 this.mergeUnknownFields(other.getUnknownFields());
913 onChanged();
914 return this;
915 }
916
917 @java.lang.Override
918 public final boolean isInitialized() {
919 return true;
920 }
921
922 @java.lang.Override
923 public Builder mergeFrom(
924 com.google.protobuf.CodedInputStream input,
925 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
926 throws java.io.IOException {
927 if (extensionRegistry == null) {
928 throw new java.lang.NullPointerException();
929 }
930 try {
931 boolean done = false;
932 while (!done) {
933 int tag = input.readTag();
934 switch (tag) {
935 case 0:
936 done = true;
937 break;
938 case 8: {
939 int tmpRaw = input.readEnum();
941 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(tmpRaw);
942 if (tmpValue == null) {
943 mergeUnknownVarintField(1, tmpRaw);
944 } else {
945 targetType_ = tmpRaw;
946 bitField0_ |= 0x00000001;
947 }
948 break;
949 } // case 8
950 case 16: {
951 targetIndex_ = input.readInt32();
952 bitField0_ |= 0x00000002;
953 break;
954 } // case 16
955 case 26: {
956 targetName_ = input.readBytes();
957 bitField0_ |= 0x00000004;
958 break;
959 } // case 26
960 case 34: {
961 payloadKey_ = input.readBytes();
962 bitField0_ |= 0x00000008;
963 break;
964 } // case 34
965 case 42: {
966 payloadValue_ = input.readBytes();
967 bitField0_ |= 0x00000010;
968 break;
969 } // case 42
970 default: {
971 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
972 done = true; // was an endgroup tag
973 }
974 break;
975 } // default:
976 } // switch (tag)
977 } // while (!done)
978 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
979 throw e.unwrapIOException();
980 } finally {
981 onChanged();
982 } // finally
983 return this;
984 }
985 private int bitField0_;
986
987 private int targetType_ = 0;
992 @java.lang.Override public boolean hasTargetType() {
993 return ((bitField0_ & 0x00000001) != 0);
994 }
995
999 @java.lang.Override
1001 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
1003 }
1004
1009 public Builder setTargetType(com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType value) {
1010 if (value == null) { throw new NullPointerException(); }
1011 bitField0_ |= 0x00000001;
1012 targetType_ = value.getNumber();
1013 onChanged();
1014 return this;
1015 }
1016
1020 public Builder clearTargetType() {
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 }
1041
1050 @java.lang.Override
1051 public int getTargetIndex() {
1052 return targetIndex_;
1053 }
1054
1064 public Builder setTargetIndex(int value) {
1065
1066 targetIndex_ = value;
1067 bitField0_ |= 0x00000002;
1068 onChanged();
1069 return this;
1070 }
1071
1080 public Builder clearTargetIndex() {
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 }
1099
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 }
1121
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 }
1142
1151 public Builder setTargetName(
1152 java.lang.String value) {
1153 if (value == null) { throw new NullPointerException(); }
1154 targetName_ = value;
1155 bitField0_ |= 0x00000004;
1156 onChanged();
1157 return this;
1158 }
1159
1167 public Builder clearTargetName() {
1168 targetName_ = getDefaultInstance().getTargetName();
1169 bitField0_ = (bitField0_ & ~0x00000004);
1170 onChanged();
1171 return this;
1172 }
1173
1182 public Builder setTargetNameBytes(
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 }
1204
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 }
1227
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 }
1249
1259 public Builder setPayloadKey(
1260 java.lang.String value) {
1261 if (value == null) { throw new NullPointerException(); }
1262 payloadKey_ = value;
1263 bitField0_ |= 0x00000008;
1264 onChanged();
1265 return this;
1266 }
1267
1276 public Builder clearPayloadKey() {
1277 payloadKey_ = getDefaultInstance().getPayloadKey();
1278 bitField0_ = (bitField0_ & ~0x00000008);
1279 onChanged();
1280 return this;
1281 }
1282
1292 public Builder setPayloadKeyBytes(
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 }
1309
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 }
1327
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 }
1344
1349 public Builder setPayloadValue(
1350 java.lang.String value) {
1351 if (value == null) { throw new NullPointerException(); }
1352 payloadValue_ = value;
1353 bitField0_ |= 0x00000010;
1354 onChanged();
1355 return this;
1356 }
1357
1361 public Builder clearPayloadValue() {
1362 payloadValue_ = getDefaultInstance().getPayloadValue();
1363 bitField0_ = (bitField0_ & ~0x00000010);
1364 onChanged();
1365 return this;
1366 }
1367
1372 public Builder setPayloadValueBytes(
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
1445 return variable_;
1446 }
1447
1454 @java.lang.Override
1455 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1457 return variable_;
1458 }
1459
1466 @java.lang.Override
1467 public int getVariableCount() {
1468 return variable_.size();
1469 }
1470
1477 @java.lang.Override
1479 return variable_.get(index);
1480 }
1481
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
1506 return constraint_;
1507 }
1508
1515 @java.lang.Override
1516 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1518 return constraint_;
1519 }
1520
1527 @java.lang.Override
1528 public int getConstraintCount() {
1529 return constraint_.size();
1530 }
1531
1538 @java.lang.Override
1540 return constraint_.get(index);
1541 }
1542
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
1568 return generalConstraint_;
1569 }
1570
1578 @java.lang.Override
1579 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
1581 return generalConstraint_;
1582 }
1583
1591 @java.lang.Override
1593 return generalConstraint_.size();
1594 }
1595
1603 @java.lang.Override
1605 return generalConstraint_.get(index);
1606 }
1607
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 }
1635
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 }
1662
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 }
1690
1699 @java.lang.Override
1701 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1702 }
1703
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 }
1731
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 }
1754
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 }
1801
1819 @java.lang.Override
1821 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1822 }
1823
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 }
1855
1858 @java.lang.Override
1859 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
1861 return annotation_;
1862 }
1863
1866 @java.lang.Override
1867 public int getAnnotationCount() {
1868 return annotation_.size();
1869 }
1870
1873 @java.lang.Override
1875 return annotation_.get(index);
1876 }
1877
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 }
2166
2173 public static final class Builder extends
2174 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
2175 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto)
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 internalGetVariableFieldBuilder();
2204 internalGetConstraintFieldBuilder();
2205 internalGetGeneralConstraintFieldBuilder();
2206 internalGetQuadraticObjectiveFieldBuilder();
2207 internalGetSolutionHintFieldBuilder();
2208 internalGetAnnotationFieldBuilder();
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 internalGetVariableFieldBuilder() : 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 internalGetConstraintFieldBuilder() : 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 internalGetGeneralConstraintFieldBuilder() : 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 internalGetAnnotationFieldBuilder() : 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
2501 public Builder mergeFrom(
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 internalGetSolutionHintFieldBuilder().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 internalGetQuadraticObjectiveFieldBuilder().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 }
2640
2647 public int getVariableCount() {
2648 if (variableBuilder_ == null) {
2649 return variable_.size();
2650 } else {
2651 return variableBuilder_.getCount();
2652 }
2653 }
2654
2662 if (variableBuilder_ == null) {
2663 return variable_.get(index);
2664 } else {
2665 return variableBuilder_.getMessage(index);
2666 }
2667 }
2668
2675 public Builder setVariable(
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 }
2689
2696 public Builder setVariable(
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 }
2707
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 }
2727
2734 public Builder addVariable(
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 }
2748
2755 public Builder addVariable(
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 }
2766
2773 public Builder addVariable(
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 }
2784
2791 public Builder addAllVariable(
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 }
2803
2810 public Builder clearVariable() {
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 }
2820
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 }
2837
2845 int index) {
2846 return internalGetVariableFieldBuilder().getBuilder(index);
2847 }
2848
2856 int index) {
2857 if (variableBuilder_ == null) {
2858 return variable_.get(index); } else {
2859 return variableBuilder_.getMessageOrBuilder(index);
2860 }
2861 }
2862
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 }
2877
2885 return internalGetVariableFieldBuilder().addBuilder(
2886 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2887 }
2888
2896 int index) {
2897 return internalGetVariableFieldBuilder().addBuilder(
2898 index, com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2899 }
2900
2907 public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
2909 return internalGetVariableFieldBuilder().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 internalGetVariableFieldBuilder() {
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 }
2952
2959 public int getConstraintCount() {
2960 if (constraintBuilder_ == null) {
2961 return constraint_.size();
2962 } else {
2963 return constraintBuilder_.getCount();
2964 }
2965 }
2966
2974 if (constraintBuilder_ == null) {
2975 return constraint_.get(index);
2976 } else {
2977 return constraintBuilder_.getMessage(index);
2978 }
2979 }
2980
2987 public Builder setConstraint(
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 }
3001
3008 public Builder setConstraint(
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 }
3019
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 }
3039
3046 public Builder addConstraint(
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 }
3060
3067 public Builder addConstraint(
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 }
3078
3085 public Builder addConstraint(
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 }
3096
3103 public Builder addAllConstraint(
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 }
3115
3122 public Builder clearConstraint() {
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 }
3132
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 }
3149
3157 int index) {
3158 return internalGetConstraintFieldBuilder().getBuilder(index);
3159 }
3160
3168 int index) {
3169 if (constraintBuilder_ == null) {
3170 return constraint_.get(index); } else {
3171 return constraintBuilder_.getMessageOrBuilder(index);
3172 }
3173 }
3174
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 }
3189
3197 return internalGetConstraintFieldBuilder().addBuilder(
3198 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3199 }
3200
3208 int index) {
3209 return internalGetConstraintFieldBuilder().addBuilder(
3210 index, com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3211 }
3212
3219 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
3221 return internalGetConstraintFieldBuilder().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 internalGetConstraintFieldBuilder() {
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 }
3265
3274 if (generalConstraintBuilder_ == null) {
3275 return generalConstraint_.size();
3276 } else {
3277 return generalConstraintBuilder_.getCount();
3278 }
3279 }
3280
3289 if (generalConstraintBuilder_ == null) {
3290 return generalConstraint_.get(index);
3291 } else {
3292 return generalConstraintBuilder_.getMessage(index);
3293 }
3294 }
3295
3303 public Builder setGeneralConstraint(
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 }
3317
3325 public Builder setGeneralConstraint(
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 }
3336
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 }
3357
3365 public Builder addGeneralConstraint(
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 }
3379
3387 public Builder addGeneralConstraint(
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 }
3398
3406 public Builder addGeneralConstraint(
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 }
3417
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 }
3437
3445 public Builder clearGeneralConstraint() {
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 }
3455
3463 public Builder removeGeneralConstraint(int index) {
3464 if (generalConstraintBuilder_ == null) {
3465 ensureGeneralConstraintIsMutable();
3466 generalConstraint_.remove(index);
3467 onChanged();
3468 } else {
3469 generalConstraintBuilder_.remove(index);
3470 }
3471 return this;
3472 }
3473
3482 int index) {
3483 return internalGetGeneralConstraintFieldBuilder().getBuilder(index);
3484 }
3485
3494 int index) {
3495 if (generalConstraintBuilder_ == null) {
3496 return generalConstraint_.get(index); } else {
3497 return generalConstraintBuilder_.getMessageOrBuilder(index);
3498 }
3499 }
3500
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 }
3516
3525 return internalGetGeneralConstraintFieldBuilder().addBuilder(
3526 com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3527 }
3528
3537 int index) {
3538 return internalGetGeneralConstraintFieldBuilder().addBuilder(
3539 index, com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3540 }
3541
3549 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder>
3551 return internalGetGeneralConstraintFieldBuilder().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 internalGetGeneralConstraintFieldBuilder() {
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 }
3581
3589 @java.lang.Override
3590 public boolean getMaximize() {
3591 return maximize_;
3592 }
3593
3602 public Builder setMaximize(boolean value) {
3603
3604 maximize_ = value;
3605 bitField0_ |= 0x00000008;
3606 onChanged();
3607 return this;
3608 }
3609
3617 public Builder clearMaximize() {
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 }
3637
3645 @java.lang.Override
3646 public double getObjectiveOffset() {
3647 return objectiveOffset_;
3648 }
3649
3658 public Builder setObjectiveOffset(double value) {
3659
3660 objectiveOffset_ = value;
3661 bitField0_ |= 0x00000010;
3662 onChanged();
3663 return this;
3664 }
3665
3673 public Builder clearObjectiveOffset() {
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 }
3695
3705 if (quadraticObjectiveBuilder_ == null) {
3706 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3707 } else {
3708 return quadraticObjectiveBuilder_.getMessage();
3709 }
3710 }
3711
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 }
3732
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 }
3751
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 }
3777
3785 public Builder clearQuadraticObjective() {
3786 bitField0_ = (bitField0_ & ~0x00000020);
3787 quadraticObjective_ = null;
3788 if (quadraticObjectiveBuilder_ != null) {
3789 quadraticObjectiveBuilder_.dispose();
3790 quadraticObjectiveBuilder_ = null;
3791 }
3792 onChanged();
3793 return this;
3794 }
3795
3804 bitField0_ |= 0x00000020;
3805 onChanged();
3806 return internalGetQuadraticObjectiveFieldBuilder().getBuilder();
3807 }
3808
3817 if (quadraticObjectiveBuilder_ != null) {
3818 return quadraticObjectiveBuilder_.getMessageOrBuilder();
3819 } else {
3820 return quadraticObjective_ == null ?
3821 com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3822 }
3823 }
3824
3832 private com.google.protobuf.SingleFieldBuilder<
3833 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>
3834 internalGetQuadraticObjectiveFieldBuilder() {
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 }
3858
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 }
3880
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 }
3901
3910 public Builder setName(
3911 java.lang.String value) {
3912 if (value == null) { throw new NullPointerException(); }
3913 name_ = value;
3914 bitField0_ |= 0x00000040;
3915 onChanged();
3916 return this;
3917 }
3918
3926 public Builder clearName() {
3927 name_ = getDefaultInstance().getName();
3928 bitField0_ = (bitField0_ & ~0x00000040);
3929 onChanged();
3930 return this;
3931 }
3932
3941 public Builder setNameBytes(
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 }
3974
3993 if (solutionHintBuilder_ == null) {
3994 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3995 } else {
3996 return solutionHintBuilder_.getMessage();
3997 }
3998 }
3999
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 }
4029
4046 public Builder setSolutionHint(
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 }
4057
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 }
4092
4109 public Builder clearSolutionHint() {
4110 bitField0_ = (bitField0_ & ~0x00000080);
4111 solutionHint_ = null;
4112 if (solutionHintBuilder_ != null) {
4113 solutionHintBuilder_.dispose();
4114 solutionHintBuilder_ = null;
4115 }
4116 onChanged();
4117 return this;
4118 }
4119
4137 bitField0_ |= 0x00000080;
4138 onChanged();
4139 return internalGetSolutionHintFieldBuilder().getBuilder();
4140 }
4141
4159 if (solutionHintBuilder_ != null) {
4160 return solutionHintBuilder_.getMessageOrBuilder();
4161 } else {
4162 return solutionHint_ == null ?
4163 com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
4164 }
4165 }
4166
4183 private com.google.protobuf.SingleFieldBuilder<
4184 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>
4185 internalGetSolutionHintFieldBuilder() {
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 }
4219
4222 public int getAnnotationCount() {
4223 if (annotationBuilder_ == null) {
4224 return annotation_.size();
4225 } else {
4226 return annotationBuilder_.getCount();
4227 }
4228 }
4229
4233 if (annotationBuilder_ == null) {
4234 return annotation_.get(index);
4235 } else {
4236 return annotationBuilder_.getMessage(index);
4237 }
4238 }
4239
4242 public Builder setAnnotation(
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 }
4256
4259 public Builder setAnnotation(
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 }
4270
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 }
4286
4289 public Builder addAnnotation(
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 }
4303
4306 public Builder addAnnotation(
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 }
4317
4320 public Builder addAnnotation(
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 }
4331
4334 public Builder addAllAnnotation(
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 }
4346
4349 public Builder clearAnnotation() {
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 }
4359
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 }
4372
4376 int index) {
4377 return internalGetAnnotationFieldBuilder().getBuilder(index);
4378 }
4379
4383 int index) {
4384 if (annotationBuilder_ == null) {
4385 return annotation_.get(index); } else {
4386 return annotationBuilder_.getMessageOrBuilder(index);
4387 }
4388 }
4389
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 }
4400
4404 return internalGetAnnotationFieldBuilder().addBuilder(
4405 com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4406 }
4407
4411 int index) {
4412 return internalGetAnnotationFieldBuilder().addBuilder(
4413 index, com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4414 }
4415
4418 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation.Builder>
4420 return internalGetAnnotationFieldBuilder().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 internalGetAnnotationFieldBuilder() {
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()
static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static TargetType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static com.google.protobuf.Internal.EnumLiteMap< TargetType > internalGetValueMap()
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType getTargetType()