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 package com.google.ortools.linearsolver;
5 
13 public final class MPModelProto extends
14  com.google.protobuf.GeneratedMessageV3 implements
15  // @@protoc_insertion_point(message_implements:operations_research.MPModelProto)
17 private static final long serialVersionUID = 0L;
18  // Use MPModelProto.newBuilder() to construct.
19  private MPModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20  super(builder);
21  }
22  private MPModelProto() {
23  variable_ = java.util.Collections.emptyList();
24  constraint_ = java.util.Collections.emptyList();
25  generalConstraint_ = java.util.Collections.emptyList();
26  name_ = "";
27  }
28 
29  @java.lang.Override
30  @SuppressWarnings({"unused"})
31  protected java.lang.Object newInstance(
32  UnusedPrivateParameter unused) {
33  return new MPModelProto();
34  }
35 
36  @java.lang.Override
37  public final com.google.protobuf.UnknownFieldSet
39  return this.unknownFields;
40  }
41  private MPModelProto(
42  com.google.protobuf.CodedInputStream input,
43  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
44  throws com.google.protobuf.InvalidProtocolBufferException {
45  this();
46  if (extensionRegistry == null) {
47  throw new java.lang.NullPointerException();
48  }
49  int mutable_bitField0_ = 0;
50  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
51  com.google.protobuf.UnknownFieldSet.newBuilder();
52  try {
53  boolean done = false;
54  while (!done) {
55  int tag = input.readTag();
56  switch (tag) {
57  case 0:
58  done = true;
59  break;
60  case 8: {
61  bitField0_ |= 0x00000001;
62  maximize_ = input.readBool();
63  break;
64  }
65  case 17: {
66  bitField0_ |= 0x00000002;
67  objectiveOffset_ = input.readDouble();
68  break;
69  }
70  case 26: {
71  if (!((mutable_bitField0_ & 0x00000004) != 0)) {
72  variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>();
73  mutable_bitField0_ |= 0x00000004;
74  }
75  variable_.add(
76  input.readMessage(com.google.ortools.linearsolver.MPVariableProto.PARSER, extensionRegistry));
77  break;
78  }
79  case 34: {
80  if (!((mutable_bitField0_ & 0x00000008) != 0)) {
81  constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>();
82  mutable_bitField0_ |= 0x00000008;
83  }
84  constraint_.add(
85  input.readMessage(com.google.ortools.linearsolver.MPConstraintProto.PARSER, extensionRegistry));
86  break;
87  }
88  case 42: {
89  com.google.protobuf.ByteString bs = input.readBytes();
90  bitField0_ |= 0x00000004;
91  name_ = bs;
92  break;
93  }
94  case 50: {
96  if (((bitField0_ & 0x00000008) != 0)) {
97  subBuilder = solutionHint_.toBuilder();
98  }
99  solutionHint_ = input.readMessage(com.google.ortools.linearsolver.PartialVariableAssignment.PARSER, extensionRegistry);
100  if (subBuilder != null) {
101  subBuilder.mergeFrom(solutionHint_);
102  solutionHint_ = subBuilder.buildPartial();
103  }
104  bitField0_ |= 0x00000008;
105  break;
106  }
107  case 58: {
108  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
109  generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>();
110  mutable_bitField0_ |= 0x00000010;
111  }
112  generalConstraint_.add(
113  input.readMessage(com.google.ortools.linearsolver.MPGeneralConstraintProto.PARSER, extensionRegistry));
114  break;
115  }
116  default: {
117  if (!parseUnknownField(
118  input, unknownFields, extensionRegistry, tag)) {
119  done = true;
120  }
121  break;
122  }
123  }
124  }
125  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
126  throw e.setUnfinishedMessage(this);
127  } catch (java.io.IOException e) {
128  throw new com.google.protobuf.InvalidProtocolBufferException(
129  e).setUnfinishedMessage(this);
130  } finally {
131  if (((mutable_bitField0_ & 0x00000004) != 0)) {
132  variable_ = java.util.Collections.unmodifiableList(variable_);
133  }
134  if (((mutable_bitField0_ & 0x00000008) != 0)) {
135  constraint_ = java.util.Collections.unmodifiableList(constraint_);
136  }
137  if (((mutable_bitField0_ & 0x00000010) != 0)) {
138  generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
139  }
140  this.unknownFields = unknownFields.build();
141  makeExtensionsImmutable();
142  }
143  }
144  public static final com.google.protobuf.Descriptors.Descriptor
146  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
147  }
148 
149  @java.lang.Override
150  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
152  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
153  .ensureFieldAccessorsInitialized(
155  }
156 
157  private int bitField0_;
158  public static final int MAXIMIZE_FIELD_NUMBER = 1;
159  private boolean maximize_;
167  public boolean hasMaximize() {
168  return ((bitField0_ & 0x00000001) != 0);
169  }
177  public boolean getMaximize() {
178  return maximize_;
179  }
180 
181  public static final int OBJECTIVE_OFFSET_FIELD_NUMBER = 2;
182  private double objectiveOffset_;
190  public boolean hasObjectiveOffset() {
191  return ((bitField0_ & 0x00000002) != 0);
192  }
200  public double getObjectiveOffset() {
201  return objectiveOffset_;
202  }
203 
204  public static final int VARIABLE_FIELD_NUMBER = 3;
205  private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_;
214  return variable_;
215  }
223  public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
225  return variable_;
226  }
234  public int getVariableCount() {
235  return variable_.size();
236  }
245  return variable_.get(index);
246  }
255  int index) {
256  return variable_.get(index);
257  }
258 
259  public static final int CONSTRAINT_FIELD_NUMBER = 4;
260  private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_;
269  return constraint_;
270  }
278  public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
280  return constraint_;
281  }
289  public int getConstraintCount() {
290  return constraint_.size();
291  }
300  return constraint_.get(index);
301  }
310  int index) {
311  return constraint_.get(index);
312  }
313 
314  public static final int GENERAL_CONSTRAINT_FIELD_NUMBER = 7;
315  private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_;
325  return generalConstraint_;
326  }
335  public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
337  return generalConstraint_;
338  }
348  return generalConstraint_.size();
349  }
359  return generalConstraint_.get(index);
360  }
370  int index) {
371  return generalConstraint_.get(index);
372  }
373 
374  public static final int NAME_FIELD_NUMBER = 5;
375  private volatile java.lang.Object name_;
383  public boolean hasName() {
384  return ((bitField0_ & 0x00000004) != 0);
385  }
393  public java.lang.String getName() {
394  java.lang.Object ref = name_;
395  if (ref instanceof java.lang.String) {
396  return (java.lang.String) ref;
397  } else {
398  com.google.protobuf.ByteString bs =
399  (com.google.protobuf.ByteString) ref;
400  java.lang.String s = bs.toStringUtf8();
401  if (bs.isValidUtf8()) {
402  name_ = s;
403  }
404  return s;
405  }
406  }
414  public com.google.protobuf.ByteString
416  java.lang.Object ref = name_;
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  name_ = b;
422  return b;
423  } else {
424  return (com.google.protobuf.ByteString) ref;
425  }
426  }
427 
428  public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
445  public boolean hasSolutionHint() {
446  return ((bitField0_ & 0x00000008) != 0);
447  }
464  return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
465  }
482  return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
483  }
484 
485  private byte memoizedIsInitialized = -1;
486  @java.lang.Override
487  public final boolean isInitialized() {
488  byte isInitialized = memoizedIsInitialized;
489  if (isInitialized == 1) return true;
490  if (isInitialized == 0) return false;
491 
492  memoizedIsInitialized = 1;
493  return true;
494  }
495 
496  @java.lang.Override
497  public void writeTo(com.google.protobuf.CodedOutputStream output)
498  throws java.io.IOException {
499  if (((bitField0_ & 0x00000001) != 0)) {
500  output.writeBool(1, maximize_);
501  }
502  if (((bitField0_ & 0x00000002) != 0)) {
503  output.writeDouble(2, objectiveOffset_);
504  }
505  for (int i = 0; i < variable_.size(); i++) {
506  output.writeMessage(3, variable_.get(i));
507  }
508  for (int i = 0; i < constraint_.size(); i++) {
509  output.writeMessage(4, constraint_.get(i));
510  }
511  if (((bitField0_ & 0x00000004) != 0)) {
512  com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
513  }
514  if (((bitField0_ & 0x00000008) != 0)) {
515  output.writeMessage(6, getSolutionHint());
516  }
517  for (int i = 0; i < generalConstraint_.size(); i++) {
518  output.writeMessage(7, generalConstraint_.get(i));
519  }
520  unknownFields.writeTo(output);
521  }
522 
523  @java.lang.Override
524  public int getSerializedSize() {
525  int size = memoizedSize;
526  if (size != -1) return size;
527 
528  size = 0;
529  if (((bitField0_ & 0x00000001) != 0)) {
530  size += com.google.protobuf.CodedOutputStream
531  .computeBoolSize(1, maximize_);
532  }
533  if (((bitField0_ & 0x00000002) != 0)) {
534  size += com.google.protobuf.CodedOutputStream
535  .computeDoubleSize(2, objectiveOffset_);
536  }
537  for (int i = 0; i < variable_.size(); i++) {
538  size += com.google.protobuf.CodedOutputStream
539  .computeMessageSize(3, variable_.get(i));
540  }
541  for (int i = 0; i < constraint_.size(); i++) {
542  size += com.google.protobuf.CodedOutputStream
543  .computeMessageSize(4, constraint_.get(i));
544  }
545  if (((bitField0_ & 0x00000004) != 0)) {
546  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
547  }
548  if (((bitField0_ & 0x00000008) != 0)) {
549  size += com.google.protobuf.CodedOutputStream
550  .computeMessageSize(6, getSolutionHint());
551  }
552  for (int i = 0; i < generalConstraint_.size(); i++) {
553  size += com.google.protobuf.CodedOutputStream
554  .computeMessageSize(7, generalConstraint_.get(i));
555  }
556  size += unknownFields.getSerializedSize();
557  memoizedSize = size;
558  return size;
559  }
560 
561  @java.lang.Override
562  public boolean equals(final java.lang.Object obj) {
563  if (obj == this) {
564  return true;
565  }
566  if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto)) {
567  return super.equals(obj);
568  }
570 
571  if (hasMaximize() != other.hasMaximize()) return false;
572  if (hasMaximize()) {
573  if (getMaximize()
574  != other.getMaximize()) return false;
575  }
576  if (hasObjectiveOffset() != other.hasObjectiveOffset()) return false;
577  if (hasObjectiveOffset()) {
578  if (java.lang.Double.doubleToLongBits(getObjectiveOffset())
579  != java.lang.Double.doubleToLongBits(
580  other.getObjectiveOffset())) return false;
581  }
582  if (!getVariableList()
583  .equals(other.getVariableList())) return false;
584  if (!getConstraintList()
585  .equals(other.getConstraintList())) return false;
587  .equals(other.getGeneralConstraintList())) return false;
588  if (hasName() != other.hasName()) return false;
589  if (hasName()) {
590  if (!getName()
591  .equals(other.getName())) return false;
592  }
593  if (hasSolutionHint() != other.hasSolutionHint()) return false;
594  if (hasSolutionHint()) {
595  if (!getSolutionHint()
596  .equals(other.getSolutionHint())) return false;
597  }
598  if (!unknownFields.equals(other.unknownFields)) return false;
599  return true;
600  }
601 
602  @java.lang.Override
603  public int hashCode() {
604  if (memoizedHashCode != 0) {
605  return memoizedHashCode;
606  }
607  int hash = 41;
608  hash = (19 * hash) + getDescriptor().hashCode();
609  if (hasMaximize()) {
610  hash = (37 * hash) + MAXIMIZE_FIELD_NUMBER;
611  hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
612  getMaximize());
613  }
614  if (hasObjectiveOffset()) {
615  hash = (37 * hash) + OBJECTIVE_OFFSET_FIELD_NUMBER;
616  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
617  java.lang.Double.doubleToLongBits(getObjectiveOffset()));
618  }
619  if (getVariableCount() > 0) {
620  hash = (37 * hash) + VARIABLE_FIELD_NUMBER;
621  hash = (53 * hash) + getVariableList().hashCode();
622  }
623  if (getConstraintCount() > 0) {
624  hash = (37 * hash) + CONSTRAINT_FIELD_NUMBER;
625  hash = (53 * hash) + getConstraintList().hashCode();
626  }
627  if (getGeneralConstraintCount() > 0) {
628  hash = (37 * hash) + GENERAL_CONSTRAINT_FIELD_NUMBER;
629  hash = (53 * hash) + getGeneralConstraintList().hashCode();
630  }
631  if (hasName()) {
632  hash = (37 * hash) + NAME_FIELD_NUMBER;
633  hash = (53 * hash) + getName().hashCode();
634  }
635  if (hasSolutionHint()) {
636  hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
637  hash = (53 * hash) + getSolutionHint().hashCode();
638  }
639  hash = (29 * hash) + unknownFields.hashCode();
640  memoizedHashCode = hash;
641  return hash;
642  }
643 
645  java.nio.ByteBuffer data)
646  throws com.google.protobuf.InvalidProtocolBufferException {
647  return PARSER.parseFrom(data);
648  }
650  java.nio.ByteBuffer data,
651  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
652  throws com.google.protobuf.InvalidProtocolBufferException {
653  return PARSER.parseFrom(data, extensionRegistry);
654  }
656  com.google.protobuf.ByteString data)
657  throws com.google.protobuf.InvalidProtocolBufferException {
658  return PARSER.parseFrom(data);
659  }
661  com.google.protobuf.ByteString data,
662  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
663  throws com.google.protobuf.InvalidProtocolBufferException {
664  return PARSER.parseFrom(data, extensionRegistry);
665  }
667  throws com.google.protobuf.InvalidProtocolBufferException {
668  return PARSER.parseFrom(data);
669  }
671  byte[] data,
672  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
673  throws com.google.protobuf.InvalidProtocolBufferException {
674  return PARSER.parseFrom(data, extensionRegistry);
675  }
676  public static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
677  throws java.io.IOException {
678  return com.google.protobuf.GeneratedMessageV3
679  .parseWithIOException(PARSER, input);
680  }
682  java.io.InputStream input,
683  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
684  throws java.io.IOException {
685  return com.google.protobuf.GeneratedMessageV3
686  .parseWithIOException(PARSER, input, extensionRegistry);
687  }
688  public static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input)
689  throws java.io.IOException {
690  return com.google.protobuf.GeneratedMessageV3
691  .parseDelimitedWithIOException(PARSER, input);
692  }
694  java.io.InputStream input,
695  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
696  throws java.io.IOException {
697  return com.google.protobuf.GeneratedMessageV3
698  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
699  }
701  com.google.protobuf.CodedInputStream input)
702  throws java.io.IOException {
703  return com.google.protobuf.GeneratedMessageV3
704  .parseWithIOException(PARSER, input);
705  }
707  com.google.protobuf.CodedInputStream input,
708  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
709  throws java.io.IOException {
710  return com.google.protobuf.GeneratedMessageV3
711  .parseWithIOException(PARSER, input, extensionRegistry);
712  }
713 
714  @java.lang.Override
715  public Builder newBuilderForType() { return newBuilder(); }
716  public static Builder newBuilder() {
717  return DEFAULT_INSTANCE.toBuilder();
718  }
720  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
721  }
722  @java.lang.Override
723  public Builder toBuilder() {
724  return this == DEFAULT_INSTANCE
725  ? new Builder() : new Builder().mergeFrom(this);
726  }
727 
728  @java.lang.Override
730  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
731  Builder builder = new Builder(parent);
732  return builder;
733  }
741  public static final class Builder extends
742  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
743  // @@protoc_insertion_point(builder_implements:operations_research.MPModelProto)
744  com.google.ortools.linearsolver.MPModelProtoOrBuilder {
745  public static final com.google.protobuf.Descriptors.Descriptor
747  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
748  }
749 
750  @java.lang.Override
751  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
753  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
754  .ensureFieldAccessorsInitialized(
756  }
757 
758  // Construct using com.google.ortools.linearsolver.MPModelProto.newBuilder()
759  private Builder() {
760  maybeForceBuilderInitialization();
761  }
762 
763  private Builder(
764  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
765  super(parent);
766  maybeForceBuilderInitialization();
767  }
768  private void maybeForceBuilderInitialization() {
769  if (com.google.protobuf.GeneratedMessageV3
770  .alwaysUseFieldBuilders) {
771  getVariableFieldBuilder();
772  getConstraintFieldBuilder();
773  getGeneralConstraintFieldBuilder();
774  getSolutionHintFieldBuilder();
775  }
776  }
777  @java.lang.Override
778  public Builder clear() {
779  super.clear();
780  maximize_ = false;
781  bitField0_ = (bitField0_ & ~0x00000001);
782  objectiveOffset_ = 0D;
783  bitField0_ = (bitField0_ & ~0x00000002);
784  if (variableBuilder_ == null) {
785  variable_ = java.util.Collections.emptyList();
786  bitField0_ = (bitField0_ & ~0x00000004);
787  } else {
788  variableBuilder_.clear();
789  }
790  if (constraintBuilder_ == null) {
791  constraint_ = java.util.Collections.emptyList();
792  bitField0_ = (bitField0_ & ~0x00000008);
793  } else {
794  constraintBuilder_.clear();
795  }
796  if (generalConstraintBuilder_ == null) {
797  generalConstraint_ = java.util.Collections.emptyList();
798  bitField0_ = (bitField0_ & ~0x00000010);
799  } else {
800  generalConstraintBuilder_.clear();
801  }
802  name_ = "";
803  bitField0_ = (bitField0_ & ~0x00000020);
804  if (solutionHintBuilder_ == null) {
805  solutionHint_ = null;
806  } else {
807  solutionHintBuilder_.clear();
808  }
809  bitField0_ = (bitField0_ & ~0x00000040);
810  return this;
811  }
812 
813  @java.lang.Override
814  public com.google.protobuf.Descriptors.Descriptor
816  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
817  }
818 
819  @java.lang.Override
822  }
823 
824  @java.lang.Override
827  if (!result.isInitialized()) {
828  throw newUninitializedMessageException(result);
829  }
830  return result;
831  }
832 
833  @java.lang.Override
836  int from_bitField0_ = bitField0_;
837  int to_bitField0_ = 0;
838  if (((from_bitField0_ & 0x00000001) != 0)) {
839  result.maximize_ = maximize_;
840  to_bitField0_ |= 0x00000001;
841  }
842  if (((from_bitField0_ & 0x00000002) != 0)) {
843  result.objectiveOffset_ = objectiveOffset_;
844  to_bitField0_ |= 0x00000002;
845  }
846  if (variableBuilder_ == null) {
847  if (((bitField0_ & 0x00000004) != 0)) {
848  variable_ = java.util.Collections.unmodifiableList(variable_);
849  bitField0_ = (bitField0_ & ~0x00000004);
850  }
851  result.variable_ = variable_;
852  } else {
853  result.variable_ = variableBuilder_.build();
854  }
855  if (constraintBuilder_ == null) {
856  if (((bitField0_ & 0x00000008) != 0)) {
857  constraint_ = java.util.Collections.unmodifiableList(constraint_);
858  bitField0_ = (bitField0_ & ~0x00000008);
859  }
860  result.constraint_ = constraint_;
861  } else {
862  result.constraint_ = constraintBuilder_.build();
863  }
864  if (generalConstraintBuilder_ == null) {
865  if (((bitField0_ & 0x00000010) != 0)) {
866  generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
867  bitField0_ = (bitField0_ & ~0x00000010);
868  }
869  result.generalConstraint_ = generalConstraint_;
870  } else {
871  result.generalConstraint_ = generalConstraintBuilder_.build();
872  }
873  if (((from_bitField0_ & 0x00000020) != 0)) {
874  to_bitField0_ |= 0x00000004;
875  }
876  result.name_ = name_;
877  if (((from_bitField0_ & 0x00000040) != 0)) {
878  if (solutionHintBuilder_ == null) {
879  result.solutionHint_ = solutionHint_;
880  } else {
881  result.solutionHint_ = solutionHintBuilder_.build();
882  }
883  to_bitField0_ |= 0x00000008;
884  }
885  result.bitField0_ = to_bitField0_;
886  onBuilt();
887  return result;
888  }
889 
890  @java.lang.Override
891  public Builder clone() {
892  return super.clone();
893  }
894  @java.lang.Override
896  com.google.protobuf.Descriptors.FieldDescriptor field,
897  java.lang.Object value) {
898  return super.setField(field, value);
899  }
900  @java.lang.Override
902  com.google.protobuf.Descriptors.FieldDescriptor field) {
903  return super.clearField(field);
904  }
905  @java.lang.Override
907  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
908  return super.clearOneof(oneof);
909  }
910  @java.lang.Override
912  com.google.protobuf.Descriptors.FieldDescriptor field,
913  int index, java.lang.Object value) {
914  return super.setRepeatedField(field, index, value);
915  }
916  @java.lang.Override
918  com.google.protobuf.Descriptors.FieldDescriptor field,
919  java.lang.Object value) {
920  return super.addRepeatedField(field, value);
921  }
922  @java.lang.Override
923  public Builder mergeFrom(com.google.protobuf.Message other) {
924  if (other instanceof com.google.ortools.linearsolver.MPModelProto) {
926  } else {
927  super.mergeFrom(other);
928  return this;
929  }
930  }
931 
933  if (other == com.google.ortools.linearsolver.MPModelProto.getDefaultInstance()) return this;
934  if (other.hasMaximize()) {
935  setMaximize(other.getMaximize());
936  }
937  if (other.hasObjectiveOffset()) {
938  setObjectiveOffset(other.getObjectiveOffset());
939  }
940  if (variableBuilder_ == null) {
941  if (!other.variable_.isEmpty()) {
942  if (variable_.isEmpty()) {
943  variable_ = other.variable_;
944  bitField0_ = (bitField0_ & ~0x00000004);
945  } else {
946  ensureVariableIsMutable();
947  variable_.addAll(other.variable_);
948  }
949  onChanged();
950  }
951  } else {
952  if (!other.variable_.isEmpty()) {
953  if (variableBuilder_.isEmpty()) {
954  variableBuilder_.dispose();
955  variableBuilder_ = null;
956  variable_ = other.variable_;
957  bitField0_ = (bitField0_ & ~0x00000004);
958  variableBuilder_ =
959  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
960  getVariableFieldBuilder() : null;
961  } else {
962  variableBuilder_.addAllMessages(other.variable_);
963  }
964  }
965  }
966  if (constraintBuilder_ == null) {
967  if (!other.constraint_.isEmpty()) {
968  if (constraint_.isEmpty()) {
969  constraint_ = other.constraint_;
970  bitField0_ = (bitField0_ & ~0x00000008);
971  } else {
972  ensureConstraintIsMutable();
973  constraint_.addAll(other.constraint_);
974  }
975  onChanged();
976  }
977  } else {
978  if (!other.constraint_.isEmpty()) {
979  if (constraintBuilder_.isEmpty()) {
980  constraintBuilder_.dispose();
981  constraintBuilder_ = null;
982  constraint_ = other.constraint_;
983  bitField0_ = (bitField0_ & ~0x00000008);
984  constraintBuilder_ =
985  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
986  getConstraintFieldBuilder() : null;
987  } else {
988  constraintBuilder_.addAllMessages(other.constraint_);
989  }
990  }
991  }
992  if (generalConstraintBuilder_ == null) {
993  if (!other.generalConstraint_.isEmpty()) {
994  if (generalConstraint_.isEmpty()) {
995  generalConstraint_ = other.generalConstraint_;
996  bitField0_ = (bitField0_ & ~0x00000010);
997  } else {
998  ensureGeneralConstraintIsMutable();
999  generalConstraint_.addAll(other.generalConstraint_);
1000  }
1001  onChanged();
1002  }
1003  } else {
1004  if (!other.generalConstraint_.isEmpty()) {
1005  if (generalConstraintBuilder_.isEmpty()) {
1006  generalConstraintBuilder_.dispose();
1007  generalConstraintBuilder_ = null;
1008  generalConstraint_ = other.generalConstraint_;
1009  bitField0_ = (bitField0_ & ~0x00000010);
1010  generalConstraintBuilder_ =
1011  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1012  getGeneralConstraintFieldBuilder() : null;
1013  } else {
1014  generalConstraintBuilder_.addAllMessages(other.generalConstraint_);
1015  }
1016  }
1017  }
1018  if (other.hasName()) {
1019  bitField0_ |= 0x00000020;
1020  name_ = other.name_;
1021  onChanged();
1022  }
1023  if (other.hasSolutionHint()) {
1024  mergeSolutionHint(other.getSolutionHint());
1025  }
1026  this.mergeUnknownFields(other.unknownFields);
1027  onChanged();
1028  return this;
1029  }
1030 
1031  @java.lang.Override
1032  public final boolean isInitialized() {
1033  return true;
1034  }
1035 
1036  @java.lang.Override
1038  com.google.protobuf.CodedInputStream input,
1039  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1040  throws java.io.IOException {
1041  com.google.ortools.linearsolver.MPModelProto parsedMessage = null;
1042  try {
1043  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1044  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1045  parsedMessage = (com.google.ortools.linearsolver.MPModelProto) e.getUnfinishedMessage();
1046  throw e.unwrapIOException();
1047  } finally {
1048  if (parsedMessage != null) {
1049  mergeFrom(parsedMessage);
1050  }
1051  }
1052  return this;
1053  }
1054  private int bitField0_;
1055 
1056  private boolean maximize_ ;
1064  public boolean hasMaximize() {
1065  return ((bitField0_ & 0x00000001) != 0);
1066  }
1074  public boolean getMaximize() {
1075  return maximize_;
1076  }
1084  public Builder setMaximize(boolean value) {
1085  bitField0_ |= 0x00000001;
1086  maximize_ = value;
1087  onChanged();
1088  return this;
1089  }
1098  bitField0_ = (bitField0_ & ~0x00000001);
1099  maximize_ = false;
1100  onChanged();
1101  return this;
1102  }
1103 
1104  private double objectiveOffset_ ;
1112  public boolean hasObjectiveOffset() {
1113  return ((bitField0_ & 0x00000002) != 0);
1114  }
1122  public double getObjectiveOffset() {
1123  return objectiveOffset_;
1124  }
1132  public Builder setObjectiveOffset(double value) {
1133  bitField0_ |= 0x00000002;
1134  objectiveOffset_ = value;
1135  onChanged();
1136  return this;
1137  }
1146  bitField0_ = (bitField0_ & ~0x00000002);
1147  objectiveOffset_ = 0D;
1148  onChanged();
1149  return this;
1150  }
1151 
1152  private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_ =
1153  java.util.Collections.emptyList();
1154  private void ensureVariableIsMutable() {
1155  if (!((bitField0_ & 0x00000004) != 0)) {
1156  variable_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>(variable_);
1157  bitField0_ |= 0x00000004;
1158  }
1159  }
1160 
1161  private com.google.protobuf.RepeatedFieldBuilderV3<
1163 
1172  if (variableBuilder_ == null) {
1173  return java.util.Collections.unmodifiableList(variable_);
1174  } else {
1175  return variableBuilder_.getMessageList();
1176  }
1177  }
1185  public int getVariableCount() {
1186  if (variableBuilder_ == null) {
1187  return variable_.size();
1188  } else {
1189  return variableBuilder_.getCount();
1190  }
1191  }
1200  if (variableBuilder_ == null) {
1201  return variable_.get(index);
1202  } else {
1203  return variableBuilder_.getMessage(index);
1204  }
1205  }
1214  int index, com.google.ortools.linearsolver.MPVariableProto value) {
1215  if (variableBuilder_ == null) {
1216  if (value == null) {
1217  throw new NullPointerException();
1218  }
1219  ensureVariableIsMutable();
1220  variable_.set(index, value);
1221  onChanged();
1222  } else {
1223  variableBuilder_.setMessage(index, value);
1224  }
1225  return this;
1226  }
1235  int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
1236  if (variableBuilder_ == null) {
1237  ensureVariableIsMutable();
1238  variable_.set(index, builderForValue.build());
1239  onChanged();
1240  } else {
1241  variableBuilder_.setMessage(index, builderForValue.build());
1242  }
1243  return this;
1244  }
1253  if (variableBuilder_ == null) {
1254  if (value == null) {
1255  throw new NullPointerException();
1256  }
1257  ensureVariableIsMutable();
1258  variable_.add(value);
1259  onChanged();
1260  } else {
1261  variableBuilder_.addMessage(value);
1262  }
1263  return this;
1264  }
1273  int index, com.google.ortools.linearsolver.MPVariableProto value) {
1274  if (variableBuilder_ == null) {
1275  if (value == null) {
1276  throw new NullPointerException();
1277  }
1278  ensureVariableIsMutable();
1279  variable_.add(index, value);
1280  onChanged();
1281  } else {
1282  variableBuilder_.addMessage(index, value);
1283  }
1284  return this;
1285  }
1295  if (variableBuilder_ == null) {
1296  ensureVariableIsMutable();
1297  variable_.add(builderForValue.build());
1298  onChanged();
1299  } else {
1300  variableBuilder_.addMessage(builderForValue.build());
1301  }
1302  return this;
1303  }
1312  int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
1313  if (variableBuilder_ == null) {
1314  ensureVariableIsMutable();
1315  variable_.add(index, builderForValue.build());
1316  onChanged();
1317  } else {
1318  variableBuilder_.addMessage(index, builderForValue.build());
1319  }
1320  return this;
1321  }
1330  java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto> values) {
1331  if (variableBuilder_ == null) {
1332  ensureVariableIsMutable();
1333  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1334  values, variable_);
1335  onChanged();
1336  } else {
1337  variableBuilder_.addAllMessages(values);
1338  }
1339  return this;
1340  }
1349  if (variableBuilder_ == null) {
1350  variable_ = java.util.Collections.emptyList();
1351  bitField0_ = (bitField0_ & ~0x00000004);
1352  onChanged();
1353  } else {
1354  variableBuilder_.clear();
1355  }
1356  return this;
1357  }
1365  public Builder removeVariable(int index) {
1366  if (variableBuilder_ == null) {
1367  ensureVariableIsMutable();
1368  variable_.remove(index);
1369  onChanged();
1370  } else {
1371  variableBuilder_.remove(index);
1372  }
1373  return this;
1374  }
1383  int index) {
1384  return getVariableFieldBuilder().getBuilder(index);
1385  }
1394  int index) {
1395  if (variableBuilder_ == null) {
1396  return variable_.get(index); } else {
1397  return variableBuilder_.getMessageOrBuilder(index);
1398  }
1399  }
1407  public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1409  if (variableBuilder_ != null) {
1410  return variableBuilder_.getMessageOrBuilderList();
1411  } else {
1412  return java.util.Collections.unmodifiableList(variable_);
1413  }
1414  }
1423  return getVariableFieldBuilder().addBuilder(
1425  }
1434  int index) {
1435  return getVariableFieldBuilder().addBuilder(
1437  }
1445  public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
1447  return getVariableFieldBuilder().getBuilderList();
1448  }
1449  private com.google.protobuf.RepeatedFieldBuilderV3<
1451  getVariableFieldBuilder() {
1452  if (variableBuilder_ == null) {
1453  variableBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1455  variable_,
1456  ((bitField0_ & 0x00000004) != 0),
1457  getParentForChildren(),
1458  isClean());
1459  variable_ = null;
1460  }
1461  return variableBuilder_;
1462  }
1463 
1464  private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_ =
1465  java.util.Collections.emptyList();
1466  private void ensureConstraintIsMutable() {
1467  if (!((bitField0_ & 0x00000008) != 0)) {
1468  constraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>(constraint_);
1469  bitField0_ |= 0x00000008;
1470  }
1471  }
1472 
1473  private com.google.protobuf.RepeatedFieldBuilderV3<
1475 
1484  if (constraintBuilder_ == null) {
1485  return java.util.Collections.unmodifiableList(constraint_);
1486  } else {
1487  return constraintBuilder_.getMessageList();
1488  }
1489  }
1497  public int getConstraintCount() {
1498  if (constraintBuilder_ == null) {
1499  return constraint_.size();
1500  } else {
1501  return constraintBuilder_.getCount();
1502  }
1503  }
1512  if (constraintBuilder_ == null) {
1513  return constraint_.get(index);
1514  } else {
1515  return constraintBuilder_.getMessage(index);
1516  }
1517  }
1526  int index, com.google.ortools.linearsolver.MPConstraintProto value) {
1527  if (constraintBuilder_ == null) {
1528  if (value == null) {
1529  throw new NullPointerException();
1530  }
1531  ensureConstraintIsMutable();
1532  constraint_.set(index, value);
1533  onChanged();
1534  } else {
1535  constraintBuilder_.setMessage(index, value);
1536  }
1537  return this;
1538  }
1547  int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
1548  if (constraintBuilder_ == null) {
1549  ensureConstraintIsMutable();
1550  constraint_.set(index, builderForValue.build());
1551  onChanged();
1552  } else {
1553  constraintBuilder_.setMessage(index, builderForValue.build());
1554  }
1555  return this;
1556  }
1565  if (constraintBuilder_ == null) {
1566  if (value == null) {
1567  throw new NullPointerException();
1568  }
1569  ensureConstraintIsMutable();
1570  constraint_.add(value);
1571  onChanged();
1572  } else {
1573  constraintBuilder_.addMessage(value);
1574  }
1575  return this;
1576  }
1585  int index, com.google.ortools.linearsolver.MPConstraintProto value) {
1586  if (constraintBuilder_ == null) {
1587  if (value == null) {
1588  throw new NullPointerException();
1589  }
1590  ensureConstraintIsMutable();
1591  constraint_.add(index, value);
1592  onChanged();
1593  } else {
1594  constraintBuilder_.addMessage(index, value);
1595  }
1596  return this;
1597  }
1607  if (constraintBuilder_ == null) {
1608  ensureConstraintIsMutable();
1609  constraint_.add(builderForValue.build());
1610  onChanged();
1611  } else {
1612  constraintBuilder_.addMessage(builderForValue.build());
1613  }
1614  return this;
1615  }
1624  int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
1625  if (constraintBuilder_ == null) {
1626  ensureConstraintIsMutable();
1627  constraint_.add(index, builderForValue.build());
1628  onChanged();
1629  } else {
1630  constraintBuilder_.addMessage(index, builderForValue.build());
1631  }
1632  return this;
1633  }
1642  java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto> values) {
1643  if (constraintBuilder_ == null) {
1644  ensureConstraintIsMutable();
1645  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1646  values, constraint_);
1647  onChanged();
1648  } else {
1649  constraintBuilder_.addAllMessages(values);
1650  }
1651  return this;
1652  }
1661  if (constraintBuilder_ == null) {
1662  constraint_ = java.util.Collections.emptyList();
1663  bitField0_ = (bitField0_ & ~0x00000008);
1664  onChanged();
1665  } else {
1666  constraintBuilder_.clear();
1667  }
1668  return this;
1669  }
1677  public Builder removeConstraint(int index) {
1678  if (constraintBuilder_ == null) {
1679  ensureConstraintIsMutable();
1680  constraint_.remove(index);
1681  onChanged();
1682  } else {
1683  constraintBuilder_.remove(index);
1684  }
1685  return this;
1686  }
1695  int index) {
1696  return getConstraintFieldBuilder().getBuilder(index);
1697  }
1706  int index) {
1707  if (constraintBuilder_ == null) {
1708  return constraint_.get(index); } else {
1709  return constraintBuilder_.getMessageOrBuilder(index);
1710  }
1711  }
1719  public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1721  if (constraintBuilder_ != null) {
1722  return constraintBuilder_.getMessageOrBuilderList();
1723  } else {
1724  return java.util.Collections.unmodifiableList(constraint_);
1725  }
1726  }
1735  return getConstraintFieldBuilder().addBuilder(
1737  }
1746  int index) {
1747  return getConstraintFieldBuilder().addBuilder(
1749  }
1757  public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
1759  return getConstraintFieldBuilder().getBuilderList();
1760  }
1761  private com.google.protobuf.RepeatedFieldBuilderV3<
1763  getConstraintFieldBuilder() {
1764  if (constraintBuilder_ == null) {
1765  constraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1767  constraint_,
1768  ((bitField0_ & 0x00000008) != 0),
1769  getParentForChildren(),
1770  isClean());
1771  constraint_ = null;
1772  }
1773  return constraintBuilder_;
1774  }
1775 
1776  private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_ =
1777  java.util.Collections.emptyList();
1778  private void ensureGeneralConstraintIsMutable() {
1779  if (!((bitField0_ & 0x00000010) != 0)) {
1780  generalConstraint_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>(generalConstraint_);
1781  bitField0_ |= 0x00000010;
1782  }
1783  }
1784 
1785  private com.google.protobuf.RepeatedFieldBuilderV3<
1787 
1797  if (generalConstraintBuilder_ == null) {
1798  return java.util.Collections.unmodifiableList(generalConstraint_);
1799  } else {
1800  return generalConstraintBuilder_.getMessageList();
1801  }
1802  }
1812  if (generalConstraintBuilder_ == null) {
1813  return generalConstraint_.size();
1814  } else {
1815  return generalConstraintBuilder_.getCount();
1816  }
1817  }
1827  if (generalConstraintBuilder_ == null) {
1828  return generalConstraint_.get(index);
1829  } else {
1830  return generalConstraintBuilder_.getMessage(index);
1831  }
1832  }
1843  if (generalConstraintBuilder_ == null) {
1844  if (value == null) {
1845  throw new NullPointerException();
1846  }
1847  ensureGeneralConstraintIsMutable();
1848  generalConstraint_.set(index, value);
1849  onChanged();
1850  } else {
1851  generalConstraintBuilder_.setMessage(index, value);
1852  }
1853  return this;
1854  }
1864  int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
1865  if (generalConstraintBuilder_ == null) {
1866  ensureGeneralConstraintIsMutable();
1867  generalConstraint_.set(index, builderForValue.build());
1868  onChanged();
1869  } else {
1870  generalConstraintBuilder_.setMessage(index, builderForValue.build());
1871  }
1872  return this;
1873  }
1883  if (generalConstraintBuilder_ == null) {
1884  if (value == null) {
1885  throw new NullPointerException();
1886  }
1887  ensureGeneralConstraintIsMutable();
1888  generalConstraint_.add(value);
1889  onChanged();
1890  } else {
1891  generalConstraintBuilder_.addMessage(value);
1892  }
1893  return this;
1894  }
1905  if (generalConstraintBuilder_ == null) {
1906  if (value == null) {
1907  throw new NullPointerException();
1908  }
1909  ensureGeneralConstraintIsMutable();
1910  generalConstraint_.add(index, value);
1911  onChanged();
1912  } else {
1913  generalConstraintBuilder_.addMessage(index, value);
1914  }
1915  return this;
1916  }
1927  if (generalConstraintBuilder_ == null) {
1928  ensureGeneralConstraintIsMutable();
1929  generalConstraint_.add(builderForValue.build());
1930  onChanged();
1931  } else {
1932  generalConstraintBuilder_.addMessage(builderForValue.build());
1933  }
1934  return this;
1935  }
1945  int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
1946  if (generalConstraintBuilder_ == null) {
1947  ensureGeneralConstraintIsMutable();
1948  generalConstraint_.add(index, builderForValue.build());
1949  onChanged();
1950  } else {
1951  generalConstraintBuilder_.addMessage(index, builderForValue.build());
1952  }
1953  return this;
1954  }
1964  java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto> values) {
1965  if (generalConstraintBuilder_ == null) {
1966  ensureGeneralConstraintIsMutable();
1967  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1968  values, generalConstraint_);
1969  onChanged();
1970  } else {
1971  generalConstraintBuilder_.addAllMessages(values);
1972  }
1973  return this;
1974  }
1984  if (generalConstraintBuilder_ == null) {
1985  generalConstraint_ = java.util.Collections.emptyList();
1986  bitField0_ = (bitField0_ & ~0x00000010);
1987  onChanged();
1988  } else {
1989  generalConstraintBuilder_.clear();
1990  }
1991  return this;
1992  }
2001  public Builder removeGeneralConstraint(int index) {
2002  if (generalConstraintBuilder_ == null) {
2003  ensureGeneralConstraintIsMutable();
2004  generalConstraint_.remove(index);
2005  onChanged();
2006  } else {
2007  generalConstraintBuilder_.remove(index);
2008  }
2009  return this;
2010  }
2020  int index) {
2021  return getGeneralConstraintFieldBuilder().getBuilder(index);
2022  }
2032  int index) {
2033  if (generalConstraintBuilder_ == null) {
2034  return generalConstraint_.get(index); } else {
2035  return generalConstraintBuilder_.getMessageOrBuilder(index);
2036  }
2037  }
2046  public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
2048  if (generalConstraintBuilder_ != null) {
2049  return generalConstraintBuilder_.getMessageOrBuilderList();
2050  } else {
2051  return java.util.Collections.unmodifiableList(generalConstraint_);
2052  }
2053  }
2063  return getGeneralConstraintFieldBuilder().addBuilder(
2065  }
2075  int index) {
2076  return getGeneralConstraintFieldBuilder().addBuilder(
2078  }
2089  return getGeneralConstraintFieldBuilder().getBuilderList();
2090  }
2091  private com.google.protobuf.RepeatedFieldBuilderV3<
2093  getGeneralConstraintFieldBuilder() {
2094  if (generalConstraintBuilder_ == null) {
2095  generalConstraintBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2097  generalConstraint_,
2098  ((bitField0_ & 0x00000010) != 0),
2099  getParentForChildren(),
2100  isClean());
2101  generalConstraint_ = null;
2102  }
2103  return generalConstraintBuilder_;
2104  }
2105 
2106  private java.lang.Object name_ = "";
2114  public boolean hasName() {
2115  return ((bitField0_ & 0x00000020) != 0);
2116  }
2124  public java.lang.String getName() {
2125  java.lang.Object ref = name_;
2126  if (!(ref instanceof java.lang.String)) {
2127  com.google.protobuf.ByteString bs =
2128  (com.google.protobuf.ByteString) ref;
2129  java.lang.String s = bs.toStringUtf8();
2130  if (bs.isValidUtf8()) {
2131  name_ = s;
2132  }
2133  return s;
2134  } else {
2135  return (java.lang.String) ref;
2136  }
2137  }
2145  public com.google.protobuf.ByteString
2147  java.lang.Object ref = name_;
2148  if (ref instanceof String) {
2149  com.google.protobuf.ByteString b =
2150  com.google.protobuf.ByteString.copyFromUtf8(
2151  (java.lang.String) ref);
2152  name_ = b;
2153  return b;
2154  } else {
2155  return (com.google.protobuf.ByteString) ref;
2156  }
2157  }
2166  java.lang.String value) {
2167  if (value == null) {
2168  throw new NullPointerException();
2169  }
2170  bitField0_ |= 0x00000020;
2171  name_ = value;
2172  onChanged();
2173  return this;
2174  }
2182  public Builder clearName() {
2183  bitField0_ = (bitField0_ & ~0x00000020);
2184  name_ = getDefaultInstance().getName();
2185  onChanged();
2186  return this;
2187  }
2196  com.google.protobuf.ByteString value) {
2197  if (value == null) {
2198  throw new NullPointerException();
2199  }
2200  bitField0_ |= 0x00000020;
2201  name_ = value;
2202  onChanged();
2203  return this;
2204  }
2205 
2207  private com.google.protobuf.SingleFieldBuilderV3<
2224  public boolean hasSolutionHint() {
2225  return ((bitField0_ & 0x00000040) != 0);
2226  }
2243  if (solutionHintBuilder_ == null) {
2244  return solutionHint_ == null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2245  } else {
2246  return solutionHintBuilder_.getMessage();
2247  }
2248  }
2265  if (solutionHintBuilder_ == null) {
2266  if (value == null) {
2267  throw new NullPointerException();
2268  }
2269  solutionHint_ = value;
2270  onChanged();
2271  } else {
2272  solutionHintBuilder_.setMessage(value);
2273  }
2274  bitField0_ |= 0x00000040;
2275  return this;
2276  }
2294  if (solutionHintBuilder_ == null) {
2295  solutionHint_ = builderForValue.build();
2296  onChanged();
2297  } else {
2298  solutionHintBuilder_.setMessage(builderForValue.build());
2299  }
2300  bitField0_ |= 0x00000040;
2301  return this;
2302  }
2319  if (solutionHintBuilder_ == null) {
2320  if (((bitField0_ & 0x00000040) != 0) &&
2321  solutionHint_ != null &&
2323  solutionHint_ =
2325  } else {
2326  solutionHint_ = value;
2327  }
2328  onChanged();
2329  } else {
2330  solutionHintBuilder_.mergeFrom(value);
2331  }
2332  bitField0_ |= 0x00000040;
2333  return this;
2334  }
2351  if (solutionHintBuilder_ == null) {
2352  solutionHint_ = null;
2353  onChanged();
2354  } else {
2355  solutionHintBuilder_.clear();
2356  }
2357  bitField0_ = (bitField0_ & ~0x00000040);
2358  return this;
2359  }
2376  bitField0_ |= 0x00000040;
2377  onChanged();
2378  return getSolutionHintFieldBuilder().getBuilder();
2379  }
2396  if (solutionHintBuilder_ != null) {
2397  return solutionHintBuilder_.getMessageOrBuilder();
2398  } else {
2399  return solutionHint_ == null ?
2401  }
2402  }
2418  private com.google.protobuf.SingleFieldBuilderV3<
2420  getSolutionHintFieldBuilder() {
2421  if (solutionHintBuilder_ == null) {
2422  solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2424  getSolutionHint(),
2425  getParentForChildren(),
2426  isClean());
2427  solutionHint_ = null;
2428  }
2429  return solutionHintBuilder_;
2430  }
2431  @java.lang.Override
2433  final com.google.protobuf.UnknownFieldSet unknownFields) {
2434  return super.setUnknownFields(unknownFields);
2435  }
2436 
2437  @java.lang.Override
2439  final com.google.protobuf.UnknownFieldSet unknownFields) {
2440  return super.mergeUnknownFields(unknownFields);
2441  }
2442 
2443 
2444  // @@protoc_insertion_point(builder_scope:operations_research.MPModelProto)
2445  }
2446 
2447  // @@protoc_insertion_point(class_scope:operations_research.MPModelProto)
2448  private static final com.google.ortools.linearsolver.MPModelProto DEFAULT_INSTANCE;
2449  static {
2450  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelProto();
2451  }
2452 
2454  return DEFAULT_INSTANCE;
2455  }
2456 
2457  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPModelProto>
2458  PARSER = new com.google.protobuf.AbstractParser<MPModelProto>() {
2459  @java.lang.Override
2460  public MPModelProto parsePartialFrom(
2461  com.google.protobuf.CodedInputStream input,
2462  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2463  throws com.google.protobuf.InvalidProtocolBufferException {
2464  return new MPModelProto(input, extensionRegistry);
2465  }
2466  };
2467 
2468  public static com.google.protobuf.Parser<MPModelProto> parser() {
2469  return PARSER;
2470  }
2471 
2472  @java.lang.Override
2473  public com.google.protobuf.Parser<MPModelProto> getParserForType() {
2474  return PARSER;
2475  }
2476 
2477  @java.lang.Override
2479  return DEFAULT_INSTANCE;
2480  }
2481 
2482 }
2483 
.lang.Override com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
.lang.Deprecated static final com.google.protobuf.Parser< MPVariableProto > PARSER
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder getGeneralConstraintBuilder(int index)
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder > getGeneralConstraintBuilderList()
Builder addVariable(com.google.ortools.linearsolver.MPVariableProto value)
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input)
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
Builder setSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Override com.google.ortools.linearsolver.MPModelProto buildPartial()
com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPConstraintProto.Builder getConstraintBuilder(int index)
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder(int index)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
com.google.ortools.linearsolver.MPVariableProto.Builder getVariableBuilder(int index)
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelProto other)
.lang.Override com.google.ortools.linearsolver.PartialVariableAssignment buildPartial()
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder(int index)
.lang.Deprecated static final com.google.protobuf.Parser< MPGeneralConstraintProto > PARSER
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
java.util.List< com.google.ortools.linearsolver.MPVariableProto.Builder > getVariableBuilderList()
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPModelProto getDefaultInstance()
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
.lang.Override com.google.ortools.linearsolver.MPModelProto build()
.lang.Override boolean equals(final java.lang.Object obj)
Builder mergeSolutionHint(com.google.ortools.linearsolver.PartialVariableAssignment value)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder > getGeneralConstraintOrBuilderList()
com.google.ortools.linearsolver.MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.linearsolver.MPVariableProto getDefaultInstance()
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data)
com.google.ortools.linearsolver.MPVariableProtoOrBuilder getVariableOrBuilder(int index)
.lang.Deprecated static final com.google.protobuf.Parser< MPConstraintProto > PARSER
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
com.google.ortools.linearsolver.MPVariableProto.Builder addVariableBuilder()
Builder addConstraint(com.google.ortools.linearsolver.MPConstraintProto value)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
Builder setNameBytes(com.google.protobuf.ByteString value)
static com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstance()
com.google.ortools.linearsolver.MPVariableProto getVariable(int index)
com.google.ortools.linearsolver.MPGeneralConstraintProto getGeneralConstraint(int index)
com.google.ortools.linearsolver.MPConstraintProto getConstraint(int index)
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
.lang.Deprecated static final com.google.protobuf.Parser< MPModelProto > PARSER
static com.google.ortools.linearsolver.PartialVariableAssignment getDefaultInstance()
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
Builder addAllGeneralConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto > values)
.lang.Override final boolean isInitialized()
static com.google.ortools.linearsolver.MPModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPConstraintProto.Builder addConstraintBuilder()
static com.google.ortools.linearsolver.MPModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override boolean equals(final java.lang.Object obj)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.protobuf.Parser< MPModelProto > parser()
static com.google.ortools.linearsolver.MPConstraintProto getDefaultInstance()
.lang.Override com.google.ortools.linearsolver.MPModelProto getDefaultInstanceForType()
com.google.protobuf.ByteString getNameBytes()
Builder setConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder()
Builder setGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto prototype)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
java.util.List< com.google.ortools.linearsolver.MPGeneralConstraintProto > getGeneralConstraintList()
java.util.List< com.google.ortools.linearsolver.MPConstraintProto > getConstraintList()
java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder > getConstraintOrBuilderList()
java.util.List< com.google.ortools.linearsolver.MPVariableProto > getVariableList()
.lang.Override com.google.protobuf.Parser< MPModelProto > getParserForType()
com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
Builder addAllConstraint(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto > values)
.lang.Deprecated static final com.google.protobuf.Parser< PartialVariableAssignment > PARSER
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue)
Builder setVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)
com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder addGeneralConstraintBuilder(int index)
Builder addConstraint(int index, com.google.ortools.linearsolver.MPConstraintProto value)
java.util.List< com.google.ortools.linearsolver.MPConstraintProto.Builder > getConstraintBuilderList()
static com.google.ortools.linearsolver.MPModelProto parseFrom(java.nio.ByteBuffer data)
Builder addGeneralConstraint(int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value)
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto value)
com.google.ortools.linearsolver.PartialVariableAssignment.Builder getSolutionHintBuilder()
static com.google.ortools.linearsolver.MPModelProto parseDelimitedFrom(java.io.InputStream input)
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllVariable(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto > values)
java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder > getVariableOrBuilderList()
com.google.ortools.linearsolver.PartialVariableAssignment getSolutionHint()
Builder addGeneralConstraint(com.google.ortools.linearsolver.MPGeneralConstraintProto value)
Builder addVariable(int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue)