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