Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPModelProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4// Protobuf Java Version: 3.25.3
5package com.google.ortools.linearsolver;
6
14public final class MPModelProto extends
15 com.google.protobuf.GeneratedMessageV3 implements
16 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto)
18private static final long serialVersionUID = 0L;
19 // Use MPModelProto.newBuilder() to construct.
20 private MPModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
21 super(builder);
22 }
23 private MPModelProto() {
24 variable_ = java.util.Collections.emptyList();
25 constraint_ = java.util.Collections.emptyList();
26 generalConstraint_ = java.util.Collections.emptyList();
27 name_ = "";
28 annotation_ = java.util.Collections.emptyList();
29 }
30
31 @java.lang.Override
32 @SuppressWarnings({"unused"})
33 protected java.lang.Object newInstance(
34 UnusedPrivateParameter unused) {
35 return new MPModelProto();
36 }
37
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
41 }
42
43 @java.lang.Override
44 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
46 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
49 }
50
51 public interface AnnotationOrBuilder extends
52 // @@protoc_insertion_point(interface_extends:operations_research.MPModelProto.Annotation)
53 com.google.protobuf.MessageOrBuilder {
54
59 boolean hasTargetType();
65
75 boolean hasTargetIndex();
86
95 boolean hasTargetName();
104 java.lang.String getTargetName();
113 com.google.protobuf.ByteString
115
125 boolean hasPayloadKey();
135 java.lang.String getPayloadKey();
145 com.google.protobuf.ByteString
147
157 java.lang.String getPayloadValue();
162 com.google.protobuf.ByteString
164 }
173 public static final class Annotation extends
174 com.google.protobuf.GeneratedMessageV3 implements
175 // @@protoc_insertion_point(message_implements:operations_research.MPModelProto.Annotation)
177 private static final long serialVersionUID = 0L;
178 // Use Annotation.newBuilder() to construct.
179 private Annotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
180 super(builder);
181 }
182 private Annotation() {
183 targetType_ = 0;
184 targetName_ = "";
185 payloadKey_ = "";
186 payloadValue_ = "";
187 }
188
189 @java.lang.Override
190 @SuppressWarnings({"unused"})
191 protected java.lang.Object newInstance(
192 UnusedPrivateParameter unused) {
193 return new Annotation();
194 }
195
196 public static final com.google.protobuf.Descriptors.Descriptor
198 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
199 }
200
201 @java.lang.Override
202 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
204 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
205 .ensureFieldAccessorsInitialized(
206 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
207 }
208
217 public enum TargetType
218 implements com.google.protobuf.ProtocolMessageEnum {
231 ;
232
236 public static final int VARIABLE_DEFAULT_VALUE = 0;
240 public static final int CONSTRAINT_VALUE = 1;
244 public static final int GENERAL_CONSTRAINT_VALUE = 2;
245
246
247 public final int getNumber() {
248 return value;
249 }
250
256 @java.lang.Deprecated
257 public static TargetType valueOf(int value) {
258 return forNumber(value);
259 }
260
265 public static TargetType forNumber(int value) {
266 switch (value) {
267 case 0: return VARIABLE_DEFAULT;
268 case 1: return CONSTRAINT;
269 case 2: return GENERAL_CONSTRAINT;
270 default: return null;
271 }
272 }
273
274 public static com.google.protobuf.Internal.EnumLiteMap<TargetType>
276 return internalValueMap;
277 }
278 private static final com.google.protobuf.Internal.EnumLiteMap<
279 TargetType> internalValueMap =
280 new com.google.protobuf.Internal.EnumLiteMap<TargetType>() {
281 public TargetType findValueByNumber(int number) {
282 return TargetType.forNumber(number);
283 }
284 };
285
286 public final com.google.protobuf.Descriptors.EnumValueDescriptor
288 return getDescriptor().getValues().get(ordinal());
289 }
290 public final com.google.protobuf.Descriptors.EnumDescriptor
292 return getDescriptor();
293 }
294 public static final com.google.protobuf.Descriptors.EnumDescriptor
296 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDescriptor().getEnumTypes().get(0);
297 }
298
299 private static final TargetType[] VALUES = values();
300
301 public static TargetType valueOf(
302 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
303 if (desc.getType() != getDescriptor()) {
304 throw new java.lang.IllegalArgumentException(
305 "EnumValueDescriptor is not for this type.");
306 }
307 return VALUES[desc.getIndex()];
308 }
309
310 private final int value;
311
312 private TargetType(int value) {
313 this.value = value;
314 }
315
316 // @@protoc_insertion_point(enum_scope:operations_research.MPModelProto.Annotation.TargetType)
317 }
318
319 private int bitField0_;
320 public static final int TARGET_TYPE_FIELD_NUMBER = 1;
321 private int targetType_ = 0;
326 @java.lang.Override public boolean hasTargetType() {
327 return ((bitField0_ & 0x00000001) != 0);
328 }
334 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
335 return result == null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
336 }
337
338 public static final int TARGET_INDEX_FIELD_NUMBER = 2;
339 private int targetIndex_ = 0;
349 @java.lang.Override
350 public boolean hasTargetIndex() {
351 return ((bitField0_ & 0x00000002) != 0);
352 }
362 @java.lang.Override
363 public int getTargetIndex() {
364 return targetIndex_;
365 }
366
367 public static final int TARGET_NAME_FIELD_NUMBER = 3;
368 @SuppressWarnings("serial")
369 private volatile java.lang.Object targetName_ = "";
378 @java.lang.Override
379 public boolean hasTargetName() {
380 return ((bitField0_ & 0x00000004) != 0);
381 }
390 @java.lang.Override
391 public java.lang.String getTargetName() {
392 java.lang.Object ref = targetName_;
393 if (ref instanceof java.lang.String) {
394 return (java.lang.String) ref;
395 } else {
396 com.google.protobuf.ByteString bs =
397 (com.google.protobuf.ByteString) ref;
398 java.lang.String s = bs.toStringUtf8();
399 if (bs.isValidUtf8()) {
400 targetName_ = s;
401 }
402 return s;
403 }
404 }
413 @java.lang.Override
414 public com.google.protobuf.ByteString
416 java.lang.Object ref = targetName_;
417 if (ref instanceof java.lang.String) {
418 com.google.protobuf.ByteString b =
419 com.google.protobuf.ByteString.copyFromUtf8(
420 (java.lang.String) ref);
421 targetName_ = b;
422 return b;
423 } else {
424 return (com.google.protobuf.ByteString) ref;
425 }
426 }
427
428 public static final int PAYLOAD_KEY_FIELD_NUMBER = 4;
429 @SuppressWarnings("serial")
430 private volatile java.lang.Object payloadKey_ = "";
440 @java.lang.Override
441 public boolean hasPayloadKey() {
442 return ((bitField0_ & 0x00000008) != 0);
443 }
453 @java.lang.Override
454 public java.lang.String getPayloadKey() {
455 java.lang.Object ref = payloadKey_;
456 if (ref instanceof java.lang.String) {
457 return (java.lang.String) ref;
458 } else {
459 com.google.protobuf.ByteString bs =
460 (com.google.protobuf.ByteString) ref;
461 java.lang.String s = bs.toStringUtf8();
462 if (bs.isValidUtf8()) {
463 payloadKey_ = s;
464 }
465 return s;
466 }
467 }
477 @java.lang.Override
478 public com.google.protobuf.ByteString
480 java.lang.Object ref = payloadKey_;
481 if (ref instanceof java.lang.String) {
482 com.google.protobuf.ByteString b =
483 com.google.protobuf.ByteString.copyFromUtf8(
484 (java.lang.String) ref);
485 payloadKey_ = b;
486 return b;
487 } else {
488 return (com.google.protobuf.ByteString) ref;
489 }
490 }
491
492 public static final int PAYLOAD_VALUE_FIELD_NUMBER = 5;
493 @SuppressWarnings("serial")
494 private volatile java.lang.Object payloadValue_ = "";
499 @java.lang.Override
500 public boolean hasPayloadValue() {
501 return ((bitField0_ & 0x00000010) != 0);
502 }
507 @java.lang.Override
508 public java.lang.String getPayloadValue() {
509 java.lang.Object ref = payloadValue_;
510 if (ref instanceof java.lang.String) {
511 return (java.lang.String) ref;
512 } else {
513 com.google.protobuf.ByteString bs =
514 (com.google.protobuf.ByteString) ref;
515 java.lang.String s = bs.toStringUtf8();
516 if (bs.isValidUtf8()) {
517 payloadValue_ = s;
518 }
519 return s;
520 }
521 }
526 @java.lang.Override
527 public com.google.protobuf.ByteString
529 java.lang.Object ref = payloadValue_;
530 if (ref instanceof java.lang.String) {
531 com.google.protobuf.ByteString b =
532 com.google.protobuf.ByteString.copyFromUtf8(
533 (java.lang.String) ref);
534 payloadValue_ = b;
535 return b;
536 } else {
537 return (com.google.protobuf.ByteString) ref;
538 }
539 }
540
541 private byte memoizedIsInitialized = -1;
542 @java.lang.Override
543 public final boolean isInitialized() {
544 byte isInitialized = memoizedIsInitialized;
545 if (isInitialized == 1) return true;
546 if (isInitialized == 0) return false;
547
548 memoizedIsInitialized = 1;
549 return true;
550 }
551
552 @java.lang.Override
553 public void writeTo(com.google.protobuf.CodedOutputStream output)
554 throws java.io.IOException {
555 if (((bitField0_ & 0x00000001) != 0)) {
556 output.writeEnum(1, targetType_);
557 }
558 if (((bitField0_ & 0x00000002) != 0)) {
559 output.writeInt32(2, targetIndex_);
560 }
561 if (((bitField0_ & 0x00000004) != 0)) {
562 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetName_);
563 }
564 if (((bitField0_ & 0x00000008) != 0)) {
565 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, payloadKey_);
566 }
567 if (((bitField0_ & 0x00000010) != 0)) {
568 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, payloadValue_);
569 }
570 getUnknownFields().writeTo(output);
571 }
572
573 @java.lang.Override
574 public int getSerializedSize() {
575 int size = memoizedSize;
576 if (size != -1) return size;
577
578 size = 0;
579 if (((bitField0_ & 0x00000001) != 0)) {
580 size += com.google.protobuf.CodedOutputStream
581 .computeEnumSize(1, targetType_);
582 }
583 if (((bitField0_ & 0x00000002) != 0)) {
584 size += com.google.protobuf.CodedOutputStream
585 .computeInt32Size(2, targetIndex_);
586 }
587 if (((bitField0_ & 0x00000004) != 0)) {
588 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetName_);
589 }
590 if (((bitField0_ & 0x00000008) != 0)) {
591 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, payloadKey_);
592 }
593 if (((bitField0_ & 0x00000010) != 0)) {
594 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, payloadValue_);
595 }
596 size += getUnknownFields().getSerializedSize();
597 memoizedSize = size;
598 return size;
599 }
600
601 @java.lang.Override
602 public boolean equals(final java.lang.Object obj) {
603 if (obj == this) {
604 return true;
605 }
606 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto.Annotation)) {
607 return super.equals(obj);
608 }
609 com.google.ortools.linearsolver.MPModelProto.Annotation other = (com.google.ortools.linearsolver.MPModelProto.Annotation) obj;
610
611 if (hasTargetType() != other.hasTargetType()) return false;
612 if (hasTargetType()) {
613 if (targetType_ != other.targetType_) return false;
614 }
615 if (hasTargetIndex() != other.hasTargetIndex()) return false;
616 if (hasTargetIndex()) {
617 if (getTargetIndex()
618 != other.getTargetIndex()) return false;
619 }
620 if (hasTargetName() != other.hasTargetName()) return false;
621 if (hasTargetName()) {
622 if (!getTargetName()
623 .equals(other.getTargetName())) return false;
624 }
625 if (hasPayloadKey() != other.hasPayloadKey()) return false;
626 if (hasPayloadKey()) {
627 if (!getPayloadKey()
628 .equals(other.getPayloadKey())) return false;
629 }
630 if (hasPayloadValue() != other.hasPayloadValue()) return false;
631 if (hasPayloadValue()) {
632 if (!getPayloadValue()
633 .equals(other.getPayloadValue())) return false;
634 }
635 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
636 return true;
637 }
638
639 @java.lang.Override
640 public int hashCode() {
641 if (memoizedHashCode != 0) {
642 return memoizedHashCode;
643 }
644 int hash = 41;
645 hash = (19 * hash) + getDescriptor().hashCode();
646 if (hasTargetType()) {
647 hash = (37 * hash) + TARGET_TYPE_FIELD_NUMBER;
648 hash = (53 * hash) + targetType_;
649 }
650 if (hasTargetIndex()) {
651 hash = (37 * hash) + TARGET_INDEX_FIELD_NUMBER;
652 hash = (53 * hash) + getTargetIndex();
653 }
654 if (hasTargetName()) {
655 hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER;
656 hash = (53 * hash) + getTargetName().hashCode();
657 }
658 if (hasPayloadKey()) {
659 hash = (37 * hash) + PAYLOAD_KEY_FIELD_NUMBER;
660 hash = (53 * hash) + getPayloadKey().hashCode();
661 }
662 if (hasPayloadValue()) {
663 hash = (37 * hash) + PAYLOAD_VALUE_FIELD_NUMBER;
664 hash = (53 * hash) + getPayloadValue().hashCode();
665 }
666 hash = (29 * hash) + getUnknownFields().hashCode();
667 memoizedHashCode = hash;
668 return hash;
669 }
670
672 java.nio.ByteBuffer data)
673 throws com.google.protobuf.InvalidProtocolBufferException {
674 return PARSER.parseFrom(data);
675 }
677 java.nio.ByteBuffer data,
678 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
679 throws com.google.protobuf.InvalidProtocolBufferException {
680 return PARSER.parseFrom(data, extensionRegistry);
681 }
683 com.google.protobuf.ByteString data)
684 throws com.google.protobuf.InvalidProtocolBufferException {
685 return PARSER.parseFrom(data);
686 }
688 com.google.protobuf.ByteString data,
689 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
690 throws com.google.protobuf.InvalidProtocolBufferException {
691 return PARSER.parseFrom(data, extensionRegistry);
692 }
694 throws com.google.protobuf.InvalidProtocolBufferException {
695 return PARSER.parseFrom(data);
696 }
698 byte[] data,
699 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
700 throws com.google.protobuf.InvalidProtocolBufferException {
701 return PARSER.parseFrom(data, extensionRegistry);
702 }
704 throws java.io.IOException {
705 return com.google.protobuf.GeneratedMessageV3
706 .parseWithIOException(PARSER, input);
707 }
709 java.io.InputStream input,
710 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
711 throws java.io.IOException {
712 return com.google.protobuf.GeneratedMessageV3
713 .parseWithIOException(PARSER, input, extensionRegistry);
714 }
715
717 throws java.io.IOException {
718 return com.google.protobuf.GeneratedMessageV3
719 .parseDelimitedWithIOException(PARSER, input);
720 }
721
723 java.io.InputStream input,
724 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
725 throws java.io.IOException {
726 return com.google.protobuf.GeneratedMessageV3
727 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
728 }
730 com.google.protobuf.CodedInputStream input)
731 throws java.io.IOException {
732 return com.google.protobuf.GeneratedMessageV3
733 .parseWithIOException(PARSER, input);
734 }
736 com.google.protobuf.CodedInputStream input,
737 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
738 throws java.io.IOException {
739 return com.google.protobuf.GeneratedMessageV3
740 .parseWithIOException(PARSER, input, extensionRegistry);
741 }
742
743 @java.lang.Override
744 public Builder newBuilderForType() { return newBuilder(); }
745 public static Builder newBuilder() {
746 return DEFAULT_INSTANCE.toBuilder();
747 }
748 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto.Annotation prototype) {
749 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
750 }
751 @java.lang.Override
753 return this == DEFAULT_INSTANCE
754 ? new Builder() : new Builder().mergeFrom(this);
755 }
756
757 @java.lang.Override
759 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
760 Builder builder = new Builder(parent);
761 return builder;
762 }
771 public static final class Builder extends
772 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
773 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto.Annotation)
774 com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder {
775 public static final com.google.protobuf.Descriptors.Descriptor
777 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
778 }
779
780 @java.lang.Override
781 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
783 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
784 .ensureFieldAccessorsInitialized(
785 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
786 }
787
788 // Construct using com.google.ortools.linearsolver.MPModelProto.Annotation.newBuilder()
789 private Builder() {
790
791 }
792
793 private Builder(
794 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
795 super(parent);
796
797 }
798 @java.lang.Override
799 public Builder clear() {
800 super.clear();
801 bitField0_ = 0;
802 targetType_ = 0;
803 targetIndex_ = 0;
804 targetName_ = "";
805 payloadKey_ = "";
806 payloadValue_ = "";
807 return this;
808 }
809
810 @java.lang.Override
811 public com.google.protobuf.Descriptors.Descriptor
813 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
814 }
815
816 @java.lang.Override
818 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance();
819 }
820
821 @java.lang.Override
824 if (!result.isInitialized()) {
825 throw newUninitializedMessageException(result);
826 }
827 return result;
828 }
829
830 @java.lang.Override
832 com.google.ortools.linearsolver.MPModelProto.Annotation result = new com.google.ortools.linearsolver.MPModelProto.Annotation(this);
833 if (bitField0_ != 0) { buildPartial0(result); }
834 onBuilt();
835 return result;
836 }
837
838 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto.Annotation result) {
839 int from_bitField0_ = bitField0_;
840 int to_bitField0_ = 0;
841 if (((from_bitField0_ & 0x00000001) != 0)) {
842 result.targetType_ = targetType_;
843 to_bitField0_ |= 0x00000001;
844 }
845 if (((from_bitField0_ & 0x00000002) != 0)) {
846 result.targetIndex_ = targetIndex_;
847 to_bitField0_ |= 0x00000002;
848 }
849 if (((from_bitField0_ & 0x00000004) != 0)) {
850 result.targetName_ = targetName_;
851 to_bitField0_ |= 0x00000004;
852 }
853 if (((from_bitField0_ & 0x00000008) != 0)) {
854 result.payloadKey_ = payloadKey_;
855 to_bitField0_ |= 0x00000008;
856 }
857 if (((from_bitField0_ & 0x00000010) != 0)) {
858 result.payloadValue_ = payloadValue_;
859 to_bitField0_ |= 0x00000010;
860 }
861 result.bitField0_ |= to_bitField0_;
862 }
863
864 @java.lang.Override
865 public Builder clone() {
866 return super.clone();
867 }
868 @java.lang.Override
870 com.google.protobuf.Descriptors.FieldDescriptor field,
871 java.lang.Object value) {
872 return super.setField(field, value);
873 }
874 @java.lang.Override
876 com.google.protobuf.Descriptors.FieldDescriptor field) {
877 return super.clearField(field);
878 }
879 @java.lang.Override
881 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
882 return super.clearOneof(oneof);
883 }
884 @java.lang.Override
886 com.google.protobuf.Descriptors.FieldDescriptor field,
887 int index, java.lang.Object value) {
888 return super.setRepeatedField(field, index, value);
889 }
890 @java.lang.Override
892 com.google.protobuf.Descriptors.FieldDescriptor field,
893 java.lang.Object value) {
894 return super.addRepeatedField(field, value);
895 }
896 @java.lang.Override
897 public Builder mergeFrom(com.google.protobuf.Message other) {
898 if (other instanceof com.google.ortools.linearsolver.MPModelProto.Annotation) {
899 return mergeFrom((com.google.ortools.linearsolver.MPModelProto.Annotation)other);
900 } else {
901 super.mergeFrom(other);
902 return this;
903 }
904 }
905
906 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto.Annotation other) {
907 if (other == com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance()) return this;
908 if (other.hasTargetType()) {
909 setTargetType(other.getTargetType());
910 }
911 if (other.hasTargetIndex()) {
912 setTargetIndex(other.getTargetIndex());
913 }
914 if (other.hasTargetName()) {
915 targetName_ = other.targetName_;
916 bitField0_ |= 0x00000004;
917 onChanged();
918 }
919 if (other.hasPayloadKey()) {
920 payloadKey_ = other.payloadKey_;
921 bitField0_ |= 0x00000008;
922 onChanged();
923 }
924 if (other.hasPayloadValue()) {
925 payloadValue_ = other.payloadValue_;
926 bitField0_ |= 0x00000010;
927 onChanged();
928 }
929 this.mergeUnknownFields(other.getUnknownFields());
930 onChanged();
931 return this;
932 }
933
934 @java.lang.Override
935 public final boolean isInitialized() {
936 return true;
937 }
938
939 @java.lang.Override
941 com.google.protobuf.CodedInputStream input,
942 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
943 throws java.io.IOException {
944 if (extensionRegistry == null) {
945 throw new java.lang.NullPointerException();
946 }
947 try {
948 boolean done = false;
949 while (!done) {
950 int tag = input.readTag();
951 switch (tag) {
952 case 0:
953 done = true;
954 break;
955 case 8: {
956 int tmpRaw = input.readEnum();
958 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(tmpRaw);
959 if (tmpValue == null) {
960 mergeUnknownVarintField(1, tmpRaw);
961 } else {
962 targetType_ = tmpRaw;
963 bitField0_ |= 0x00000001;
964 }
965 break;
966 } // case 8
967 case 16: {
968 targetIndex_ = input.readInt32();
969 bitField0_ |= 0x00000002;
970 break;
971 } // case 16
972 case 26: {
973 targetName_ = input.readBytes();
974 bitField0_ |= 0x00000004;
975 break;
976 } // case 26
977 case 34: {
978 payloadKey_ = input.readBytes();
979 bitField0_ |= 0x00000008;
980 break;
981 } // case 34
982 case 42: {
983 payloadValue_ = input.readBytes();
984 bitField0_ |= 0x00000010;
985 break;
986 } // case 42
987 default: {
988 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
989 done = true; // was an endgroup tag
990 }
991 break;
992 } // default:
993 } // switch (tag)
994 } // while (!done)
995 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
996 throw e.unwrapIOException();
997 } finally {
998 onChanged();
999 } // finally
1000 return this;
1001 }
1002 private int bitField0_;
1003
1004 private int targetType_ = 0;
1009 @java.lang.Override public boolean hasTargetType() {
1010 return ((bitField0_ & 0x00000001) != 0);
1011 }
1016 @java.lang.Override
1018 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType result = com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(targetType_);
1019 return result == null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
1020 }
1026 public Builder setTargetType(com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType value) {
1027 if (value == null) {
1028 throw new NullPointerException();
1029 }
1030 bitField0_ |= 0x00000001;
1031 targetType_ = value.getNumber();
1032 onChanged();
1033 return this;
1034 }
1040 bitField0_ = (bitField0_ & ~0x00000001);
1041 targetType_ = 0;
1042 onChanged();
1043 return this;
1044 }
1045
1046 private int targetIndex_ ;
1056 @java.lang.Override
1057 public boolean hasTargetIndex() {
1058 return ((bitField0_ & 0x00000002) != 0);
1059 }
1069 @java.lang.Override
1070 public int getTargetIndex() {
1071 return targetIndex_;
1072 }
1083 public Builder setTargetIndex(int value) {
1084
1085 targetIndex_ = value;
1086 bitField0_ |= 0x00000002;
1087 onChanged();
1088 return this;
1089 }
1100 bitField0_ = (bitField0_ & ~0x00000002);
1101 targetIndex_ = 0;
1102 onChanged();
1103 return this;
1104 }
1105
1106 private java.lang.Object targetName_ = "";
1115 public boolean hasTargetName() {
1116 return ((bitField0_ & 0x00000004) != 0);
1117 }
1126 public java.lang.String getTargetName() {
1127 java.lang.Object ref = targetName_;
1128 if (!(ref instanceof java.lang.String)) {
1129 com.google.protobuf.ByteString bs =
1130 (com.google.protobuf.ByteString) ref;
1131 java.lang.String s = bs.toStringUtf8();
1132 if (bs.isValidUtf8()) {
1133 targetName_ = s;
1134 }
1135 return s;
1136 } else {
1137 return (java.lang.String) ref;
1138 }
1139 }
1148 public com.google.protobuf.ByteString
1150 java.lang.Object ref = targetName_;
1151 if (ref instanceof String) {
1152 com.google.protobuf.ByteString b =
1153 com.google.protobuf.ByteString.copyFromUtf8(
1154 (java.lang.String) ref);
1155 targetName_ = b;
1156 return b;
1157 } else {
1158 return (com.google.protobuf.ByteString) ref;
1159 }
1160 }
1171 java.lang.String value) {
1172 if (value == null) { throw new NullPointerException(); }
1173 targetName_ = value;
1174 bitField0_ |= 0x00000004;
1175 onChanged();
1176 return this;
1177 }
1187 targetName_ = getDefaultInstance().getTargetName();
1188 bitField0_ = (bitField0_ & ~0x00000004);
1189 onChanged();
1190 return this;
1191 }
1202 com.google.protobuf.ByteString value) {
1203 if (value == null) { throw new NullPointerException(); }
1204 targetName_ = value;
1205 bitField0_ |= 0x00000004;
1206 onChanged();
1207 return this;
1208 }
1209
1210 private java.lang.Object payloadKey_ = "";
1220 public boolean hasPayloadKey() {
1221 return ((bitField0_ & 0x00000008) != 0);
1222 }
1232 public java.lang.String getPayloadKey() {
1233 java.lang.Object ref = payloadKey_;
1234 if (!(ref instanceof java.lang.String)) {
1235 com.google.protobuf.ByteString bs =
1236 (com.google.protobuf.ByteString) ref;
1237 java.lang.String s = bs.toStringUtf8();
1238 if (bs.isValidUtf8()) {
1239 payloadKey_ = s;
1240 }
1241 return s;
1242 } else {
1243 return (java.lang.String) ref;
1244 }
1245 }
1255 public com.google.protobuf.ByteString
1257 java.lang.Object ref = payloadKey_;
1258 if (ref instanceof String) {
1259 com.google.protobuf.ByteString b =
1260 com.google.protobuf.ByteString.copyFromUtf8(
1261 (java.lang.String) ref);
1262 payloadKey_ = b;
1263 return b;
1264 } else {
1265 return (com.google.protobuf.ByteString) ref;
1266 }
1267 }
1279 java.lang.String value) {
1280 if (value == null) { throw new NullPointerException(); }
1281 payloadKey_ = value;
1282 bitField0_ |= 0x00000008;
1283 onChanged();
1284 return this;
1285 }
1296 payloadKey_ = getDefaultInstance().getPayloadKey();
1297 bitField0_ = (bitField0_ & ~0x00000008);
1298 onChanged();
1299 return this;
1300 }
1312 com.google.protobuf.ByteString value) {
1313 if (value == null) { throw new NullPointerException(); }
1314 payloadKey_ = value;
1315 bitField0_ |= 0x00000008;
1316 onChanged();
1317 return this;
1318 }
1319
1320 private java.lang.Object payloadValue_ = "";
1325 public boolean hasPayloadValue() {
1326 return ((bitField0_ & 0x00000010) != 0);
1327 }
1332 public java.lang.String getPayloadValue() {
1333 java.lang.Object ref = payloadValue_;
1334 if (!(ref instanceof java.lang.String)) {
1335 com.google.protobuf.ByteString bs =
1336 (com.google.protobuf.ByteString) ref;
1337 java.lang.String s = bs.toStringUtf8();
1338 if (bs.isValidUtf8()) {
1339 payloadValue_ = s;
1340 }
1341 return s;
1342 } else {
1343 return (java.lang.String) ref;
1344 }
1345 }
1350 public com.google.protobuf.ByteString
1352 java.lang.Object ref = payloadValue_;
1353 if (ref instanceof String) {
1354 com.google.protobuf.ByteString b =
1355 com.google.protobuf.ByteString.copyFromUtf8(
1356 (java.lang.String) ref);
1357 payloadValue_ = b;
1358 return b;
1359 } else {
1360 return (com.google.protobuf.ByteString) ref;
1361 }
1362 }
1369 java.lang.String value) {
1370 if (value == null) { throw new NullPointerException(); }
1371 payloadValue_ = value;
1372 bitField0_ |= 0x00000010;
1373 onChanged();
1374 return this;
1375 }
1381 payloadValue_ = getDefaultInstance().getPayloadValue();
1382 bitField0_ = (bitField0_ & ~0x00000010);
1383 onChanged();
1384 return this;
1385 }
1392 com.google.protobuf.ByteString value) {
1393 if (value == null) { throw new NullPointerException(); }
1394 payloadValue_ = value;
1395 bitField0_ |= 0x00000010;
1396 onChanged();
1397 return this;
1398 }
1399 @java.lang.Override
1401 final com.google.protobuf.UnknownFieldSet unknownFields) {
1402 return super.setUnknownFields(unknownFields);
1403 }
1404
1405 @java.lang.Override
1407 final com.google.protobuf.UnknownFieldSet unknownFields) {
1408 return super.mergeUnknownFields(unknownFields);
1409 }
1410
1411
1412 // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto.Annotation)
1413 }
1414
1415 // @@protoc_insertion_point(class_scope:operations_research.MPModelProto.Annotation)
1416 private static final com.google.ortools.linearsolver.MPModelProto.Annotation DEFAULT_INSTANCE;
1417 static {
1418 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto.Annotation();
1419 }
1420
1422 return DEFAULT_INSTANCE;
1423 }
1424
1425 @java.lang.Deprecated public static final com.google.protobuf.Parser<Annotation>
1426 PARSER = new com.google.protobuf.AbstractParser<Annotation>() {
1427 @java.lang.Override
1428 public Annotation parsePartialFrom(
1429 com.google.protobuf.CodedInputStream input,
1430 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1431 throws com.google.protobuf.InvalidProtocolBufferException {
1432 Builder builder = newBuilder();
1433 try {
1434 builder.mergeFrom(input, extensionRegistry);
1435 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1436 throw e.setUnfinishedMessage(builder.buildPartial());
1437 } catch (com.google.protobuf.UninitializedMessageException e) {
1438 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1439 } catch (java.io.IOException e) {
1440 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1441 .setUnfinishedMessage(builder.buildPartial());
1442 }
1443 return builder.buildPartial();
1444 }
1445 };
1446
1447 public static com.google.protobuf.Parser<Annotation> parser() {
1448 return PARSER;
1449 }
1450
1451 @java.lang.Override
1452 public com.google.protobuf.Parser<Annotation> getParserForType() {
1453 return PARSER;
1454 }
1455
1456 @java.lang.Override
1460
1461 }
1462
1463 private int bitField0_;
1464 public static final int VARIABLE_FIELD_NUMBER = 3;
1465 @SuppressWarnings("serial")
1466 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_;
1474 @java.lang.Override
1475 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
1476 return variable_;
1477 }
1485 @java.lang.Override
1486 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1488 return variable_;
1489 }
1497 @java.lang.Override
1498 public int getVariableCount() {
1499 return variable_.size();
1500 }
1508 @java.lang.Override
1510 return variable_.get(index);
1511 }
1519 @java.lang.Override
1521 int index) {
1522 return variable_.get(index);
1523 }
1524
1525 public static final int CONSTRAINT_FIELD_NUMBER = 4;
1526 @SuppressWarnings("serial")
1527 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_;
1535 @java.lang.Override
1536 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
1537 return constraint_;
1538 }
1546 @java.lang.Override
1547 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1549 return constraint_;
1550 }
1558 @java.lang.Override
1559 public int getConstraintCount() {
1560 return constraint_.size();
1561 }
1569 @java.lang.Override
1571 return constraint_.get(index);
1572 }
1580 @java.lang.Override
1582 int index) {
1583 return constraint_.get(index);
1584 }
1585
1586 public static final int GENERAL_CONSTRAINT_FIELD_NUMBER = 7;
1587 @SuppressWarnings("serial")
1588 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_;
1597 @java.lang.Override
1598 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
1599 return generalConstraint_;
1600 }
1609 @java.lang.Override
1610 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
1612 return generalConstraint_;
1613 }
1622 @java.lang.Override
1624 return generalConstraint_.size();
1625 }
1634 @java.lang.Override
1636 return generalConstraint_.get(index);
1637 }
1646 @java.lang.Override
1648 int index) {
1649 return generalConstraint_.get(index);
1650 }
1651
1652 public static final int MAXIMIZE_FIELD_NUMBER = 1;
1653 private boolean maximize_ = false;
1662 @java.lang.Override
1663 public boolean hasMaximize() {
1664 return ((bitField0_ & 0x00000001) != 0);
1665 }
1674 @java.lang.Override
1675 public boolean getMaximize() {
1676 return maximize_;
1677 }
1678
1679 public static final int OBJECTIVE_OFFSET_FIELD_NUMBER = 2;
1680 private double objectiveOffset_ = 0D;
1689 @java.lang.Override
1690 public boolean hasObjectiveOffset() {
1691 return ((bitField0_ & 0x00000002) != 0);
1692 }
1701 @java.lang.Override
1702 public double getObjectiveOffset() {
1703 return objectiveOffset_;
1704 }
1705
1706 public static final int QUADRATIC_OBJECTIVE_FIELD_NUMBER = 8;
1707 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
1717 @java.lang.Override
1718 public boolean hasQuadraticObjective() {
1719 return ((bitField0_ & 0x00000004) != 0);
1720 }
1730 @java.lang.Override
1732 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1733 }
1742 @java.lang.Override
1744 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1745 }
1746
1747 public static final int NAME_FIELD_NUMBER = 5;
1748 @SuppressWarnings("serial")
1749 private volatile java.lang.Object name_ = "";
1758 @java.lang.Override
1759 public boolean hasName() {
1760 return ((bitField0_ & 0x00000008) != 0);
1761 }
1770 @java.lang.Override
1771 public java.lang.String getName() {
1772 java.lang.Object ref = name_;
1773 if (ref instanceof java.lang.String) {
1774 return (java.lang.String) ref;
1775 } else {
1776 com.google.protobuf.ByteString bs =
1777 (com.google.protobuf.ByteString) ref;
1778 java.lang.String s = bs.toStringUtf8();
1779 if (bs.isValidUtf8()) {
1780 name_ = s;
1781 }
1782 return s;
1783 }
1784 }
1793 @java.lang.Override
1794 public com.google.protobuf.ByteString
1796 java.lang.Object ref = name_;
1797 if (ref instanceof java.lang.String) {
1798 com.google.protobuf.ByteString b =
1799 com.google.protobuf.ByteString.copyFromUtf8(
1800 (java.lang.String) ref);
1801 name_ = b;
1802 return b;
1803 } else {
1804 return (com.google.protobuf.ByteString) ref;
1805 }
1806 }
1807
1808 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
1828 @java.lang.Override
1829 public boolean hasSolutionHint() {
1830 return ((bitField0_ & 0x00000010) != 0);
1831 }
1850 @java.lang.Override
1852 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1853 }
1871 @java.lang.Override
1873 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1874 }
1875
1876 public static final int ANNOTATION_FIELD_NUMBER = 9;
1877 @SuppressWarnings("serial")
1878 private java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> annotation_;
1882 @java.lang.Override
1883 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> getAnnotationList() {
1884 return annotation_;
1885 }
1889 @java.lang.Override
1890 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
1892 return annotation_;
1893 }
1897 @java.lang.Override
1898 public int getAnnotationCount() {
1899 return annotation_.size();
1900 }
1904 @java.lang.Override
1906 return annotation_.get(index);
1907 }
1911 @java.lang.Override
1913 int index) {
1914 return annotation_.get(index);
1915 }
1916
1917 private byte memoizedIsInitialized = -1;
1918 @java.lang.Override
1919 public final boolean isInitialized() {
1920 byte isInitialized = memoizedIsInitialized;
1921 if (isInitialized == 1) return true;
1922 if (isInitialized == 0) return false;
1923
1924 memoizedIsInitialized = 1;
1925 return true;
1926 }
1927
1928 @java.lang.Override
1929 public void writeTo(com.google.protobuf.CodedOutputStream output)
1930 throws java.io.IOException {
1931 if (((bitField0_ & 0x00000001) != 0)) {
1932 output.writeBool(1, maximize_);
1933 }
1934 if (((bitField0_ & 0x00000002) != 0)) {
1935 output.writeDouble(2, objectiveOffset_);
1936 }
1937 for (int i = 0; i < variable_.size(); i++) {
1938 output.writeMessage(3, variable_.get(i));
1939 }
1940 for (int i = 0; i < constraint_.size(); i++) {
1941 output.writeMessage(4, constraint_.get(i));
1942 }
1943 if (((bitField0_ & 0x00000008) != 0)) {
1944 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
1945 }
1946 if (((bitField0_ & 0x00000010) != 0)) {
1947 output.writeMessage(6, getSolutionHint());
1948 }
1949 for (int i = 0; i < generalConstraint_.size(); i++) {
1950 output.writeMessage(7, generalConstraint_.get(i));
1951 }
1952 if (((bitField0_ & 0x00000004) != 0)) {
1953 output.writeMessage(8, getQuadraticObjective());
1954 }
1955 for (int i = 0; i < annotation_.size(); i++) {
1956 output.writeMessage(9, annotation_.get(i));
1957 }
1958 getUnknownFields().writeTo(output);
1959 }
1960
1961 @java.lang.Override
1962 public int getSerializedSize() {
1963 int size = memoizedSize;
1964 if (size != -1) return size;
1965
1966 size = 0;
1967 if (((bitField0_ & 0x00000001) != 0)) {
1968 size += com.google.protobuf.CodedOutputStream
1969 .computeBoolSize(1, maximize_);
1970 }
1971 if (((bitField0_ & 0x00000002) != 0)) {
1972 size += com.google.protobuf.CodedOutputStream
1973 .computeDoubleSize(2, objectiveOffset_);
1974 }
1975 for (int i = 0; i < variable_.size(); i++) {
1976 size += com.google.protobuf.CodedOutputStream
1977 .computeMessageSize(3, variable_.get(i));
1978 }
1979 for (int i = 0; i < constraint_.size(); i++) {
1980 size += com.google.protobuf.CodedOutputStream
1981 .computeMessageSize(4, constraint_.get(i));
1982 }
1983 if (((bitField0_ & 0x00000008) != 0)) {
1984 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
1985 }
1986 if (((bitField0_ & 0x00000010) != 0)) {
1987 size += com.google.protobuf.CodedOutputStream
1988 .computeMessageSize(6, getSolutionHint());
1989 }
1990 for (int i = 0; i < generalConstraint_.size(); i++) {
1991 size += com.google.protobuf.CodedOutputStream
1992 .computeMessageSize(7, generalConstraint_.get(i));
1993 }
1994 if (((bitField0_ & 0x00000004) != 0)) {
1995 size += com.google.protobuf.CodedOutputStream
1996 .computeMessageSize(8, getQuadraticObjective());
1997 }
1998 for (int i = 0; i < annotation_.size(); i++) {
1999 size += com.google.protobuf.CodedOutputStream
2000 .computeMessageSize(9, annotation_.get(i));
2001 }
2002 size += getUnknownFields().getSerializedSize();
2003 memoizedSize = size;
2004 return size;
2005 }
2006
2007 @java.lang.Override
2008 public boolean equals(final java.lang.Object obj) {
2009 if (obj == this) {
2010 return true;
2011 }
2012 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto)) {
2013 return super.equals(obj);
2014 }
2015 com.google.ortools.linearsolver.MPModelProto other = (com.google.ortools.linearsolver.MPModelProto) obj;
2016
2017 if (!getVariableList()
2018 .equals(other.getVariableList())) return false;
2019 if (!getConstraintList()
2020 .equals(other.getConstraintList())) return false;
2022 .equals(other.getGeneralConstraintList())) return false;
2023 if (hasMaximize() != other.hasMaximize()) return false;
2024 if (hasMaximize()) {
2025 if (getMaximize()
2026 != other.getMaximize()) return false;
2027 }
2028 if (hasObjectiveOffset() != other.hasObjectiveOffset()) return false;
2029 if (hasObjectiveOffset()) {
2030 if (java.lang.Double.doubleToLongBits(getObjectiveOffset())
2031 != java.lang.Double.doubleToLongBits(
2032 other.getObjectiveOffset())) return false;
2033 }
2034 if (hasQuadraticObjective() != other.hasQuadraticObjective()) return false;
2035 if (hasQuadraticObjective()) {
2037 .equals(other.getQuadraticObjective())) return false;
2038 }
2039 if (hasName() != other.hasName()) return false;
2040 if (hasName()) {
2041 if (!getName()
2042 .equals(other.getName())) return false;
2043 }
2044 if (hasSolutionHint() != other.hasSolutionHint()) return false;
2045 if (hasSolutionHint()) {
2046 if (!getSolutionHint()
2047 .equals(other.getSolutionHint())) return false;
2048 }
2049 if (!getAnnotationList()
2050 .equals(other.getAnnotationList())) return false;
2051 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2052 return true;
2053 }
2054
2055 @java.lang.Override
2056 public int hashCode() {
2057 if (memoizedHashCode != 0) {
2058 return memoizedHashCode;
2059 }
2060 int hash = 41;
2061 hash = (19 * hash) + getDescriptor().hashCode();
2062 if (getVariableCount() > 0) {
2063 hash = (37 * hash) + VARIABLE_FIELD_NUMBER;
2064 hash = (53 * hash) + getVariableList().hashCode();
2065 }
2066 if (getConstraintCount() > 0) {
2067 hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER;
2068 hash = (53 * hash) + getConstraintList().hashCode();
2069 }
2070 if (getGeneralConstraintCount() > 0) {
2071 hash = (37 * hash) + GENERAL_CONSTRAINT_FIELD_NUMBER;
2072 hash = (53 * hash) + getGeneralConstraintList().hashCode();
2073 }
2074 if (hasMaximize()) {
2075 hash = (37 * hash) + MAXIMIZE_FIELD_NUMBER;
2076 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
2077 getMaximize());
2078 }
2079 if (hasObjectiveOffset()) {
2080 hash = (37 * hash) + OBJECTIVE_OFFSET_FIELD_NUMBER;
2081 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2082 java.lang.Double.doubleToLongBits(getObjectiveOffset()));
2083 }
2084 if (hasQuadraticObjective()) {
2085 hash = (37 * hash) + QUADRATIC_OBJECTIVE_FIELD_NUMBER;
2086 hash = (53 * hash) + getQuadraticObjective().hashCode();
2087 }
2088 if (hasName()) {
2089 hash = (37 * hash) + NAME_FIELD_NUMBER;
2090 hash = (53 * hash) + getName().hashCode();
2091 }
2092 if (hasSolutionHint()) {
2093 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
2094 hash = (53 * hash) + getSolutionHint().hashCode();
2095 }
2096 if (getAnnotationCount() > 0) {
2097 hash = (37 * hash) + ANNOTATION_FIELD_NUMBER;
2098 hash = (53 * hash) + getAnnotationList().hashCode();
2099 }
2100 hash = (29 * hash) + getUnknownFields().hashCode();
2101 memoizedHashCode = hash;
2102 return hash;
2103 }
2104
2106 java.nio.ByteBuffer data)
2107 throws com.google.protobuf.InvalidProtocolBufferException {
2108 return PARSER.parseFrom(data);
2109 }
2111 java.nio.ByteBuffer data,
2112 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2113 throws com.google.protobuf.InvalidProtocolBufferException {
2114 return PARSER.parseFrom(data, extensionRegistry);
2115 }
2117 com.google.protobuf.ByteString data)
2118 throws com.google.protobuf.InvalidProtocolBufferException {
2119 return PARSER.parseFrom(data);
2120 }
2122 com.google.protobuf.ByteString data,
2123 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2124 throws com.google.protobuf.InvalidProtocolBufferException {
2125 return PARSER.parseFrom(data, extensionRegistry);
2126 }
2128 throws com.google.protobuf.InvalidProtocolBufferException {
2129 return PARSER.parseFrom(data);
2130 }
2132 byte[] data,
2133 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2134 throws com.google.protobuf.InvalidProtocolBufferException {
2135 return PARSER.parseFrom(data, extensionRegistry);
2136 }
2137 public static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
2138 throws java.io.IOException {
2139 return com.google.protobuf.GeneratedMessageV3
2140 .parseWithIOException(PARSER, input);
2141 }
2143 java.io.InputStream input,
2144 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2145 throws java.io.IOException {
2146 return com.google.protobuf.GeneratedMessageV3
2147 .parseWithIOException(PARSER, input, extensionRegistry);
2148 }
2149
2151 throws java.io.IOException {
2152 return com.google.protobuf.GeneratedMessageV3
2153 .parseDelimitedWithIOException(PARSER, input);
2154 }
2155
2157 java.io.InputStream input,
2158 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2159 throws java.io.IOException {
2160 return com.google.protobuf.GeneratedMessageV3
2161 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
2162 }
2164 com.google.protobuf.CodedInputStream input)
2165 throws java.io.IOException {
2166 return com.google.protobuf.GeneratedMessageV3
2167 .parseWithIOException(PARSER, input);
2168 }
2170 com.google.protobuf.CodedInputStream input,
2171 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2172 throws java.io.IOException {
2173 return com.google.protobuf.GeneratedMessageV3
2174 .parseWithIOException(PARSER, input, extensionRegistry);
2175 }
2176
2177 @java.lang.Override
2178 public Builder newBuilderForType() { return newBuilder(); }
2179 public static Builder newBuilder() {
2180 return DEFAULT_INSTANCE.toBuilder();
2181 }
2182 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype) {
2183 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2184 }
2185 @java.lang.Override
2187 return this == DEFAULT_INSTANCE
2188 ? new Builder() : new Builder().mergeFrom(this);
2189 }
2190
2191 @java.lang.Override
2193 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2194 Builder builder = new Builder(parent);
2195 return builder;
2196 }
2204 public static final class Builder extends
2205 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
2206 // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto)
2207 com.google.ortools.linearsolver.MPModelProtoOrBuilder {
2208 public static final com.google.protobuf.Descriptors.Descriptor
2210 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2211 }
2212
2213 @java.lang.Override
2214 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
2216 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
2217 .ensureFieldAccessorsInitialized(
2218 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
2219 }
2220
2221 // Construct using com.google.ortools.linearsolver.MPModelProto.newBuilder()
2222 private Builder() {
2223 maybeForceBuilderInitialization();
2224 }
2225
2226 private Builder(
2227 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2228 super(parent);
2229 maybeForceBuilderInitialization();
2230 }
2231 private void maybeForceBuilderInitialization() {
2232 if (com.google.protobuf.GeneratedMessageV3
2233 .alwaysUseFieldBuilders) {
2234 getVariableFieldBuilder();
2235 getConstraintFieldBuilder();
2236 getGeneralConstraintFieldBuilder();
2237 getQuadraticObjectiveFieldBuilder();
2238 getSolutionHintFieldBuilder();
2239 getAnnotationFieldBuilder();
2240 }
2241 }
2242 @java.lang.Override
2243 public Builder clear() {
2244 super.clear();
2245 bitField0_ = 0;
2246 if (variableBuilder_ == null) {
2247 variable_ = java.util.Collections.emptyList();
2248 } else {
2249 variable_ = null;
2250 variableBuilder_.clear();
2251 }
2252 bitField0_ = (bitField0_ & ~0x00000001);
2253 if (constraintBuilder_ == null) {
2254 constraint_ = java.util.Collections.emptyList();
2255 } else {
2256 constraint_ = null;
2257 constraintBuilder_.clear();
2258 }
2259 bitField0_ = (bitField0_ & ~0x00000002);
2260 if (generalConstraintBuilder_ == null) {
2261 generalConstraint_ = java.util.Collections.emptyList();
2262 } else {
2263 generalConstraint_ = null;
2264 generalConstraintBuilder_.clear();
2265 }
2266 bitField0_ = (bitField0_ & ~0x00000004);
2267 maximize_ = false;
2268 objectiveOffset_ = 0D;
2269 quadraticObjective_ = null;
2270 if (quadraticObjectiveBuilder_ != null) {
2271 quadraticObjectiveBuilder_.dispose();
2272 quadraticObjectiveBuilder_ = null;
2273 }
2274 name_ = "";
2275 solutionHint_ = null;
2276 if (solutionHintBuilder_ != null) {
2277 solutionHintBuilder_.dispose();
2278 solutionHintBuilder_ = null;
2279 }
2280 if (annotationBuilder_ == null) {
2281 annotation_ = java.util.Collections.emptyList();
2282 } else {
2283 annotation_ = null;
2284 annotationBuilder_.clear();
2285 }
2286 bitField0_ = (bitField0_ & ~0x00000100);
2287 return this;
2288 }
2289
2290 @java.lang.Override
2291 public com.google.protobuf.Descriptors.Descriptor
2293 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2294 }
2295
2296 @java.lang.Override
2298 return com.google.ortools.linearsolver.MPModelProto.getDefaultInstance();
2299 }
2300
2301 @java.lang.Override
2304 if (!result.isInitialized()) {
2305 throw newUninitializedMessageException(result);
2306 }
2307 return result;
2308 }
2309
2310 @java.lang.Override
2312 com.google.ortools.linearsolver.MPModelProto result = new com.google.ortools.linearsolver.MPModelProto(this);
2313 buildPartialRepeatedFields(result);
2314 if (bitField0_ != 0) { buildPartial0(result); }
2315 onBuilt();
2316 return result;
2317 }
2318
2319 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPModelProto result) {
2320 if (variableBuilder_ == null) {
2321 if (((bitField0_ & 0x00000001) != 0)) {
2322 variable_ = java.util.Collections.unmodifiableList(variable_);
2323 bitField0_ = (bitField0_ & ~0x00000001);
2324 }
2325 result.variable_ = variable_;
2326 } else {
2327 result.variable_ = variableBuilder_.build();
2328 }
2329 if (constraintBuilder_ == null) {
2330 if (((bitField0_ & 0x00000002) != 0)) {
2331 constraint_ = java.util.Collections.unmodifiableList(constraint_);
2332 bitField0_ = (bitField0_ & ~0x00000002);
2333 }
2334 result.constraint_ = constraint_;
2335 } else {
2336 result.constraint_ = constraintBuilder_.build();
2337 }
2338 if (generalConstraintBuilder_ == null) {
2339 if (((bitField0_ & 0x00000004) != 0)) {
2340 generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
2341 bitField0_ = (bitField0_ & ~0x00000004);
2342 }
2343 result.generalConstraint_ = generalConstraint_;
2344 } else {
2345 result.generalConstraint_ = generalConstraintBuilder_.build();
2346 }
2347 if (annotationBuilder_ == null) {
2348 if (((bitField0_ & 0x00000100) != 0)) {
2349 annotation_ = java.util.Collections.unmodifiableList(annotation_);
2350 bitField0_ = (bitField0_ & ~0x00000100);
2351 }
2352 result.annotation_ = annotation_;
2353 } else {
2354 result.annotation_ = annotationBuilder_.build();
2355 }
2356 }
2357
2358 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto result) {
2359 int from_bitField0_ = bitField0_;
2360 int to_bitField0_ = 0;
2361 if (((from_bitField0_ & 0x00000008) != 0)) {
2362 result.maximize_ = maximize_;
2363 to_bitField0_ |= 0x00000001;
2364 }
2365 if (((from_bitField0_ & 0x00000010) != 0)) {
2366 result.objectiveOffset_ = objectiveOffset_;
2367 to_bitField0_ |= 0x00000002;
2368 }
2369 if (((from_bitField0_ & 0x00000020) != 0)) {
2370 result.quadraticObjective_ = quadraticObjectiveBuilder_ == null
2371 ? quadraticObjective_
2372 : quadraticObjectiveBuilder_.build();
2373 to_bitField0_ |= 0x00000004;
2374 }
2375 if (((from_bitField0_ & 0x00000040) != 0)) {
2376 result.name_ = name_;
2377 to_bitField0_ |= 0x00000008;
2378 }
2379 if (((from_bitField0_ & 0x00000080) != 0)) {
2380 result.solutionHint_ = solutionHintBuilder_ == null
2381 ? solutionHint_
2382 : solutionHintBuilder_.build();
2383 to_bitField0_ |= 0x00000010;
2384 }
2385 result.bitField0_ |= to_bitField0_;
2386 }
2387
2388 @java.lang.Override
2389 public Builder clone() {
2390 return super.clone();
2391 }
2392 @java.lang.Override
2394 com.google.protobuf.Descriptors.FieldDescriptor field,
2395 java.lang.Object value) {
2396 return super.setField(field, value);
2397 }
2398 @java.lang.Override
2400 com.google.protobuf.Descriptors.FieldDescriptor field) {
2401 return super.clearField(field);
2402 }
2403 @java.lang.Override
2405 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2406 return super.clearOneof(oneof);
2407 }
2408 @java.lang.Override
2410 com.google.protobuf.Descriptors.FieldDescriptor field,
2411 int index, java.lang.Object value) {
2412 return super.setRepeatedField(field, index, value);
2413 }
2414 @java.lang.Override
2416 com.google.protobuf.Descriptors.FieldDescriptor field,
2417 java.lang.Object value) {
2418 return super.addRepeatedField(field, value);
2419 }
2420 @java.lang.Override
2421 public Builder mergeFrom(com.google.protobuf.Message other) {
2422 if (other instanceof com.google.ortools.linearsolver.MPModelProto) {
2423 return mergeFrom((com.google.ortools.linearsolver.MPModelProto)other);
2424 } else {
2425 super.mergeFrom(other);
2426 return this;
2427 }
2428 }
2429
2430 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other) {
2431 if (other == com.google.ortools.linearsolver.MPModelProto.getDefaultInstance()) return this;
2432 if (variableBuilder_ == null) {
2433 if (!other.variable_.isEmpty()) {
2434 if (variable_.isEmpty()) {
2435 variable_ = other.variable_;
2436 bitField0_ = (bitField0_ & ~0x00000001);
2437 } else {
2438 ensureVariableIsMutable();
2439 variable_.addAll(other.variable_);
2440 }
2441 onChanged();
2442 }
2443 } else {
2444 if (!other.variable_.isEmpty()) {
2445 if (variableBuilder_.isEmpty()) {
2446 variableBuilder_.dispose();
2447 variableBuilder_ = null;
2448 variable_ = other.variable_;
2449 bitField0_ = (bitField0_ & ~0x00000001);
2450 variableBuilder_ =
2451 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
2452 getVariableFieldBuilder() : null;
2453 } else {
2454 variableBuilder_.addAllMessages(other.variable_);
2455 }
2456 }
2457 }
2458 if (constraintBuilder_ == null) {
2459 if (!other.constraint_.isEmpty()) {
2460 if (constraint_.isEmpty()) {
2461 constraint_ = other.constraint_;
2462 bitField0_ = (bitField0_ & ~0x00000002);
2463 } else {
2464 ensureConstraintIsMutable();
2465 constraint_.addAll(other.constraint_);
2466 }
2467 onChanged();
2468 }
2469 } else {
2470 if (!other.constraint_.isEmpty()) {
2471 if (constraintBuilder_.isEmpty()) {
2472 constraintBuilder_.dispose();
2473 constraintBuilder_ = null;
2474 constraint_ = other.constraint_;
2475 bitField0_ = (bitField0_ & ~0x00000002);
2476 constraintBuilder_ =
2477 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
2478 getConstraintFieldBuilder() : null;
2479 } else {
2480 constraintBuilder_.addAllMessages(other.constraint_);
2481 }
2482 }
2483 }
2484 if (generalConstraintBuilder_ == null) {
2485 if (!other.generalConstraint_.isEmpty()) {
2486 if (generalConstraint_.isEmpty()) {
2487 generalConstraint_ = other.generalConstraint_;
2488 bitField0_ = (bitField0_ & ~0x00000004);
2489 } else {
2490 ensureGeneralConstraintIsMutable();
2491 generalConstraint_.addAll(other.generalConstraint_);
2492 }
2493 onChanged();
2494 }
2495 } else {
2496 if (!other.generalConstraint_.isEmpty()) {
2497 if (generalConstraintBuilder_.isEmpty()) {
2498 generalConstraintBuilder_.dispose();
2499 generalConstraintBuilder_ = null;
2500 generalConstraint_ = other.generalConstraint_;
2501 bitField0_ = (bitField0_ & ~0x00000004);
2502 generalConstraintBuilder_ =
2503 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
2504 getGeneralConstraintFieldBuilder() : null;
2505 } else {
2506 generalConstraintBuilder_.addAllMessages(other.generalConstraint_);
2507 }
2508 }
2509 }
2510 if (other.hasMaximize()) {
2511 setMaximize(other.getMaximize());
2512 }
2513 if (other.hasObjectiveOffset()) {
2514 setObjectiveOffset(other.getObjectiveOffset());
2515 }
2516 if (other.hasQuadraticObjective()) {
2517 mergeQuadraticObjective(other.getQuadraticObjective());
2518 }
2519 if (other.hasName()) {
2520 name_ = other.name_;
2521 bitField0_ |= 0x00000040;
2522 onChanged();
2523 }
2524 if (other.hasSolutionHint()) {
2525 mergeSolutionHint(other.getSolutionHint());
2526 }
2527 if (annotationBuilder_ == null) {
2528 if (!other.annotation_.isEmpty()) {
2529 if (annotation_.isEmpty()) {
2530 annotation_ = other.annotation_;
2531 bitField0_ = (bitField0_ & ~0x00000100);
2532 } else {
2533 ensureAnnotationIsMutable();
2534 annotation_.addAll(other.annotation_);
2535 }
2536 onChanged();
2537 }
2538 } else {
2539 if (!other.annotation_.isEmpty()) {
2540 if (annotationBuilder_.isEmpty()) {
2541 annotationBuilder_.dispose();
2542 annotationBuilder_ = null;
2543 annotation_ = other.annotation_;
2544 bitField0_ = (bitField0_ & ~0x00000100);
2545 annotationBuilder_ =
2546 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
2547 getAnnotationFieldBuilder() : null;
2548 } else {
2549 annotationBuilder_.addAllMessages(other.annotation_);
2550 }
2551 }
2552 }
2553 this.mergeUnknownFields(other.getUnknownFields());
2554 onChanged();
2555 return this;
2556 }
2557
2558 @java.lang.Override
2559 public final boolean isInitialized() {
2560 return true;
2561 }
2562
2563 @java.lang.Override
2565 com.google.protobuf.CodedInputStream input,
2566 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2567 throws java.io.IOException {
2568 if (extensionRegistry == null) {
2569 throw new java.lang.NullPointerException();
2570 }
2571 try {
2572 boolean done = false;
2573 while (!done) {
2574 int tag = input.readTag();
2575 switch (tag) {
2576 case 0:
2577 done = true;
2578 break;
2579 case 8: {
2580 maximize_ = input.readBool();
2581 bitField0_ |= 0x00000008;
2582 break;
2583 } // case 8
2584 case 17: {
2585 objectiveOffset_ = input.readDouble();
2586 bitField0_ |= 0x00000010;
2587 break;
2588 } // case 17
2589 case 26: {
2591 input.readMessage(
2592 com.google.ortools.linearsolver.MPVariableProto.PARSER,
2593 extensionRegistry);
2594 if (variableBuilder_ == null) {
2595 ensureVariableIsMutable();
2596 variable_.add(m);
2597 } else {
2598 variableBuilder_.addMessage(m);
2599 }
2600 break;
2601 } // case 26
2602 case 34: {
2604 input.readMessage(
2605 com.google.ortools.linearsolver.MPConstraintProto.PARSER,
2606 extensionRegistry);
2607 if (constraintBuilder_ == null) {
2608 ensureConstraintIsMutable();
2609 constraint_.add(m);
2610 } else {
2611 constraintBuilder_.addMessage(m);
2612 }
2613 break;
2614 } // case 34
2615 case 42: {
2616 name_ = input.readBytes();
2617 bitField0_ |= 0x00000040;
2618 break;
2619 } // case 42
2620 case 50: {
2621 input.readMessage(
2622 getSolutionHintFieldBuilder().getBuilder(),
2623 extensionRegistry);
2624 bitField0_ |= 0x00000080;
2625 break;
2626 } // case 50
2627 case 58: {
2629 input.readMessage(
2630 com.google.ortools.linearsolver.MPGeneralConstraintProto.PARSER,
2631 extensionRegistry);
2632 if (generalConstraintBuilder_ == null) {
2633 ensureGeneralConstraintIsMutable();
2634 generalConstraint_.add(m);
2635 } else {
2636 generalConstraintBuilder_.addMessage(m);
2637 }
2638 break;
2639 } // case 58
2640 case 66: {
2641 input.readMessage(
2642 getQuadraticObjectiveFieldBuilder().getBuilder(),
2643 extensionRegistry);
2644 bitField0_ |= 0x00000020;
2645 break;
2646 } // case 66
2647 case 74: {
2649 input.readMessage(
2650 com.google.ortools.linearsolver.MPModelProto.Annotation.PARSER,
2651 extensionRegistry);
2652 if (annotationBuilder_ == null) {
2653 ensureAnnotationIsMutable();
2654 annotation_.add(m);
2655 } else {
2656 annotationBuilder_.addMessage(m);
2657 }
2658 break;
2659 } // case 74
2660 default: {
2661 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2662 done = true; // was an endgroup tag
2663 }
2664 break;
2665 } // default:
2666 } // switch (tag)
2667 } // while (!done)
2668 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2669 throw e.unwrapIOException();
2670 } finally {
2671 onChanged();
2672 } // finally
2673 return this;
2674 }
2675 private int bitField0_;
2676
2677 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_ =
2678 java.util.Collections.emptyList();
2679 private void ensureVariableIsMutable() {
2680 if (!((bitField0_ & 0x00000001) != 0)) {
2681 variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>(variable_);
2682 bitField0_ |= 0x00000001;
2683 }
2684 }
2685
2686 private com.google.protobuf.RepeatedFieldBuilderV3<
2687 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> variableBuilder_;
2688
2696 public java.util.List<com.google.ortools.linearsolver.MPVariableProto> getVariableList() {
2697 if (variableBuilder_ == null) {
2698 return java.util.Collections.unmodifiableList(variable_);
2699 } else {
2700 return variableBuilder_.getMessageList();
2701 }
2702 }
2710 public int getVariableCount() {
2711 if (variableBuilder_ == null) {
2712 return variable_.size();
2713 } else {
2714 return variableBuilder_.getCount();
2715 }
2716 }
2725 if (variableBuilder_ == null) {
2726 return variable_.get(index);
2727 } else {
2728 return variableBuilder_.getMessage(index);
2729 }
2730 }
2739 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2740 if (variableBuilder_ == null) {
2741 if (value == null) {
2742 throw new NullPointerException();
2743 }
2744 ensureVariableIsMutable();
2745 variable_.set(index, value);
2746 onChanged();
2747 } else {
2748 variableBuilder_.setMessage(index, value);
2749 }
2750 return this;
2751 }
2760 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2761 if (variableBuilder_ == null) {
2762 ensureVariableIsMutable();
2763 variable_.set(index, builderForValue.build());
2764 onChanged();
2765 } else {
2766 variableBuilder_.setMessage(index, builderForValue.build());
2767 }
2768 return this;
2769 }
2777 public Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value) {
2778 if (variableBuilder_ == null) {
2779 if (value == null) {
2780 throw new NullPointerException();
2781 }
2782 ensureVariableIsMutable();
2783 variable_.add(value);
2784 onChanged();
2785 } else {
2786 variableBuilder_.addMessage(value);
2787 }
2788 return this;
2789 }
2798 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2799 if (variableBuilder_ == null) {
2800 if (value == null) {
2801 throw new NullPointerException();
2802 }
2803 ensureVariableIsMutable();
2804 variable_.add(index, value);
2805 onChanged();
2806 } else {
2807 variableBuilder_.addMessage(index, value);
2808 }
2809 return this;
2810 }
2819 com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2820 if (variableBuilder_ == null) {
2821 ensureVariableIsMutable();
2822 variable_.add(builderForValue.build());
2823 onChanged();
2824 } else {
2825 variableBuilder_.addMessage(builderForValue.build());
2826 }
2827 return this;
2828 }
2837 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2838 if (variableBuilder_ == null) {
2839 ensureVariableIsMutable();
2840 variable_.add(index, builderForValue.build());
2841 onChanged();
2842 } else {
2843 variableBuilder_.addMessage(index, builderForValue.build());
2844 }
2845 return this;
2846 }
2855 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto> values) {
2856 if (variableBuilder_ == null) {
2857 ensureVariableIsMutable();
2858 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2859 values, variable_);
2860 onChanged();
2861 } else {
2862 variableBuilder_.addAllMessages(values);
2863 }
2864 return this;
2865 }
2874 if (variableBuilder_ == null) {
2875 variable_ = java.util.Collections.emptyList();
2876 bitField0_ = (bitField0_ & ~0x00000001);
2877 onChanged();
2878 } else {
2879 variableBuilder_.clear();
2880 }
2881 return this;
2882 }
2890 public Builder removeVariable(int index) {
2891 if (variableBuilder_ == null) {
2892 ensureVariableIsMutable();
2893 variable_.remove(index);
2894 onChanged();
2895 } else {
2896 variableBuilder_.remove(index);
2897 }
2898 return this;
2899 }
2908 int index) {
2909 return getVariableFieldBuilder().getBuilder(index);
2910 }
2919 int index) {
2920 if (variableBuilder_ == null) {
2921 return variable_.get(index); } else {
2922 return variableBuilder_.getMessageOrBuilder(index);
2923 }
2924 }
2932 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2934 if (variableBuilder_ != null) {
2935 return variableBuilder_.getMessageOrBuilderList();
2936 } else {
2937 return java.util.Collections.unmodifiableList(variable_);
2938 }
2939 }
2948 return getVariableFieldBuilder().addBuilder(
2949 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2950 }
2959 int index) {
2960 return getVariableFieldBuilder().addBuilder(
2961 index, com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2962 }
2970 public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
2972 return getVariableFieldBuilder().getBuilderList();
2973 }
2974 private com.google.protobuf.RepeatedFieldBuilderV3<
2975 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2976 getVariableFieldBuilder() {
2977 if (variableBuilder_ == null) {
2978 variableBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2979 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>(
2980 variable_,
2981 ((bitField0_ & 0x00000001) != 0),
2982 getParentForChildren(),
2983 isClean());
2984 variable_ = null;
2985 }
2986 return variableBuilder_;
2987 }
2988
2989 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_ =
2990 java.util.Collections.emptyList();
2991 private void ensureConstraintIsMutable() {
2992 if (!((bitField0_ & 0x00000002) != 0)) {
2993 constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>(constraint_);
2994 bitField0_ |= 0x00000002;
2995 }
2996 }
2997
2998 private com.google.protobuf.RepeatedFieldBuilderV3<
2999 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
3000
3008 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto> getConstraintList() {
3009 if (constraintBuilder_ == null) {
3010 return java.util.Collections.unmodifiableList(constraint_);
3011 } else {
3012 return constraintBuilder_.getMessageList();
3013 }
3014 }
3022 public int getConstraintCount() {
3023 if (constraintBuilder_ == null) {
3024 return constraint_.size();
3025 } else {
3026 return constraintBuilder_.getCount();
3027 }
3028 }
3037 if (constraintBuilder_ == null) {
3038 return constraint_.get(index);
3039 } else {
3040 return constraintBuilder_.getMessage(index);
3041 }
3042 }
3051 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
3052 if (constraintBuilder_ == null) {
3053 if (value == null) {
3054 throw new NullPointerException();
3055 }
3056 ensureConstraintIsMutable();
3057 constraint_.set(index, value);
3058 onChanged();
3059 } else {
3060 constraintBuilder_.setMessage(index, value);
3061 }
3062 return this;
3063 }
3072 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3073 if (constraintBuilder_ == null) {
3074 ensureConstraintIsMutable();
3075 constraint_.set(index, builderForValue.build());
3076 onChanged();
3077 } else {
3078 constraintBuilder_.setMessage(index, builderForValue.build());
3079 }
3080 return this;
3081 }
3089 public Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value) {
3090 if (constraintBuilder_ == null) {
3091 if (value == null) {
3092 throw new NullPointerException();
3093 }
3094 ensureConstraintIsMutable();
3095 constraint_.add(value);
3096 onChanged();
3097 } else {
3098 constraintBuilder_.addMessage(value);
3099 }
3100 return this;
3101 }
3110 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
3111 if (constraintBuilder_ == null) {
3112 if (value == null) {
3113 throw new NullPointerException();
3114 }
3115 ensureConstraintIsMutable();
3116 constraint_.add(index, value);
3117 onChanged();
3118 } else {
3119 constraintBuilder_.addMessage(index, value);
3120 }
3121 return this;
3122 }
3131 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3132 if (constraintBuilder_ == null) {
3133 ensureConstraintIsMutable();
3134 constraint_.add(builderForValue.build());
3135 onChanged();
3136 } else {
3137 constraintBuilder_.addMessage(builderForValue.build());
3138 }
3139 return this;
3140 }
3149 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3150 if (constraintBuilder_ == null) {
3151 ensureConstraintIsMutable();
3152 constraint_.add(index, builderForValue.build());
3153 onChanged();
3154 } else {
3155 constraintBuilder_.addMessage(index, builderForValue.build());
3156 }
3157 return this;
3158 }
3167 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto> values) {
3168 if (constraintBuilder_ == null) {
3169 ensureConstraintIsMutable();
3170 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3171 values, constraint_);
3172 onChanged();
3173 } else {
3174 constraintBuilder_.addAllMessages(values);
3175 }
3176 return this;
3177 }
3186 if (constraintBuilder_ == null) {
3187 constraint_ = java.util.Collections.emptyList();
3188 bitField0_ = (bitField0_ & ~0x00000002);
3189 onChanged();
3190 } else {
3191 constraintBuilder_.clear();
3192 }
3193 return this;
3194 }
3202 public Builder removeConstraint(int index) {
3203 if (constraintBuilder_ == null) {
3204 ensureConstraintIsMutable();
3205 constraint_.remove(index);
3206 onChanged();
3207 } else {
3208 constraintBuilder_.remove(index);
3209 }
3210 return this;
3211 }
3220 int index) {
3221 return getConstraintFieldBuilder().getBuilder(index);
3222 }
3231 int index) {
3232 if (constraintBuilder_ == null) {
3233 return constraint_.get(index); } else {
3234 return constraintBuilder_.getMessageOrBuilder(index);
3235 }
3236 }
3244 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3246 if (constraintBuilder_ != null) {
3247 return constraintBuilder_.getMessageOrBuilderList();
3248 } else {
3249 return java.util.Collections.unmodifiableList(constraint_);
3250 }
3251 }
3260 return getConstraintFieldBuilder().addBuilder(
3261 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3262 }
3271 int index) {
3272 return getConstraintFieldBuilder().addBuilder(
3273 index, com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3274 }
3282 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
3284 return getConstraintFieldBuilder().getBuilderList();
3285 }
3286 private com.google.protobuf.RepeatedFieldBuilderV3<
3287 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3288 getConstraintFieldBuilder() {
3289 if (constraintBuilder_ == null) {
3290 constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
3291 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
3292 constraint_,
3293 ((bitField0_ & 0x00000002) != 0),
3294 getParentForChildren(),
3295 isClean());
3296 constraint_ = null;
3297 }
3298 return constraintBuilder_;
3299 }
3300
3301 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_ =
3302 java.util.Collections.emptyList();
3303 private void ensureGeneralConstraintIsMutable() {
3304 if (!((bitField0_ & 0x00000004) != 0)) {
3305 generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>(generalConstraint_);
3306 bitField0_ |= 0x00000004;
3307 }
3308 }
3309
3310 private com.google.protobuf.RepeatedFieldBuilderV3<
3311 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> generalConstraintBuilder_;
3312
3321 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> getGeneralConstraintList() {
3322 if (generalConstraintBuilder_ == null) {
3323 return java.util.Collections.unmodifiableList(generalConstraint_);
3324 } else {
3325 return generalConstraintBuilder_.getMessageList();
3326 }
3327 }
3337 if (generalConstraintBuilder_ == null) {
3338 return generalConstraint_.size();
3339 } else {
3340 return generalConstraintBuilder_.getCount();
3341 }
3342 }
3352 if (generalConstraintBuilder_ == null) {
3353 return generalConstraint_.get(index);
3354 } else {
3355 return generalConstraintBuilder_.getMessage(index);
3356 }
3357 }
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_.set(index, value);
3374 onChanged();
3375 } else {
3376 generalConstraintBuilder_.setMessage(index, value);
3377 }
3378 return this;
3379 }
3389 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3390 if (generalConstraintBuilder_ == null) {
3391 ensureGeneralConstraintIsMutable();
3392 generalConstraint_.set(index, builderForValue.build());
3393 onChanged();
3394 } else {
3395 generalConstraintBuilder_.setMessage(index, builderForValue.build());
3396 }
3397 return this;
3398 }
3407 public Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3408 if (generalConstraintBuilder_ == null) {
3409 if (value == null) {
3410 throw new NullPointerException();
3411 }
3412 ensureGeneralConstraintIsMutable();
3413 generalConstraint_.add(value);
3414 onChanged();
3415 } else {
3416 generalConstraintBuilder_.addMessage(value);
3417 }
3418 return this;
3419 }
3429 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3430 if (generalConstraintBuilder_ == null) {
3431 if (value == null) {
3432 throw new NullPointerException();
3433 }
3434 ensureGeneralConstraintIsMutable();
3435 generalConstraint_.add(index, value);
3436 onChanged();
3437 } else {
3438 generalConstraintBuilder_.addMessage(index, value);
3439 }
3440 return this;
3441 }
3451 com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3452 if (generalConstraintBuilder_ == null) {
3453 ensureGeneralConstraintIsMutable();
3454 generalConstraint_.add(builderForValue.build());
3455 onChanged();
3456 } else {
3457 generalConstraintBuilder_.addMessage(builderForValue.build());
3458 }
3459 return this;
3460 }
3470 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3471 if (generalConstraintBuilder_ == null) {
3472 ensureGeneralConstraintIsMutable();
3473 generalConstraint_.add(index, builderForValue.build());
3474 onChanged();
3475 } else {
3476 generalConstraintBuilder_.addMessage(index, builderForValue.build());
3477 }
3478 return this;
3479 }
3489 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto> values) {
3490 if (generalConstraintBuilder_ == null) {
3491 ensureGeneralConstraintIsMutable();
3492 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3493 values, generalConstraint_);
3494 onChanged();
3495 } else {
3496 generalConstraintBuilder_.addAllMessages(values);
3497 }
3498 return this;
3499 }
3509 if (generalConstraintBuilder_ == null) {
3510 generalConstraint_ = java.util.Collections.emptyList();
3511 bitField0_ = (bitField0_ & ~0x00000004);
3512 onChanged();
3513 } else {
3514 generalConstraintBuilder_.clear();
3515 }
3516 return this;
3517 }
3527 if (generalConstraintBuilder_ == null) {
3528 ensureGeneralConstraintIsMutable();
3529 generalConstraint_.remove(index);
3530 onChanged();
3531 } else {
3532 generalConstraintBuilder_.remove(index);
3533 }
3534 return this;
3535 }
3545 int index) {
3546 return getGeneralConstraintFieldBuilder().getBuilder(index);
3547 }
3557 int index) {
3558 if (generalConstraintBuilder_ == null) {
3559 return generalConstraint_.get(index); } else {
3560 return generalConstraintBuilder_.getMessageOrBuilder(index);
3561 }
3562 }
3571 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3573 if (generalConstraintBuilder_ != null) {
3574 return generalConstraintBuilder_.getMessageOrBuilderList();
3575 } else {
3576 return java.util.Collections.unmodifiableList(generalConstraint_);
3577 }
3578 }
3588 return getGeneralConstraintFieldBuilder().addBuilder(
3589 com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3590 }
3600 int index) {
3601 return getGeneralConstraintFieldBuilder().addBuilder(
3602 index, com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3603 }
3612 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder>
3614 return getGeneralConstraintFieldBuilder().getBuilderList();
3615 }
3616 private com.google.protobuf.RepeatedFieldBuilderV3<
3617 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3618 getGeneralConstraintFieldBuilder() {
3619 if (generalConstraintBuilder_ == null) {
3620 generalConstraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
3621 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>(
3622 generalConstraint_,
3623 ((bitField0_ & 0x00000004) != 0),
3624 getParentForChildren(),
3625 isClean());
3626 generalConstraint_ = null;
3627 }
3628 return generalConstraintBuilder_;
3629 }
3630
3631 private boolean maximize_ ;
3640 @java.lang.Override
3641 public boolean hasMaximize() {
3642 return ((bitField0_ & 0x00000008) != 0);
3643 }
3652 @java.lang.Override
3653 public boolean getMaximize() {
3654 return maximize_;
3655 }
3665 public Builder setMaximize(boolean value) {
3666
3667 maximize_ = value;
3668 bitField0_ |= 0x00000008;
3669 onChanged();
3670 return this;
3671 }
3681 bitField0_ = (bitField0_ & ~0x00000008);
3682 maximize_ = false;
3683 onChanged();
3684 return this;
3685 }
3686
3687 private double objectiveOffset_ ;
3696 @java.lang.Override
3697 public boolean hasObjectiveOffset() {
3698 return ((bitField0_ & 0x00000010) != 0);
3699 }
3708 @java.lang.Override
3709 public double getObjectiveOffset() {
3710 return objectiveOffset_;
3711 }
3721 public Builder setObjectiveOffset(double value) {
3722
3723 objectiveOffset_ = value;
3724 bitField0_ |= 0x00000010;
3725 onChanged();
3726 return this;
3727 }
3737 bitField0_ = (bitField0_ & ~0x00000010);
3738 objectiveOffset_ = 0D;
3739 onChanged();
3740 return this;
3741 }
3742
3743 private com.google.ortools.linearsolver.MPQuadraticObjective quadraticObjective_;
3744 private com.google.protobuf.SingleFieldBuilderV3<
3745 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder> quadraticObjectiveBuilder_;
3755 public boolean hasQuadraticObjective() {
3756 return ((bitField0_ & 0x00000020) != 0);
3757 }
3768 if (quadraticObjectiveBuilder_ == null) {
3769 return quadraticObjective_ == null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3770 } else {
3771 return quadraticObjectiveBuilder_.getMessage();
3772 }
3773 }
3782 public Builder setQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
3783 if (quadraticObjectiveBuilder_ == null) {
3784 if (value == null) {
3785 throw new NullPointerException();
3786 }
3787 quadraticObjective_ = value;
3788 } else {
3789 quadraticObjectiveBuilder_.setMessage(value);
3790 }
3791 bitField0_ |= 0x00000020;
3792 onChanged();
3793 return this;
3794 }
3804 com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue) {
3805 if (quadraticObjectiveBuilder_ == null) {
3806 quadraticObjective_ = builderForValue.build();
3807 } else {
3808 quadraticObjectiveBuilder_.setMessage(builderForValue.build());
3809 }
3810 bitField0_ |= 0x00000020;
3811 onChanged();
3812 return this;
3813 }
3822 public Builder mergeQuadraticObjective(com.google.ortools.linearsolver.MPQuadraticObjective value) {
3823 if (quadraticObjectiveBuilder_ == null) {
3824 if (((bitField0_ & 0x00000020) != 0) &&
3825 quadraticObjective_ != null &&
3826 quadraticObjective_ != com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance()) {
3827 getQuadraticObjectiveBuilder().mergeFrom(value);
3828 } else {
3829 quadraticObjective_ = value;
3830 }
3831 } else {
3832 quadraticObjectiveBuilder_.mergeFrom(value);
3833 }
3834 if (quadraticObjective_ != null) {
3835 bitField0_ |= 0x00000020;
3836 onChanged();
3837 }
3838 return this;
3839 }
3849 bitField0_ = (bitField0_ & ~0x00000020);
3850 quadraticObjective_ = null;
3851 if (quadraticObjectiveBuilder_ != null) {
3852 quadraticObjectiveBuilder_.dispose();
3853 quadraticObjectiveBuilder_ = null;
3854 }
3855 onChanged();
3856 return this;
3857 }
3867 bitField0_ |= 0x00000020;
3868 onChanged();
3869 return getQuadraticObjectiveFieldBuilder().getBuilder();
3870 }
3880 if (quadraticObjectiveBuilder_ != null) {
3881 return quadraticObjectiveBuilder_.getMessageOrBuilder();
3882 } else {
3883 return quadraticObjective_ == null ?
3884 com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3885 }
3886 }
3895 private com.google.protobuf.SingleFieldBuilderV3<
3896 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>
3897 getQuadraticObjectiveFieldBuilder() {
3898 if (quadraticObjectiveBuilder_ == null) {
3899 quadraticObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3900 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>(
3902 getParentForChildren(),
3903 isClean());
3904 quadraticObjective_ = null;
3905 }
3906 return quadraticObjectiveBuilder_;
3907 }
3908
3909 private java.lang.Object name_ = "";
3918 public boolean hasName() {
3919 return ((bitField0_ & 0x00000040) != 0);
3920 }
3929 public java.lang.String getName() {
3930 java.lang.Object ref = name_;
3931 if (!(ref instanceof java.lang.String)) {
3932 com.google.protobuf.ByteString bs =
3933 (com.google.protobuf.ByteString) ref;
3934 java.lang.String s = bs.toStringUtf8();
3935 if (bs.isValidUtf8()) {
3936 name_ = s;
3937 }
3938 return s;
3939 } else {
3940 return (java.lang.String) ref;
3941 }
3942 }
3951 public com.google.protobuf.ByteString
3953 java.lang.Object ref = name_;
3954 if (ref instanceof String) {
3955 com.google.protobuf.ByteString b =
3956 com.google.protobuf.ByteString.copyFromUtf8(
3957 (java.lang.String) ref);
3958 name_ = b;
3959 return b;
3960 } else {
3961 return (com.google.protobuf.ByteString) ref;
3962 }
3963 }
3974 java.lang.String value) {
3975 if (value == null) { throw new NullPointerException(); }
3976 name_ = value;
3977 bitField0_ |= 0x00000040;
3978 onChanged();
3979 return this;
3980 }
3990 name_ = getDefaultInstance().getName();
3991 bitField0_ = (bitField0_ & ~0x00000040);
3992 onChanged();
3993 return this;
3994 }
4005 com.google.protobuf.ByteString value) {
4006 if (value == null) { throw new NullPointerException(); }
4007 name_ = value;
4008 bitField0_ |= 0x00000040;
4009 onChanged();
4010 return this;
4011 }
4012
4014 private com.google.protobuf.SingleFieldBuilderV3<
4015 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
4034 public boolean hasSolutionHint() {
4035 return ((bitField0_ & 0x00000080) != 0);
4036 }
4056 if (solutionHintBuilder_ == null) {
4057 return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
4058 } else {
4059 return solutionHintBuilder_.getMessage();
4060 }
4061 }
4079 public Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
4080 if (solutionHintBuilder_ == null) {
4081 if (value == null) {
4082 throw new NullPointerException();
4083 }
4084 solutionHint_ = value;
4085 } else {
4086 solutionHintBuilder_.setMessage(value);
4087 }
4088 bitField0_ |= 0x00000080;
4089 onChanged();
4090 return this;
4091 }
4110 com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue) {
4111 if (solutionHintBuilder_ == null) {
4112 solutionHint_ = builderForValue.build();
4113 } else {
4114 solutionHintBuilder_.setMessage(builderForValue.build());
4115 }
4116 bitField0_ |= 0x00000080;
4117 onChanged();
4118 return this;
4119 }
4137 public Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value) {
4138 if (solutionHintBuilder_ == null) {
4139 if (((bitField0_ & 0x00000080) != 0) &&
4140 solutionHint_ != null &&
4141 solutionHint_ != com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance()) {
4142 getSolutionHintBuilder().mergeFrom(value);
4143 } else {
4144 solutionHint_ = value;
4145 }
4146 } else {
4147 solutionHintBuilder_.mergeFrom(value);
4148 }
4149 if (solutionHint_ != null) {
4150 bitField0_ |= 0x00000080;
4151 onChanged();
4152 }
4153 return this;
4154 }
4173 bitField0_ = (bitField0_ & ~0x00000080);
4174 solutionHint_ = null;
4175 if (solutionHintBuilder_ != null) {
4176 solutionHintBuilder_.dispose();
4177 solutionHintBuilder_ = null;
4178 }
4179 onChanged();
4180 return this;
4181 }
4200 bitField0_ |= 0x00000080;
4201 onChanged();
4202 return getSolutionHintFieldBuilder().getBuilder();
4203 }
4222 if (solutionHintBuilder_ != null) {
4223 return solutionHintBuilder_.getMessageOrBuilder();
4224 } else {
4225 return solutionHint_ == null ?
4226 com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
4227 }
4228 }
4246 private com.google.protobuf.SingleFieldBuilderV3<
4247 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>
4248 getSolutionHintFieldBuilder() {
4249 if (solutionHintBuilder_ == null) {
4250 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
4251 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>(
4253 getParentForChildren(),
4254 isClean());
4255 solutionHint_ = null;
4256 }
4257 return solutionHintBuilder_;
4258 }
4259
4260 private java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> annotation_ =
4261 java.util.Collections.emptyList();
4262 private void ensureAnnotationIsMutable() {
4263 if (!((bitField0_ & 0x00000100) != 0)) {
4264 annotation_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPModelProto.Annotation>(annotation_);
4265 bitField0_ |= 0x00000100;
4266 }
4267 }
4268
4269 private com.google.protobuf.RepeatedFieldBuilderV3<
4270 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder> annotationBuilder_;
4271
4275 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> getAnnotationList() {
4276 if (annotationBuilder_ == null) {
4277 return java.util.Collections.unmodifiableList(annotation_);
4278 } else {
4279 return annotationBuilder_.getMessageList();
4280 }
4281 }
4285 public int getAnnotationCount() {
4286 if (annotationBuilder_ == null) {
4287 return annotation_.size();
4288 } else {
4289 return annotationBuilder_.getCount();
4290 }
4291 }
4296 if (annotationBuilder_ == null) {
4297 return annotation_.get(index);
4298 } else {
4299 return annotationBuilder_.getMessage(index);
4300 }
4301 }
4306 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4307 if (annotationBuilder_ == null) {
4308 if (value == null) {
4309 throw new NullPointerException();
4310 }
4311 ensureAnnotationIsMutable();
4312 annotation_.set(index, value);
4313 onChanged();
4314 } else {
4315 annotationBuilder_.setMessage(index, value);
4316 }
4317 return this;
4318 }
4323 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4324 if (annotationBuilder_ == null) {
4325 ensureAnnotationIsMutable();
4326 annotation_.set(index, builderForValue.build());
4327 onChanged();
4328 } else {
4329 annotationBuilder_.setMessage(index, builderForValue.build());
4330 }
4331 return this;
4332 }
4336 public Builder addAnnotation(com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4337 if (annotationBuilder_ == null) {
4338 if (value == null) {
4339 throw new NullPointerException();
4340 }
4341 ensureAnnotationIsMutable();
4342 annotation_.add(value);
4343 onChanged();
4344 } else {
4345 annotationBuilder_.addMessage(value);
4346 }
4347 return this;
4348 }
4353 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4354 if (annotationBuilder_ == null) {
4355 if (value == null) {
4356 throw new NullPointerException();
4357 }
4358 ensureAnnotationIsMutable();
4359 annotation_.add(index, value);
4360 onChanged();
4361 } else {
4362 annotationBuilder_.addMessage(index, value);
4363 }
4364 return this;
4365 }
4370 com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4371 if (annotationBuilder_ == null) {
4372 ensureAnnotationIsMutable();
4373 annotation_.add(builderForValue.build());
4374 onChanged();
4375 } else {
4376 annotationBuilder_.addMessage(builderForValue.build());
4377 }
4378 return this;
4379 }
4384 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4385 if (annotationBuilder_ == null) {
4386 ensureAnnotationIsMutable();
4387 annotation_.add(index, builderForValue.build());
4388 onChanged();
4389 } else {
4390 annotationBuilder_.addMessage(index, builderForValue.build());
4391 }
4392 return this;
4393 }
4398 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPModelProto.Annotation> values) {
4399 if (annotationBuilder_ == null) {
4400 ensureAnnotationIsMutable();
4401 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4402 values, annotation_);
4403 onChanged();
4404 } else {
4405 annotationBuilder_.addAllMessages(values);
4406 }
4407 return this;
4408 }
4413 if (annotationBuilder_ == null) {
4414 annotation_ = java.util.Collections.emptyList();
4415 bitField0_ = (bitField0_ & ~0x00000100);
4416 onChanged();
4417 } else {
4418 annotationBuilder_.clear();
4419 }
4420 return this;
4421 }
4425 public Builder removeAnnotation(int index) {
4426 if (annotationBuilder_ == null) {
4427 ensureAnnotationIsMutable();
4428 annotation_.remove(index);
4429 onChanged();
4430 } else {
4431 annotationBuilder_.remove(index);
4432 }
4433 return this;
4434 }
4439 int index) {
4440 return getAnnotationFieldBuilder().getBuilder(index);
4441 }
4446 int index) {
4447 if (annotationBuilder_ == null) {
4448 return annotation_.get(index); } else {
4449 return annotationBuilder_.getMessageOrBuilder(index);
4450 }
4451 }
4455 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4457 if (annotationBuilder_ != null) {
4458 return annotationBuilder_.getMessageOrBuilderList();
4459 } else {
4460 return java.util.Collections.unmodifiableList(annotation_);
4461 }
4462 }
4467 return getAnnotationFieldBuilder().addBuilder(
4468 com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4469 }
4474 int index) {
4475 return getAnnotationFieldBuilder().addBuilder(
4476 index, com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4477 }
4481 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation.Builder>
4483 return getAnnotationFieldBuilder().getBuilderList();
4484 }
4485 private com.google.protobuf.RepeatedFieldBuilderV3<
4486 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4487 getAnnotationFieldBuilder() {
4488 if (annotationBuilder_ == null) {
4489 annotationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
4490 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>(
4491 annotation_,
4492 ((bitField0_ & 0x00000100) != 0),
4493 getParentForChildren(),
4494 isClean());
4495 annotation_ = null;
4496 }
4497 return annotationBuilder_;
4498 }
4499 @java.lang.Override
4501 final com.google.protobuf.UnknownFieldSet unknownFields) {
4502 return super.setUnknownFields(unknownFields);
4503 }
4504
4505 @java.lang.Override
4507 final com.google.protobuf.UnknownFieldSet unknownFields) {
4508 return super.mergeUnknownFields(unknownFields);
4509 }
4510
4511
4512 // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto)
4513 }
4514
4515 // @@protoc_insertion_point(class_scope:operations_research.MPModelProto)
4516 private static final com.google.ortools.linearsolver.MPModelProto DEFAULT_INSTANCE;
4517 static {
4518 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto();
4519 }
4520
4522 return DEFAULT_INSTANCE;
4523 }
4524
4525 @java.lang.Deprecated public static final com.google.protobuf.Parser<MPModelProto>
4526 PARSER = new com.google.protobuf.AbstractParser<MPModelProto>() {
4527 @java.lang.Override
4528 public MPModelProto parsePartialFrom(
4529 com.google.protobuf.CodedInputStream input,
4530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4531 throws com.google.protobuf.InvalidProtocolBufferException {
4532 Builder builder = newBuilder();
4533 try {
4534 builder.mergeFrom(input, extensionRegistry);
4535 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4536 throw e.setUnfinishedMessage(builder.buildPartial());
4537 } catch (com.google.protobuf.UninitializedMessageException e) {
4538 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4539 } catch (java.io.IOException e) {
4540 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4541 .setUnfinishedMessage(builder.buildPartial());
4542 }
4543 return builder.buildPartial();
4544 }
4545 };
4546
4547 public static com.google.protobuf.Parser<MPModelProto> parser() {
4548 return PARSER;
4549 }
4550
4551 @java.lang.Override
4552 public com.google.protobuf.Parser<MPModelProto> getParserForType() {
4553 return PARSER;
4554 }
4555
4556 @java.lang.Override
4558 return DEFAULT_INSTANCE;
4559 }
4560
4561}
4562
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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()
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder setPayloadKeyBytes(com.google.protobuf.ByteString value)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto.Annotation other)
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
com.google.ortools.linearsolver.MPModelProto.Annotation getDefaultInstanceForType()
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPModelProto.Annotation build()
Builder setTargetNameBytes(com.google.protobuf.ByteString value)
java.lang.Object newInstance(UnusedPrivateParameter unused)
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.GeneratedMessageV3.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)
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
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)
com.google.ortools.linearsolver.MPModelProto.Annotation getDefaultInstanceForType()
static final com.google.protobuf.Parser< Annotation > PARSER
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 setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
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)
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
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.ortools.linearsolver.MPQuadraticObjective.Builder getQuadraticObjectiveBuilder()
Builder addAllGeneralConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto > values)
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
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()
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
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)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
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)
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)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.protobuf.Parser< MPModelProto > parser()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
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()
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
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)
static final com.google.protobuf.Parser< MPModelProto > PARSER
java.lang.Object newInstance(UnusedPrivateParameter unused)
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()