Java Reference

Java Reference

MPSolutionResponse.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 MPSolutionResponse extends
14  com.google.protobuf.GeneratedMessageV3 implements
15  // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
17 private static final long serialVersionUID = 0L;
18  // Use MPSolutionResponse.newBuilder() to construct.
19  private MPSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20  super(builder);
21  }
22  private MPSolutionResponse() {
23  status_ = 99;
24  statusStr_ = "";
25  variableValue_ = emptyDoubleList();
26  dualValue_ = emptyDoubleList();
27  reducedCost_ = emptyDoubleList();
28  additionalSolutions_ = 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 MPSolutionResponse();
36  }
37 
38  @java.lang.Override
39  public final com.google.protobuf.UnknownFieldSet
41  return this.unknownFields;
42  }
43  private MPSolutionResponse(
44  com.google.protobuf.CodedInputStream input,
45  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
46  throws com.google.protobuf.InvalidProtocolBufferException {
47  this();
48  if (extensionRegistry == null) {
49  throw new java.lang.NullPointerException();
50  }
51  int mutable_bitField0_ = 0;
52  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
53  com.google.protobuf.UnknownFieldSet.newBuilder();
54  try {
55  boolean done = false;
56  while (!done) {
57  int tag = input.readTag();
58  switch (tag) {
59  case 0:
60  done = true;
61  break;
62  case 8: {
63  int rawValue = input.readEnum();
64  @SuppressWarnings("deprecation")
65  com.google.ortools.linearsolver.MPSolverResponseStatus value = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
66  if (value == null) {
67  unknownFields.mergeVarintField(1, rawValue);
68  } else {
69  bitField0_ |= 0x00000001;
70  status_ = rawValue;
71  }
72  break;
73  }
74  case 17: {
75  bitField0_ |= 0x00000004;
76  objectiveValue_ = input.readDouble();
77  break;
78  }
79  case 25: {
80  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
81  variableValue_ = newDoubleList();
82  mutable_bitField0_ |= 0x00000010;
83  }
84  variableValue_.addDouble(input.readDouble());
85  break;
86  }
87  case 26: {
88  int length = input.readRawVarint32();
89  int limit = input.pushLimit(length);
90  if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
91  variableValue_ = newDoubleList();
92  mutable_bitField0_ |= 0x00000010;
93  }
94  while (input.getBytesUntilLimit() > 0) {
95  variableValue_.addDouble(input.readDouble());
96  }
97  input.popLimit(limit);
98  break;
99  }
100  case 33: {
101  if (!((mutable_bitField0_ & 0x00000020) != 0)) {
102  dualValue_ = newDoubleList();
103  mutable_bitField0_ |= 0x00000020;
104  }
105  dualValue_.addDouble(input.readDouble());
106  break;
107  }
108  case 34: {
109  int length = input.readRawVarint32();
110  int limit = input.pushLimit(length);
111  if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
112  dualValue_ = newDoubleList();
113  mutable_bitField0_ |= 0x00000020;
114  }
115  while (input.getBytesUntilLimit() > 0) {
116  dualValue_.addDouble(input.readDouble());
117  }
118  input.popLimit(limit);
119  break;
120  }
121  case 41: {
122  bitField0_ |= 0x00000008;
123  bestObjectiveBound_ = input.readDouble();
124  break;
125  }
126  case 49: {
127  if (!((mutable_bitField0_ & 0x00000040) != 0)) {
128  reducedCost_ = newDoubleList();
129  mutable_bitField0_ |= 0x00000040;
130  }
131  reducedCost_.addDouble(input.readDouble());
132  break;
133  }
134  case 50: {
135  int length = input.readRawVarint32();
136  int limit = input.pushLimit(length);
137  if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
138  reducedCost_ = newDoubleList();
139  mutable_bitField0_ |= 0x00000040;
140  }
141  while (input.getBytesUntilLimit() > 0) {
142  reducedCost_.addDouble(input.readDouble());
143  }
144  input.popLimit(limit);
145  break;
146  }
147  case 58: {
148  com.google.protobuf.ByteString bs = input.readBytes();
149  bitField0_ |= 0x00000002;
150  statusStr_ = bs;
151  break;
152  }
153  case 66: {
154  if (!((mutable_bitField0_ & 0x00000080) != 0)) {
155  additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>();
156  mutable_bitField0_ |= 0x00000080;
157  }
158  additionalSolutions_.add(
159  input.readMessage(com.google.ortools.linearsolver.MPSolution.PARSER, extensionRegistry));
160  break;
161  }
162  default: {
163  if (!parseUnknownField(
164  input, unknownFields, extensionRegistry, tag)) {
165  done = true;
166  }
167  break;
168  }
169  }
170  }
171  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
172  throw e.setUnfinishedMessage(this);
173  } catch (java.io.IOException e) {
174  throw new com.google.protobuf.InvalidProtocolBufferException(
175  e).setUnfinishedMessage(this);
176  } finally {
177  if (((mutable_bitField0_ & 0x00000010) != 0)) {
178  variableValue_.makeImmutable(); // C
179  }
180  if (((mutable_bitField0_ & 0x00000020) != 0)) {
181  dualValue_.makeImmutable(); // C
182  }
183  if (((mutable_bitField0_ & 0x00000040) != 0)) {
184  reducedCost_.makeImmutable(); // C
185  }
186  if (((mutable_bitField0_ & 0x00000080) != 0)) {
187  additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
188  }
189  this.unknownFields = unknownFields.build();
190  makeExtensionsImmutable();
191  }
192  }
193  public static final com.google.protobuf.Descriptors.Descriptor
195  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
196  }
197 
198  @java.lang.Override
199  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
201  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
202  .ensureFieldAccessorsInitialized(
203  com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
204  }
205 
206  private int bitField0_;
207  public static final int STATUS_FIELD_NUMBER = 1;
208  private int status_;
217  @java.lang.Override public boolean hasStatus() {
218  return ((bitField0_ & 0x00000001) != 0);
219  }
228  @java.lang.Override public com.google.ortools.linearsolver.MPSolverResponseStatus getStatus() {
229  @SuppressWarnings("deprecation")
230  com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(status_);
231  return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
232  }
233 
234  public static final int STATUS_STR_FIELD_NUMBER = 7;
235  private volatile java.lang.Object statusStr_;
247  @java.lang.Override
248  public boolean hasStatusStr() {
249  return ((bitField0_ & 0x00000002) != 0);
250  }
262  @java.lang.Override
263  public java.lang.String getStatusStr() {
264  java.lang.Object ref = statusStr_;
265  if (ref instanceof java.lang.String) {
266  return (java.lang.String) ref;
267  } else {
268  com.google.protobuf.ByteString bs =
269  (com.google.protobuf.ByteString) ref;
270  java.lang.String s = bs.toStringUtf8();
271  if (bs.isValidUtf8()) {
272  statusStr_ = s;
273  }
274  return s;
275  }
276  }
288  @java.lang.Override
289  public com.google.protobuf.ByteString
291  java.lang.Object ref = statusStr_;
292  if (ref instanceof java.lang.String) {
293  com.google.protobuf.ByteString b =
294  com.google.protobuf.ByteString.copyFromUtf8(
295  (java.lang.String) ref);
296  statusStr_ = b;
297  return b;
298  } else {
299  return (com.google.protobuf.ByteString) ref;
300  }
301  }
302 
303  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
304  private double objectiveValue_;
315  @java.lang.Override
316  public boolean hasObjectiveValue() {
317  return ((bitField0_ & 0x00000004) != 0);
318  }
329  @java.lang.Override
330  public double getObjectiveValue() {
331  return objectiveValue_;
332  }
333 
334  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
335  private double bestObjectiveBound_;
348  @java.lang.Override
349  public boolean hasBestObjectiveBound() {
350  return ((bitField0_ & 0x00000008) != 0);
351  }
364  @java.lang.Override
365  public double getBestObjectiveBound() {
366  return bestObjectiveBound_;
367  }
368 
369  public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
370  private com.google.protobuf.Internal.DoubleList variableValue_;
381  @java.lang.Override
382  public java.util.List<java.lang.Double>
384  return variableValue_;
385  }
396  public int getVariableValueCount() {
397  return variableValue_.size();
398  }
410  public double getVariableValue(int index) {
411  return variableValue_.getDouble(index);
412  }
413  private int variableValueMemoizedSerializedSize = -1;
414 
415  public static final int DUAL_VALUE_FIELD_NUMBER = 4;
416  private com.google.protobuf.Internal.DoubleList dualValue_;
430  @java.lang.Override
431  public java.util.List<java.lang.Double>
433  return dualValue_;
434  }
448  public int getDualValueCount() {
449  return dualValue_.size();
450  }
465  public double getDualValue(int index) {
466  return dualValue_.getDouble(index);
467  }
468  private int dualValueMemoizedSerializedSize = -1;
469 
470  public static final int REDUCED_COST_FIELD_NUMBER = 6;
471  private com.google.protobuf.Internal.DoubleList reducedCost_;
485  @java.lang.Override
486  public java.util.List<java.lang.Double>
488  return reducedCost_;
489  }
503  public int getReducedCostCount() {
504  return reducedCost_.size();
505  }
520  public double getReducedCost(int index) {
521  return reducedCost_.getDouble(index);
522  }
523  private int reducedCostMemoizedSerializedSize = -1;
524 
525  public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 8;
526  private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_;
538  @java.lang.Override
539  public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
540  return additionalSolutions_;
541  }
553  @java.lang.Override
554  public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
556  return additionalSolutions_;
557  }
569  @java.lang.Override
571  return additionalSolutions_.size();
572  }
584  @java.lang.Override
585  public com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index) {
586  return additionalSolutions_.get(index);
587  }
599  @java.lang.Override
600  public com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(
601  int index) {
602  return additionalSolutions_.get(index);
603  }
604 
605  private byte memoizedIsInitialized = -1;
606  @java.lang.Override
607  public final boolean isInitialized() {
608  byte isInitialized = memoizedIsInitialized;
609  if (isInitialized == 1) return true;
610  if (isInitialized == 0) return false;
611 
612  memoizedIsInitialized = 1;
613  return true;
614  }
615 
616  @java.lang.Override
617  public void writeTo(com.google.protobuf.CodedOutputStream output)
618  throws java.io.IOException {
620  if (((bitField0_ & 0x00000001) != 0)) {
621  output.writeEnum(1, status_);
622  }
623  if (((bitField0_ & 0x00000004) != 0)) {
624  output.writeDouble(2, objectiveValue_);
625  }
626  if (getVariableValueList().size() > 0) {
627  output.writeUInt32NoTag(26);
628  output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
629  }
630  for (int i = 0; i < variableValue_.size(); i++) {
631  output.writeDoubleNoTag(variableValue_.getDouble(i));
632  }
633  if (getDualValueList().size() > 0) {
634  output.writeUInt32NoTag(34);
635  output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
636  }
637  for (int i = 0; i < dualValue_.size(); i++) {
638  output.writeDoubleNoTag(dualValue_.getDouble(i));
639  }
640  if (((bitField0_ & 0x00000008) != 0)) {
641  output.writeDouble(5, bestObjectiveBound_);
642  }
643  if (getReducedCostList().size() > 0) {
644  output.writeUInt32NoTag(50);
645  output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
646  }
647  for (int i = 0; i < reducedCost_.size(); i++) {
648  output.writeDoubleNoTag(reducedCost_.getDouble(i));
649  }
650  if (((bitField0_ & 0x00000002) != 0)) {
651  com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
652  }
653  for (int i = 0; i < additionalSolutions_.size(); i++) {
654  output.writeMessage(8, additionalSolutions_.get(i));
655  }
656  unknownFields.writeTo(output);
657  }
658 
659  @java.lang.Override
660  public int getSerializedSize() {
661  int size = memoizedSize;
662  if (size != -1) return size;
663 
664  size = 0;
665  if (((bitField0_ & 0x00000001) != 0)) {
666  size += com.google.protobuf.CodedOutputStream
667  .computeEnumSize(1, status_);
668  }
669  if (((bitField0_ & 0x00000004) != 0)) {
670  size += com.google.protobuf.CodedOutputStream
671  .computeDoubleSize(2, objectiveValue_);
672  }
673  {
674  int dataSize = 0;
675  dataSize = 8 * getVariableValueList().size();
676  size += dataSize;
677  if (!getVariableValueList().isEmpty()) {
678  size += 1;
679  size += com.google.protobuf.CodedOutputStream
680  .computeInt32SizeNoTag(dataSize);
681  }
682  variableValueMemoizedSerializedSize = dataSize;
683  }
684  {
685  int dataSize = 0;
686  dataSize = 8 * getDualValueList().size();
687  size += dataSize;
688  if (!getDualValueList().isEmpty()) {
689  size += 1;
690  size += com.google.protobuf.CodedOutputStream
691  .computeInt32SizeNoTag(dataSize);
692  }
693  dualValueMemoizedSerializedSize = dataSize;
694  }
695  if (((bitField0_ & 0x00000008) != 0)) {
696  size += com.google.protobuf.CodedOutputStream
697  .computeDoubleSize(5, bestObjectiveBound_);
698  }
699  {
700  int dataSize = 0;
701  dataSize = 8 * getReducedCostList().size();
702  size += dataSize;
703  if (!getReducedCostList().isEmpty()) {
704  size += 1;
705  size += com.google.protobuf.CodedOutputStream
706  .computeInt32SizeNoTag(dataSize);
707  }
708  reducedCostMemoizedSerializedSize = dataSize;
709  }
710  if (((bitField0_ & 0x00000002) != 0)) {
711  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
712  }
713  for (int i = 0; i < additionalSolutions_.size(); i++) {
714  size += com.google.protobuf.CodedOutputStream
715  .computeMessageSize(8, additionalSolutions_.get(i));
716  }
717  size += unknownFields.getSerializedSize();
718  memoizedSize = size;
719  return size;
720  }
721 
722  @java.lang.Override
723  public boolean equals(final java.lang.Object obj) {
724  if (obj == this) {
725  return true;
726  }
727  if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
728  return super.equals(obj);
729  }
730  com.google.ortools.linearsolver.MPSolutionResponse other = (com.google.ortools.linearsolver.MPSolutionResponse) obj;
731 
732  if (hasStatus() != other.hasStatus()) return false;
733  if (hasStatus()) {
734  if (status_ != other.status_) return false;
735  }
736  if (hasStatusStr() != other.hasStatusStr()) return false;
737  if (hasStatusStr()) {
738  if (!getStatusStr()
739  .equals(other.getStatusStr())) return false;
740  }
741  if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
742  if (hasObjectiveValue()) {
743  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
744  != java.lang.Double.doubleToLongBits(
745  other.getObjectiveValue())) return false;
746  }
747  if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
748  if (hasBestObjectiveBound()) {
749  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
750  != java.lang.Double.doubleToLongBits(
751  other.getBestObjectiveBound())) return false;
752  }
753  if (!getVariableValueList()
754  .equals(other.getVariableValueList())) return false;
755  if (!getDualValueList()
756  .equals(other.getDualValueList())) return false;
757  if (!getReducedCostList()
758  .equals(other.getReducedCostList())) return false;
760  .equals(other.getAdditionalSolutionsList())) return false;
761  if (!unknownFields.equals(other.unknownFields)) return false;
762  return true;
763  }
764 
765  @java.lang.Override
766  public int hashCode() {
767  if (memoizedHashCode != 0) {
768  return memoizedHashCode;
769  }
770  int hash = 41;
771  hash = (19 * hash) + getDescriptor().hashCode();
772  if (hasStatus()) {
773  hash = (37 * hash) + STATUS_FIELD_NUMBER;
774  hash = (53 * hash) + status_;
775  }
776  if (hasStatusStr()) {
777  hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
778  hash = (53 * hash) + getStatusStr().hashCode();
779  }
780  if (hasObjectiveValue()) {
781  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
782  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
783  java.lang.Double.doubleToLongBits(getObjectiveValue()));
784  }
785  if (hasBestObjectiveBound()) {
786  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
787  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
788  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
789  }
790  if (getVariableValueCount() > 0) {
791  hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
792  hash = (53 * hash) + getVariableValueList().hashCode();
793  }
794  if (getDualValueCount() > 0) {
795  hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
796  hash = (53 * hash) + getDualValueList().hashCode();
797  }
798  if (getReducedCostCount() > 0) {
799  hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
800  hash = (53 * hash) + getReducedCostList().hashCode();
801  }
802  if (getAdditionalSolutionsCount() > 0) {
803  hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
804  hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
805  }
806  hash = (29 * hash) + unknownFields.hashCode();
807  memoizedHashCode = hash;
808  return hash;
809  }
810 
811  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
812  java.nio.ByteBuffer data)
813  throws com.google.protobuf.InvalidProtocolBufferException {
814  return PARSER.parseFrom(data);
815  }
816  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
817  java.nio.ByteBuffer data,
818  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
819  throws com.google.protobuf.InvalidProtocolBufferException {
820  return PARSER.parseFrom(data, extensionRegistry);
821  }
822  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
823  com.google.protobuf.ByteString data)
824  throws com.google.protobuf.InvalidProtocolBufferException {
825  return PARSER.parseFrom(data);
826  }
827  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
828  com.google.protobuf.ByteString data,
829  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
830  throws com.google.protobuf.InvalidProtocolBufferException {
831  return PARSER.parseFrom(data, extensionRegistry);
832  }
833  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
834  throws com.google.protobuf.InvalidProtocolBufferException {
835  return PARSER.parseFrom(data);
836  }
837  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
838  byte[] data,
839  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
840  throws com.google.protobuf.InvalidProtocolBufferException {
841  return PARSER.parseFrom(data, extensionRegistry);
842  }
843  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
844  throws java.io.IOException {
845  return com.google.protobuf.GeneratedMessageV3
846  .parseWithIOException(PARSER, input);
847  }
848  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
849  java.io.InputStream input,
850  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
851  throws java.io.IOException {
852  return com.google.protobuf.GeneratedMessageV3
853  .parseWithIOException(PARSER, input, extensionRegistry);
854  }
855  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
856  throws java.io.IOException {
857  return com.google.protobuf.GeneratedMessageV3
858  .parseDelimitedWithIOException(PARSER, input);
859  }
860  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(
861  java.io.InputStream input,
862  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
863  throws java.io.IOException {
864  return com.google.protobuf.GeneratedMessageV3
865  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
866  }
867  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
868  com.google.protobuf.CodedInputStream input)
869  throws java.io.IOException {
870  return com.google.protobuf.GeneratedMessageV3
871  .parseWithIOException(PARSER, input);
872  }
873  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
874  com.google.protobuf.CodedInputStream input,
875  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
876  throws java.io.IOException {
877  return com.google.protobuf.GeneratedMessageV3
878  .parseWithIOException(PARSER, input, extensionRegistry);
879  }
880 
881  @java.lang.Override
882  public Builder newBuilderForType() { return newBuilder(); }
883  public static Builder newBuilder() {
884  return DEFAULT_INSTANCE.toBuilder();
885  }
886  public static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype) {
887  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
888  }
889  @java.lang.Override
890  public Builder toBuilder() {
891  return this == DEFAULT_INSTANCE
892  ? new Builder() : new Builder().mergeFrom(this);
893  }
894 
895  @java.lang.Override
897  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
898  Builder builder = new Builder(parent);
899  return builder;
900  }
908  public static final class Builder extends
909  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
910  // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
911  com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
912  public static final com.google.protobuf.Descriptors.Descriptor
914  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
915  }
916 
917  @java.lang.Override
918  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
920  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
921  .ensureFieldAccessorsInitialized(
922  com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
923  }
924 
925  // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
926  private Builder() {
927  maybeForceBuilderInitialization();
928  }
929 
930  private Builder(
931  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
932  super(parent);
933  maybeForceBuilderInitialization();
934  }
935  private void maybeForceBuilderInitialization() {
936  if (com.google.protobuf.GeneratedMessageV3
937  .alwaysUseFieldBuilders) {
938  getAdditionalSolutionsFieldBuilder();
939  }
940  }
941  @java.lang.Override
942  public Builder clear() {
943  super.clear();
944  status_ = 99;
945  bitField0_ = (bitField0_ & ~0x00000001);
946  statusStr_ = "";
947  bitField0_ = (bitField0_ & ~0x00000002);
948  objectiveValue_ = 0D;
949  bitField0_ = (bitField0_ & ~0x00000004);
950  bestObjectiveBound_ = 0D;
951  bitField0_ = (bitField0_ & ~0x00000008);
952  variableValue_ = emptyDoubleList();
953  bitField0_ = (bitField0_ & ~0x00000010);
954  dualValue_ = emptyDoubleList();
955  bitField0_ = (bitField0_ & ~0x00000020);
956  reducedCost_ = emptyDoubleList();
957  bitField0_ = (bitField0_ & ~0x00000040);
958  if (additionalSolutionsBuilder_ == null) {
959  additionalSolutions_ = java.util.Collections.emptyList();
960  bitField0_ = (bitField0_ & ~0x00000080);
961  } else {
962  additionalSolutionsBuilder_.clear();
963  }
964  return this;
965  }
966 
967  @java.lang.Override
968  public com.google.protobuf.Descriptors.Descriptor
970  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
971  }
972 
973  @java.lang.Override
974  public com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType() {
975  return com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance();
976  }
977 
978  @java.lang.Override
979  public com.google.ortools.linearsolver.MPSolutionResponse build() {
980  com.google.ortools.linearsolver.MPSolutionResponse result = buildPartial();
981  if (!result.isInitialized()) {
982  throw newUninitializedMessageException(result);
983  }
984  return result;
985  }
986 
987  @java.lang.Override
988  public com.google.ortools.linearsolver.MPSolutionResponse buildPartial() {
989  com.google.ortools.linearsolver.MPSolutionResponse result = new com.google.ortools.linearsolver.MPSolutionResponse(this);
990  int from_bitField0_ = bitField0_;
991  int to_bitField0_ = 0;
992  if (((from_bitField0_ & 0x00000001) != 0)) {
993  to_bitField0_ |= 0x00000001;
994  }
995  result.status_ = status_;
996  if (((from_bitField0_ & 0x00000002) != 0)) {
997  to_bitField0_ |= 0x00000002;
998  }
999  result.statusStr_ = statusStr_;
1000  if (((from_bitField0_ & 0x00000004) != 0)) {
1001  result.objectiveValue_ = objectiveValue_;
1002  to_bitField0_ |= 0x00000004;
1003  }
1004  if (((from_bitField0_ & 0x00000008) != 0)) {
1005  result.bestObjectiveBound_ = bestObjectiveBound_;
1006  to_bitField0_ |= 0x00000008;
1007  }
1008  if (((bitField0_ & 0x00000010) != 0)) {
1009  variableValue_.makeImmutable();
1010  bitField0_ = (bitField0_ & ~0x00000010);
1011  }
1012  result.variableValue_ = variableValue_;
1013  if (((bitField0_ & 0x00000020) != 0)) {
1014  dualValue_.makeImmutable();
1015  bitField0_ = (bitField0_ & ~0x00000020);
1016  }
1017  result.dualValue_ = dualValue_;
1018  if (((bitField0_ & 0x00000040) != 0)) {
1019  reducedCost_.makeImmutable();
1020  bitField0_ = (bitField0_ & ~0x00000040);
1021  }
1022  result.reducedCost_ = reducedCost_;
1023  if (additionalSolutionsBuilder_ == null) {
1024  if (((bitField0_ & 0x00000080) != 0)) {
1025  additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
1026  bitField0_ = (bitField0_ & ~0x00000080);
1027  }
1028  result.additionalSolutions_ = additionalSolutions_;
1029  } else {
1030  result.additionalSolutions_ = additionalSolutionsBuilder_.build();
1031  }
1032  result.bitField0_ = to_bitField0_;
1033  onBuilt();
1034  return result;
1035  }
1036 
1037  @java.lang.Override
1038  public Builder clone() {
1039  return super.clone();
1040  }
1041  @java.lang.Override
1043  com.google.protobuf.Descriptors.FieldDescriptor field,
1044  java.lang.Object value) {
1045  return super.setField(field, value);
1046  }
1047  @java.lang.Override
1049  com.google.protobuf.Descriptors.FieldDescriptor field) {
1050  return super.clearField(field);
1051  }
1052  @java.lang.Override
1054  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1055  return super.clearOneof(oneof);
1056  }
1057  @java.lang.Override
1059  com.google.protobuf.Descriptors.FieldDescriptor field,
1060  int index, java.lang.Object value) {
1061  return super.setRepeatedField(field, index, value);
1062  }
1063  @java.lang.Override
1065  com.google.protobuf.Descriptors.FieldDescriptor field,
1066  java.lang.Object value) {
1067  return super.addRepeatedField(field, value);
1068  }
1069  @java.lang.Override
1070  public Builder mergeFrom(com.google.protobuf.Message other) {
1071  if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
1072  return mergeFrom((com.google.ortools.linearsolver.MPSolutionResponse)other);
1073  } else {
1074  super.mergeFrom(other);
1075  return this;
1076  }
1077  }
1078 
1079  public Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other) {
1080  if (other == com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance()) return this;
1081  if (other.hasStatus()) {
1082  setStatus(other.getStatus());
1083  }
1084  if (other.hasStatusStr()) {
1085  bitField0_ |= 0x00000002;
1086  statusStr_ = other.statusStr_;
1087  onChanged();
1088  }
1089  if (other.hasObjectiveValue()) {
1090  setObjectiveValue(other.getObjectiveValue());
1091  }
1092  if (other.hasBestObjectiveBound()) {
1093  setBestObjectiveBound(other.getBestObjectiveBound());
1094  }
1095  if (!other.variableValue_.isEmpty()) {
1096  if (variableValue_.isEmpty()) {
1097  variableValue_ = other.variableValue_;
1098  bitField0_ = (bitField0_ & ~0x00000010);
1099  } else {
1100  ensureVariableValueIsMutable();
1101  variableValue_.addAll(other.variableValue_);
1102  }
1103  onChanged();
1104  }
1105  if (!other.dualValue_.isEmpty()) {
1106  if (dualValue_.isEmpty()) {
1107  dualValue_ = other.dualValue_;
1108  bitField0_ = (bitField0_ & ~0x00000020);
1109  } else {
1110  ensureDualValueIsMutable();
1111  dualValue_.addAll(other.dualValue_);
1112  }
1113  onChanged();
1114  }
1115  if (!other.reducedCost_.isEmpty()) {
1116  if (reducedCost_.isEmpty()) {
1117  reducedCost_ = other.reducedCost_;
1118  bitField0_ = (bitField0_ & ~0x00000040);
1119  } else {
1120  ensureReducedCostIsMutable();
1121  reducedCost_.addAll(other.reducedCost_);
1122  }
1123  onChanged();
1124  }
1125  if (additionalSolutionsBuilder_ == null) {
1126  if (!other.additionalSolutions_.isEmpty()) {
1127  if (additionalSolutions_.isEmpty()) {
1128  additionalSolutions_ = other.additionalSolutions_;
1129  bitField0_ = (bitField0_ & ~0x00000080);
1130  } else {
1131  ensureAdditionalSolutionsIsMutable();
1132  additionalSolutions_.addAll(other.additionalSolutions_);
1133  }
1134  onChanged();
1135  }
1136  } else {
1137  if (!other.additionalSolutions_.isEmpty()) {
1138  if (additionalSolutionsBuilder_.isEmpty()) {
1139  additionalSolutionsBuilder_.dispose();
1140  additionalSolutionsBuilder_ = null;
1141  additionalSolutions_ = other.additionalSolutions_;
1142  bitField0_ = (bitField0_ & ~0x00000080);
1143  additionalSolutionsBuilder_ =
1144  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1145  getAdditionalSolutionsFieldBuilder() : null;
1146  } else {
1147  additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1148  }
1149  }
1150  }
1151  this.mergeUnknownFields(other.unknownFields);
1152  onChanged();
1153  return this;
1154  }
1155 
1156  @java.lang.Override
1157  public final boolean isInitialized() {
1158  return true;
1159  }
1160 
1161  @java.lang.Override
1163  com.google.protobuf.CodedInputStream input,
1164  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1165  throws java.io.IOException {
1166  com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
1167  try {
1168  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1169  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1170  parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
1171  throw e.unwrapIOException();
1172  } finally {
1173  if (parsedMessage != null) {
1174  mergeFrom(parsedMessage);
1175  }
1176  }
1177  return this;
1178  }
1179  private int bitField0_;
1180 
1181  private int status_ = 99;
1190  @java.lang.Override public boolean hasStatus() {
1191  return ((bitField0_ & 0x00000001) != 0);
1192  }
1201  @java.lang.Override
1202  public com.google.ortools.linearsolver.MPSolverResponseStatus getStatus() {
1203  @SuppressWarnings("deprecation")
1204  com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(status_);
1205  return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
1206  }
1216  public Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value) {
1217  if (value == null) {
1218  throw new NullPointerException();
1219  }
1220  bitField0_ |= 0x00000001;
1221  status_ = value.getNumber();
1222  onChanged();
1223  return this;
1224  }
1234  bitField0_ = (bitField0_ & ~0x00000001);
1235  status_ = 99;
1236  onChanged();
1237  return this;
1238  }
1239 
1240  private java.lang.Object statusStr_ = "";
1252  public boolean hasStatusStr() {
1253  return ((bitField0_ & 0x00000002) != 0);
1254  }
1266  public java.lang.String getStatusStr() {
1267  java.lang.Object ref = statusStr_;
1268  if (!(ref instanceof java.lang.String)) {
1269  com.google.protobuf.ByteString bs =
1270  (com.google.protobuf.ByteString) ref;
1271  java.lang.String s = bs.toStringUtf8();
1272  if (bs.isValidUtf8()) {
1273  statusStr_ = s;
1274  }
1275  return s;
1276  } else {
1277  return (java.lang.String) ref;
1278  }
1279  }
1291  public com.google.protobuf.ByteString
1293  java.lang.Object ref = statusStr_;
1294  if (ref instanceof String) {
1295  com.google.protobuf.ByteString b =
1296  com.google.protobuf.ByteString.copyFromUtf8(
1297  (java.lang.String) ref);
1298  statusStr_ = b;
1299  return b;
1300  } else {
1301  return (com.google.protobuf.ByteString) ref;
1302  }
1303  }
1317  java.lang.String value) {
1318  if (value == null) {
1319  throw new NullPointerException();
1320  }
1321  bitField0_ |= 0x00000002;
1322  statusStr_ = value;
1323  onChanged();
1324  return this;
1325  }
1338  bitField0_ = (bitField0_ & ~0x00000002);
1339  statusStr_ = getDefaultInstance().getStatusStr();
1340  onChanged();
1341  return this;
1342  }
1356  com.google.protobuf.ByteString value) {
1357  if (value == null) {
1358  throw new NullPointerException();
1359  }
1360  bitField0_ |= 0x00000002;
1361  statusStr_ = value;
1362  onChanged();
1363  return this;
1364  }
1365 
1366  private double objectiveValue_ ;
1377  @java.lang.Override
1378  public boolean hasObjectiveValue() {
1379  return ((bitField0_ & 0x00000004) != 0);
1380  }
1391  @java.lang.Override
1392  public double getObjectiveValue() {
1393  return objectiveValue_;
1394  }
1406  public Builder setObjectiveValue(double value) {
1407  bitField0_ |= 0x00000004;
1408  objectiveValue_ = value;
1409  onChanged();
1410  return this;
1411  }
1423  bitField0_ = (bitField0_ & ~0x00000004);
1424  objectiveValue_ = 0D;
1425  onChanged();
1426  return this;
1427  }
1428 
1429  private double bestObjectiveBound_ ;
1442  @java.lang.Override
1443  public boolean hasBestObjectiveBound() {
1444  return ((bitField0_ & 0x00000008) != 0);
1445  }
1458  @java.lang.Override
1459  public double getBestObjectiveBound() {
1460  return bestObjectiveBound_;
1461  }
1475  public Builder setBestObjectiveBound(double value) {
1476  bitField0_ |= 0x00000008;
1477  bestObjectiveBound_ = value;
1478  onChanged();
1479  return this;
1480  }
1494  bitField0_ = (bitField0_ & ~0x00000008);
1495  bestObjectiveBound_ = 0D;
1496  onChanged();
1497  return this;
1498  }
1499 
1500  private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1501  private void ensureVariableValueIsMutable() {
1502  if (!((bitField0_ & 0x00000010) != 0)) {
1503  variableValue_ = mutableCopy(variableValue_);
1504  bitField0_ |= 0x00000010;
1505  }
1506  }
1517  public java.util.List<java.lang.Double>
1519  return ((bitField0_ & 0x00000010) != 0) ?
1520  java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1521  }
1532  public int getVariableValueCount() {
1533  return variableValue_.size();
1534  }
1546  public double getVariableValue(int index) {
1547  return variableValue_.getDouble(index);
1548  }
1562  int index, double value) {
1563  ensureVariableValueIsMutable();
1564  variableValue_.setDouble(index, value);
1565  onChanged();
1566  return this;
1567  }
1579  public Builder addVariableValue(double value) {
1580  ensureVariableValueIsMutable();
1581  variableValue_.addDouble(value);
1582  onChanged();
1583  return this;
1584  }
1597  java.lang.Iterable<? extends java.lang.Double> values) {
1598  ensureVariableValueIsMutable();
1599  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1600  values, variableValue_);
1601  onChanged();
1602  return this;
1603  }
1615  variableValue_ = emptyDoubleList();
1616  bitField0_ = (bitField0_ & ~0x00000010);
1617  onChanged();
1618  return this;
1619  }
1620 
1621  private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1622  private void ensureDualValueIsMutable() {
1623  if (!((bitField0_ & 0x00000020) != 0)) {
1624  dualValue_ = mutableCopy(dualValue_);
1625  bitField0_ |= 0x00000020;
1626  }
1627  }
1641  public java.util.List<java.lang.Double>
1643  return ((bitField0_ & 0x00000020) != 0) ?
1644  java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1645  }
1659  public int getDualValueCount() {
1660  return dualValue_.size();
1661  }
1676  public double getDualValue(int index) {
1677  return dualValue_.getDouble(index);
1678  }
1695  int index, double value) {
1696  ensureDualValueIsMutable();
1697  dualValue_.setDouble(index, value);
1698  onChanged();
1699  return this;
1700  }
1715  public Builder addDualValue(double value) {
1716  ensureDualValueIsMutable();
1717  dualValue_.addDouble(value);
1718  onChanged();
1719  return this;
1720  }
1736  java.lang.Iterable<? extends java.lang.Double> values) {
1737  ensureDualValueIsMutable();
1738  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1739  values, dualValue_);
1740  onChanged();
1741  return this;
1742  }
1757  dualValue_ = emptyDoubleList();
1758  bitField0_ = (bitField0_ & ~0x00000020);
1759  onChanged();
1760  return this;
1761  }
1762 
1763  private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1764  private void ensureReducedCostIsMutable() {
1765  if (!((bitField0_ & 0x00000040) != 0)) {
1766  reducedCost_ = mutableCopy(reducedCost_);
1767  bitField0_ |= 0x00000040;
1768  }
1769  }
1783  public java.util.List<java.lang.Double>
1785  return ((bitField0_ & 0x00000040) != 0) ?
1786  java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1787  }
1801  public int getReducedCostCount() {
1802  return reducedCost_.size();
1803  }
1818  public double getReducedCost(int index) {
1819  return reducedCost_.getDouble(index);
1820  }
1837  int index, double value) {
1838  ensureReducedCostIsMutable();
1839  reducedCost_.setDouble(index, value);
1840  onChanged();
1841  return this;
1842  }
1857  public Builder addReducedCost(double value) {
1858  ensureReducedCostIsMutable();
1859  reducedCost_.addDouble(value);
1860  onChanged();
1861  return this;
1862  }
1878  java.lang.Iterable<? extends java.lang.Double> values) {
1879  ensureReducedCostIsMutable();
1880  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1881  values, reducedCost_);
1882  onChanged();
1883  return this;
1884  }
1899  reducedCost_ = emptyDoubleList();
1900  bitField0_ = (bitField0_ & ~0x00000040);
1901  onChanged();
1902  return this;
1903  }
1904 
1905  private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_ =
1906  java.util.Collections.emptyList();
1907  private void ensureAdditionalSolutionsIsMutable() {
1908  if (!((bitField0_ & 0x00000080) != 0)) {
1909  additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>(additionalSolutions_);
1910  bitField0_ |= 0x00000080;
1911  }
1912  }
1913 
1914  private com.google.protobuf.RepeatedFieldBuilderV3<
1915  com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder> additionalSolutionsBuilder_;
1916 
1928  public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
1929  if (additionalSolutionsBuilder_ == null) {
1930  return java.util.Collections.unmodifiableList(additionalSolutions_);
1931  } else {
1932  return additionalSolutionsBuilder_.getMessageList();
1933  }
1934  }
1947  if (additionalSolutionsBuilder_ == null) {
1948  return additionalSolutions_.size();
1949  } else {
1950  return additionalSolutionsBuilder_.getCount();
1951  }
1952  }
1964  public com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index) {
1965  if (additionalSolutionsBuilder_ == null) {
1966  return additionalSolutions_.get(index);
1967  } else {
1968  return additionalSolutionsBuilder_.getMessage(index);
1969  }
1970  }
1983  int index, com.google.ortools.linearsolver.MPSolution value) {
1984  if (additionalSolutionsBuilder_ == null) {
1985  if (value == null) {
1986  throw new NullPointerException();
1987  }
1988  ensureAdditionalSolutionsIsMutable();
1989  additionalSolutions_.set(index, value);
1990  onChanged();
1991  } else {
1992  additionalSolutionsBuilder_.setMessage(index, value);
1993  }
1994  return this;
1995  }
2008  int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2009  if (additionalSolutionsBuilder_ == null) {
2010  ensureAdditionalSolutionsIsMutable();
2011  additionalSolutions_.set(index, builderForValue.build());
2012  onChanged();
2013  } else {
2014  additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2015  }
2016  return this;
2017  }
2029  public Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value) {
2030  if (additionalSolutionsBuilder_ == null) {
2031  if (value == null) {
2032  throw new NullPointerException();
2033  }
2034  ensureAdditionalSolutionsIsMutable();
2035  additionalSolutions_.add(value);
2036  onChanged();
2037  } else {
2038  additionalSolutionsBuilder_.addMessage(value);
2039  }
2040  return this;
2041  }
2054  int index, com.google.ortools.linearsolver.MPSolution value) {
2055  if (additionalSolutionsBuilder_ == null) {
2056  if (value == null) {
2057  throw new NullPointerException();
2058  }
2059  ensureAdditionalSolutionsIsMutable();
2060  additionalSolutions_.add(index, value);
2061  onChanged();
2062  } else {
2063  additionalSolutionsBuilder_.addMessage(index, value);
2064  }
2065  return this;
2066  }
2079  com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2080  if (additionalSolutionsBuilder_ == null) {
2081  ensureAdditionalSolutionsIsMutable();
2082  additionalSolutions_.add(builderForValue.build());
2083  onChanged();
2084  } else {
2085  additionalSolutionsBuilder_.addMessage(builderForValue.build());
2086  }
2087  return this;
2088  }
2101  int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2102  if (additionalSolutionsBuilder_ == null) {
2103  ensureAdditionalSolutionsIsMutable();
2104  additionalSolutions_.add(index, builderForValue.build());
2105  onChanged();
2106  } else {
2107  additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2108  }
2109  return this;
2110  }
2123  java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution> values) {
2124  if (additionalSolutionsBuilder_ == null) {
2125  ensureAdditionalSolutionsIsMutable();
2126  com.google.protobuf.AbstractMessageLite.Builder.addAll(
2127  values, additionalSolutions_);
2128  onChanged();
2129  } else {
2130  additionalSolutionsBuilder_.addAllMessages(values);
2131  }
2132  return this;
2133  }
2146  if (additionalSolutionsBuilder_ == null) {
2147  additionalSolutions_ = java.util.Collections.emptyList();
2148  bitField0_ = (bitField0_ & ~0x00000080);
2149  onChanged();
2150  } else {
2151  additionalSolutionsBuilder_.clear();
2152  }
2153  return this;
2154  }
2167  if (additionalSolutionsBuilder_ == null) {
2168  ensureAdditionalSolutionsIsMutable();
2169  additionalSolutions_.remove(index);
2170  onChanged();
2171  } else {
2172  additionalSolutionsBuilder_.remove(index);
2173  }
2174  return this;
2175  }
2187  public com.google.ortools.linearsolver.MPSolution.Builder getAdditionalSolutionsBuilder(
2188  int index) {
2189  return getAdditionalSolutionsFieldBuilder().getBuilder(index);
2190  }
2202  public com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(
2203  int index) {
2204  if (additionalSolutionsBuilder_ == null) {
2205  return additionalSolutions_.get(index); } else {
2206  return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2207  }
2208  }
2220  public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
2222  if (additionalSolutionsBuilder_ != null) {
2223  return additionalSolutionsBuilder_.getMessageOrBuilderList();
2224  } else {
2225  return java.util.Collections.unmodifiableList(additionalSolutions_);
2226  }
2227  }
2239  public com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder() {
2240  return getAdditionalSolutionsFieldBuilder().addBuilder(
2241  com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2242  }
2254  public com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder(
2255  int index) {
2256  return getAdditionalSolutionsFieldBuilder().addBuilder(
2257  index, com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2258  }
2270  public java.util.List<com.google.ortools.linearsolver.MPSolution.Builder>
2272  return getAdditionalSolutionsFieldBuilder().getBuilderList();
2273  }
2274  private com.google.protobuf.RepeatedFieldBuilderV3<
2275  com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>
2276  getAdditionalSolutionsFieldBuilder() {
2277  if (additionalSolutionsBuilder_ == null) {
2278  additionalSolutionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2279  com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>(
2280  additionalSolutions_,
2281  ((bitField0_ & 0x00000080) != 0),
2282  getParentForChildren(),
2283  isClean());
2284  additionalSolutions_ = null;
2285  }
2286  return additionalSolutionsBuilder_;
2287  }
2288  @java.lang.Override
2290  final com.google.protobuf.UnknownFieldSet unknownFields) {
2291  return super.setUnknownFields(unknownFields);
2292  }
2293 
2294  @java.lang.Override
2296  final com.google.protobuf.UnknownFieldSet unknownFields) {
2297  return super.mergeUnknownFields(unknownFields);
2298  }
2299 
2300 
2301  // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
2302  }
2303 
2304  // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
2305  private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
2306  static {
2307  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
2308  }
2309 
2310  public static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance() {
2311  return DEFAULT_INSTANCE;
2312  }
2313 
2314  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
2315  PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
2316  @java.lang.Override
2317  public MPSolutionResponse parsePartialFrom(
2318  com.google.protobuf.CodedInputStream input,
2319  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2320  throws com.google.protobuf.InvalidProtocolBufferException {
2321  return new MPSolutionResponse(input, extensionRegistry);
2322  }
2323  };
2324 
2325  public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
2326  return PARSER;
2327  }
2328 
2329  @java.lang.Override
2330  public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
2331  return PARSER;
2332  }
2333 
2334  @java.lang.Override
2335  public com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType() {
2336  return DEFAULT_INSTANCE;
2337  }
2338 
2339 }
2340 
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse build()
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder addAllAdditionalSolutions(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution > values)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
java.util.List< com.google.ortools.linearsolver.MPSolution.Builder > getAdditionalSolutionsBuilderList()
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder setStatusStrBytes(com.google.protobuf.ByteString value)
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder()
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value)
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse buildPartial()
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder(int index)
.lang.Override com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.MPSolution.Builder getAdditionalSolutionsBuilder(int index)
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
.lang.Override com.google.protobuf.ByteString getStatusStrBytes()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
.lang.Override com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
.lang.Override java.util.List< java.lang.Double > getReducedCostList()
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
.lang.Deprecated static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
static com.google.protobuf.Parser< MPSolutionResponse > parser()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
.lang.Override java.util.List< java.lang.Double > getVariableValueList()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
.lang.Override java.util.List< java.lang.Double > getDualValueList()
.lang.Override com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
.lang.Override com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
.lang.Override boolean equals(final java.lang.Object obj)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)