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 
9 public final class MPSolutionResponse extends
10  com.google.protobuf.GeneratedMessageV3 implements
11  // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
13 private static final long serialVersionUID = 0L;
14  // Use MPSolutionResponse.newBuilder() to construct.
15  private MPSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
16  super(builder);
17  }
18  private MPSolutionResponse() {
19  status_ = 99;
20  statusStr_ = "";
21  variableValue_ = emptyDoubleList();
22  dualValue_ = emptyDoubleList();
23  reducedCost_ = emptyDoubleList();
24  }
25 
26  @java.lang.Override
27  @SuppressWarnings({"unused"})
28  protected java.lang.Object newInstance(
29  UnusedPrivateParameter unused) {
30  return new MPSolutionResponse();
31  }
32 
33  @java.lang.Override
34  public final com.google.protobuf.UnknownFieldSet
36  return this.unknownFields;
37  }
38  private MPSolutionResponse(
39  com.google.protobuf.CodedInputStream input,
40  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41  throws com.google.protobuf.InvalidProtocolBufferException {
42  this();
43  if (extensionRegistry == null) {
44  throw new java.lang.NullPointerException();
45  }
46  int mutable_bitField0_ = 0;
47  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
48  com.google.protobuf.UnknownFieldSet.newBuilder();
49  try {
50  boolean done = false;
51  while (!done) {
52  int tag = input.readTag();
53  switch (tag) {
54  case 0:
55  done = true;
56  break;
57  case 8: {
58  int rawValue = input.readEnum();
59  @SuppressWarnings("deprecation")
60  com.google.ortools.linearsolver.MPSolverResponseStatus value = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
61  if (value == null) {
62  unknownFields.mergeVarintField(1, rawValue);
63  } else {
64  bitField0_ |= 0x00000001;
65  status_ = rawValue;
66  }
67  break;
68  }
69  case 17: {
70  bitField0_ |= 0x00000004;
71  objectiveValue_ = input.readDouble();
72  break;
73  }
74  case 25: {
75  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
76  variableValue_ = newDoubleList();
77  mutable_bitField0_ |= 0x00000010;
78  }
79  variableValue_.addDouble(input.readDouble());
80  break;
81  }
82  case 26: {
83  int length = input.readRawVarint32();
84  int limit = input.pushLimit(length);
85  if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
86  variableValue_ = newDoubleList();
87  mutable_bitField0_ |= 0x00000010;
88  }
89  while (input.getBytesUntilLimit() > 0) {
90  variableValue_.addDouble(input.readDouble());
91  }
92  input.popLimit(limit);
93  break;
94  }
95  case 33: {
96  if (!((mutable_bitField0_ & 0x00000020) != 0)) {
97  dualValue_ = newDoubleList();
98  mutable_bitField0_ |= 0x00000020;
99  }
100  dualValue_.addDouble(input.readDouble());
101  break;
102  }
103  case 34: {
104  int length = input.readRawVarint32();
105  int limit = input.pushLimit(length);
106  if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
107  dualValue_ = newDoubleList();
108  mutable_bitField0_ |= 0x00000020;
109  }
110  while (input.getBytesUntilLimit() > 0) {
111  dualValue_.addDouble(input.readDouble());
112  }
113  input.popLimit(limit);
114  break;
115  }
116  case 41: {
117  bitField0_ |= 0x00000008;
118  bestObjectiveBound_ = input.readDouble();
119  break;
120  }
121  case 49: {
122  if (!((mutable_bitField0_ & 0x00000040) != 0)) {
123  reducedCost_ = newDoubleList();
124  mutable_bitField0_ |= 0x00000040;
125  }
126  reducedCost_.addDouble(input.readDouble());
127  break;
128  }
129  case 50: {
130  int length = input.readRawVarint32();
131  int limit = input.pushLimit(length);
132  if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
133  reducedCost_ = newDoubleList();
134  mutable_bitField0_ |= 0x00000040;
135  }
136  while (input.getBytesUntilLimit() > 0) {
137  reducedCost_.addDouble(input.readDouble());
138  }
139  input.popLimit(limit);
140  break;
141  }
142  case 58: {
143  com.google.protobuf.ByteString bs = input.readBytes();
144  bitField0_ |= 0x00000002;
145  statusStr_ = bs;
146  break;
147  }
148  default: {
149  if (!parseUnknownField(
150  input, unknownFields, extensionRegistry, tag)) {
151  done = true;
152  }
153  break;
154  }
155  }
156  }
157  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
158  throw e.setUnfinishedMessage(this);
159  } catch (java.io.IOException e) {
160  throw new com.google.protobuf.InvalidProtocolBufferException(
161  e).setUnfinishedMessage(this);
162  } finally {
163  if (((mutable_bitField0_ & 0x00000010) != 0)) {
164  variableValue_.makeImmutable(); // C
165  }
166  if (((mutable_bitField0_ & 0x00000020) != 0)) {
167  dualValue_.makeImmutable(); // C
168  }
169  if (((mutable_bitField0_ & 0x00000040) != 0)) {
170  reducedCost_.makeImmutable(); // C
171  }
172  this.unknownFields = unknownFields.build();
173  makeExtensionsImmutable();
174  }
175  }
176  public static final com.google.protobuf.Descriptors.Descriptor
178  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
179  }
180 
181  @java.lang.Override
182  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
184  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
185  .ensureFieldAccessorsInitialized(
187  }
188 
189  private int bitField0_;
190  public static final int STATUS_FIELD_NUMBER = 1;
191  private int status_;
199  public boolean hasStatus() {
200  return ((bitField0_ & 0x00000001) != 0);
201  }
210  @SuppressWarnings("deprecation")
213  }
214 
215  public static final int STATUS_STR_FIELD_NUMBER = 7;
216  private volatile java.lang.Object statusStr_;
227  public boolean hasStatusStr() {
228  return ((bitField0_ & 0x00000002) != 0);
229  }
240  public java.lang.String getStatusStr() {
241  java.lang.Object ref = statusStr_;
242  if (ref instanceof java.lang.String) {
243  return (java.lang.String) ref;
244  } else {
245  com.google.protobuf.ByteString bs =
246  (com.google.protobuf.ByteString) ref;
247  java.lang.String s = bs.toStringUtf8();
248  if (bs.isValidUtf8()) {
249  statusStr_ = s;
250  }
251  return s;
252  }
253  }
264  public com.google.protobuf.ByteString
266  java.lang.Object ref = statusStr_;
267  if (ref instanceof java.lang.String) {
268  com.google.protobuf.ByteString b =
269  com.google.protobuf.ByteString.copyFromUtf8(
270  (java.lang.String) ref);
271  statusStr_ = b;
272  return b;
273  } else {
274  return (com.google.protobuf.ByteString) ref;
275  }
276  }
277 
278  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
279  private double objectiveValue_;
289  public boolean hasObjectiveValue() {
290  return ((bitField0_ & 0x00000004) != 0);
291  }
301  public double getObjectiveValue() {
302  return objectiveValue_;
303  }
304 
305  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
306  private double bestObjectiveBound_;
318  public boolean hasBestObjectiveBound() {
319  return ((bitField0_ & 0x00000008) != 0);
320  }
332  public double getBestObjectiveBound() {
333  return bestObjectiveBound_;
334  }
335 
336  public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
337  private com.google.protobuf.Internal.DoubleList variableValue_;
347  public java.util.List<java.lang.Double>
349  return variableValue_;
350  }
360  public int getVariableValueCount() {
361  return variableValue_.size();
362  }
372  public double getVariableValue(int index) {
373  return variableValue_.getDouble(index);
374  }
375  private int variableValueMemoizedSerializedSize = -1;
376 
377  public static final int DUAL_VALUE_FIELD_NUMBER = 4;
378  private com.google.protobuf.Internal.DoubleList dualValue_;
391  public java.util.List<java.lang.Double>
393  return dualValue_;
394  }
407  public int getDualValueCount() {
408  return dualValue_.size();
409  }
422  public double getDualValue(int index) {
423  return dualValue_.getDouble(index);
424  }
425  private int dualValueMemoizedSerializedSize = -1;
426 
427  public static final int REDUCED_COST_FIELD_NUMBER = 6;
428  private com.google.protobuf.Internal.DoubleList reducedCost_;
441  public java.util.List<java.lang.Double>
443  return reducedCost_;
444  }
457  public int getReducedCostCount() {
458  return reducedCost_.size();
459  }
472  public double getReducedCost(int index) {
473  return reducedCost_.getDouble(index);
474  }
475  private int reducedCostMemoizedSerializedSize = -1;
476 
477  private byte memoizedIsInitialized = -1;
478  @java.lang.Override
479  public final boolean isInitialized() {
480  byte isInitialized = memoizedIsInitialized;
481  if (isInitialized == 1) return true;
482  if (isInitialized == 0) return false;
483 
484  memoizedIsInitialized = 1;
485  return true;
486  }
487 
488  @java.lang.Override
489  public void writeTo(com.google.protobuf.CodedOutputStream output)
490  throws java.io.IOException {
492  if (((bitField0_ & 0x00000001) != 0)) {
493  output.writeEnum(1, status_);
494  }
495  if (((bitField0_ & 0x00000004) != 0)) {
496  output.writeDouble(2, objectiveValue_);
497  }
498  if (getVariableValueList().size() > 0) {
499  output.writeUInt32NoTag(26);
500  output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
501  }
502  for (int i = 0; i < variableValue_.size(); i++) {
503  output.writeDoubleNoTag(variableValue_.getDouble(i));
504  }
505  if (getDualValueList().size() > 0) {
506  output.writeUInt32NoTag(34);
507  output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
508  }
509  for (int i = 0; i < dualValue_.size(); i++) {
510  output.writeDoubleNoTag(dualValue_.getDouble(i));
511  }
512  if (((bitField0_ & 0x00000008) != 0)) {
513  output.writeDouble(5, bestObjectiveBound_);
514  }
515  if (getReducedCostList().size() > 0) {
516  output.writeUInt32NoTag(50);
517  output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
518  }
519  for (int i = 0; i < reducedCost_.size(); i++) {
520  output.writeDoubleNoTag(reducedCost_.getDouble(i));
521  }
522  if (((bitField0_ & 0x00000002) != 0)) {
523  com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
524  }
525  unknownFields.writeTo(output);
526  }
527 
528  @java.lang.Override
529  public int getSerializedSize() {
530  int size = memoizedSize;
531  if (size != -1) return size;
532 
533  size = 0;
534  if (((bitField0_ & 0x00000001) != 0)) {
535  size += com.google.protobuf.CodedOutputStream
536  .computeEnumSize(1, status_);
537  }
538  if (((bitField0_ & 0x00000004) != 0)) {
539  size += com.google.protobuf.CodedOutputStream
540  .computeDoubleSize(2, objectiveValue_);
541  }
542  {
543  int dataSize = 0;
544  dataSize = 8 * getVariableValueList().size();
545  size += dataSize;
546  if (!getVariableValueList().isEmpty()) {
547  size += 1;
548  size += com.google.protobuf.CodedOutputStream
549  .computeInt32SizeNoTag(dataSize);
550  }
551  variableValueMemoizedSerializedSize = dataSize;
552  }
553  {
554  int dataSize = 0;
555  dataSize = 8 * getDualValueList().size();
556  size += dataSize;
557  if (!getDualValueList().isEmpty()) {
558  size += 1;
559  size += com.google.protobuf.CodedOutputStream
560  .computeInt32SizeNoTag(dataSize);
561  }
562  dualValueMemoizedSerializedSize = dataSize;
563  }
564  if (((bitField0_ & 0x00000008) != 0)) {
565  size += com.google.protobuf.CodedOutputStream
566  .computeDoubleSize(5, bestObjectiveBound_);
567  }
568  {
569  int dataSize = 0;
570  dataSize = 8 * getReducedCostList().size();
571  size += dataSize;
572  if (!getReducedCostList().isEmpty()) {
573  size += 1;
574  size += com.google.protobuf.CodedOutputStream
575  .computeInt32SizeNoTag(dataSize);
576  }
577  reducedCostMemoizedSerializedSize = dataSize;
578  }
579  if (((bitField0_ & 0x00000002) != 0)) {
580  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
581  }
582  size += unknownFields.getSerializedSize();
583  memoizedSize = size;
584  return size;
585  }
586 
587  @java.lang.Override
588  public boolean equals(final java.lang.Object obj) {
589  if (obj == this) {
590  return true;
591  }
592  if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
593  return super.equals(obj);
594  }
596 
597  if (hasStatus() != other.hasStatus()) return false;
598  if (hasStatus()) {
599  if (status_ != other.status_) return false;
600  }
601  if (hasStatusStr() != other.hasStatusStr()) return false;
602  if (hasStatusStr()) {
603  if (!getStatusStr()
604  .equals(other.getStatusStr())) return false;
605  }
606  if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
607  if (hasObjectiveValue()) {
608  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
609  != java.lang.Double.doubleToLongBits(
610  other.getObjectiveValue())) return false;
611  }
612  if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
613  if (hasBestObjectiveBound()) {
614  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
615  != java.lang.Double.doubleToLongBits(
616  other.getBestObjectiveBound())) return false;
617  }
618  if (!getVariableValueList()
619  .equals(other.getVariableValueList())) return false;
620  if (!getDualValueList()
621  .equals(other.getDualValueList())) return false;
622  if (!getReducedCostList()
623  .equals(other.getReducedCostList())) return false;
624  if (!unknownFields.equals(other.unknownFields)) return false;
625  return true;
626  }
627 
628  @java.lang.Override
629  public int hashCode() {
630  if (memoizedHashCode != 0) {
631  return memoizedHashCode;
632  }
633  int hash = 41;
634  hash = (19 * hash) + getDescriptor().hashCode();
635  if (hasStatus()) {
636  hash = (37 * hash) + STATUS_FIELD_NUMBER;
637  hash = (53 * hash) + status_;
638  }
639  if (hasStatusStr()) {
640  hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
641  hash = (53 * hash) + getStatusStr().hashCode();
642  }
643  if (hasObjectiveValue()) {
644  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
645  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
646  java.lang.Double.doubleToLongBits(getObjectiveValue()));
647  }
648  if (hasBestObjectiveBound()) {
649  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
650  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
651  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
652  }
653  if (getVariableValueCount() > 0) {
654  hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
655  hash = (53 * hash) + getVariableValueList().hashCode();
656  }
657  if (getDualValueCount() > 0) {
658  hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
659  hash = (53 * hash) + getDualValueList().hashCode();
660  }
661  if (getReducedCostCount() > 0) {
662  hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
663  hash = (53 * hash) + getReducedCostList().hashCode();
664  }
665  hash = (29 * hash) + unknownFields.hashCode();
666  memoizedHashCode = hash;
667  return hash;
668  }
669 
671  java.nio.ByteBuffer data)
672  throws com.google.protobuf.InvalidProtocolBufferException {
673  return PARSER.parseFrom(data);
674  }
676  java.nio.ByteBuffer data,
677  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
678  throws com.google.protobuf.InvalidProtocolBufferException {
679  return PARSER.parseFrom(data, extensionRegistry);
680  }
682  com.google.protobuf.ByteString data)
683  throws com.google.protobuf.InvalidProtocolBufferException {
684  return PARSER.parseFrom(data);
685  }
687  com.google.protobuf.ByteString data,
688  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
689  throws com.google.protobuf.InvalidProtocolBufferException {
690  return PARSER.parseFrom(data, extensionRegistry);
691  }
693  throws com.google.protobuf.InvalidProtocolBufferException {
694  return PARSER.parseFrom(data);
695  }
697  byte[] data,
698  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
699  throws com.google.protobuf.InvalidProtocolBufferException {
700  return PARSER.parseFrom(data, extensionRegistry);
701  }
702  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
703  throws java.io.IOException {
704  return com.google.protobuf.GeneratedMessageV3
705  .parseWithIOException(PARSER, input);
706  }
708  java.io.InputStream input,
709  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
710  throws java.io.IOException {
711  return com.google.protobuf.GeneratedMessageV3
712  .parseWithIOException(PARSER, input, extensionRegistry);
713  }
714  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
715  throws java.io.IOException {
716  return com.google.protobuf.GeneratedMessageV3
717  .parseDelimitedWithIOException(PARSER, input);
718  }
720  java.io.InputStream input,
721  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
722  throws java.io.IOException {
723  return com.google.protobuf.GeneratedMessageV3
724  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
725  }
727  com.google.protobuf.CodedInputStream input)
728  throws java.io.IOException {
729  return com.google.protobuf.GeneratedMessageV3
730  .parseWithIOException(PARSER, input);
731  }
733  com.google.protobuf.CodedInputStream input,
734  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
735  throws java.io.IOException {
736  return com.google.protobuf.GeneratedMessageV3
737  .parseWithIOException(PARSER, input, extensionRegistry);
738  }
739 
740  @java.lang.Override
741  public Builder newBuilderForType() { return newBuilder(); }
742  public static Builder newBuilder() {
743  return DEFAULT_INSTANCE.toBuilder();
744  }
746  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
747  }
748  @java.lang.Override
749  public Builder toBuilder() {
750  return this == DEFAULT_INSTANCE
751  ? new Builder() : new Builder().mergeFrom(this);
752  }
753 
754  @java.lang.Override
756  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
757  Builder builder = new Builder(parent);
758  return builder;
759  }
763  public static final class Builder extends
764  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
765  // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
766  com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
767  public static final com.google.protobuf.Descriptors.Descriptor
769  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
770  }
771 
772  @java.lang.Override
773  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
775  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
776  .ensureFieldAccessorsInitialized(
778  }
779 
780  // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
781  private Builder() {
782  maybeForceBuilderInitialization();
783  }
784 
785  private Builder(
786  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
787  super(parent);
788  maybeForceBuilderInitialization();
789  }
790  private void maybeForceBuilderInitialization() {
791  if (com.google.protobuf.GeneratedMessageV3
792  .alwaysUseFieldBuilders) {
793  }
794  }
795  @java.lang.Override
796  public Builder clear() {
797  super.clear();
798  status_ = 99;
799  bitField0_ = (bitField0_ & ~0x00000001);
800  statusStr_ = "";
801  bitField0_ = (bitField0_ & ~0x00000002);
802  objectiveValue_ = 0D;
803  bitField0_ = (bitField0_ & ~0x00000004);
804  bestObjectiveBound_ = 0D;
805  bitField0_ = (bitField0_ & ~0x00000008);
806  variableValue_ = emptyDoubleList();
807  bitField0_ = (bitField0_ & ~0x00000010);
808  dualValue_ = emptyDoubleList();
809  bitField0_ = (bitField0_ & ~0x00000020);
810  reducedCost_ = emptyDoubleList();
811  bitField0_ = (bitField0_ & ~0x00000040);
812  return this;
813  }
814 
815  @java.lang.Override
816  public com.google.protobuf.Descriptors.Descriptor
818  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
819  }
820 
821  @java.lang.Override
824  }
825 
826  @java.lang.Override
829  if (!result.isInitialized()) {
830  throw newUninitializedMessageException(result);
831  }
832  return result;
833  }
834 
835  @java.lang.Override
838  int from_bitField0_ = bitField0_;
839  int to_bitField0_ = 0;
840  if (((from_bitField0_ & 0x00000001) != 0)) {
841  to_bitField0_ |= 0x00000001;
842  }
843  result.status_ = status_;
844  if (((from_bitField0_ & 0x00000002) != 0)) {
845  to_bitField0_ |= 0x00000002;
846  }
847  result.statusStr_ = statusStr_;
848  if (((from_bitField0_ & 0x00000004) != 0)) {
849  result.objectiveValue_ = objectiveValue_;
850  to_bitField0_ |= 0x00000004;
851  }
852  if (((from_bitField0_ & 0x00000008) != 0)) {
853  result.bestObjectiveBound_ = bestObjectiveBound_;
854  to_bitField0_ |= 0x00000008;
855  }
856  if (((bitField0_ & 0x00000010) != 0)) {
857  variableValue_.makeImmutable();
858  bitField0_ = (bitField0_ & ~0x00000010);
859  }
860  result.variableValue_ = variableValue_;
861  if (((bitField0_ & 0x00000020) != 0)) {
862  dualValue_.makeImmutable();
863  bitField0_ = (bitField0_ & ~0x00000020);
864  }
865  result.dualValue_ = dualValue_;
866  if (((bitField0_ & 0x00000040) != 0)) {
867  reducedCost_.makeImmutable();
868  bitField0_ = (bitField0_ & ~0x00000040);
869  }
870  result.reducedCost_ = reducedCost_;
871  result.bitField0_ = to_bitField0_;
872  onBuilt();
873  return result;
874  }
875 
876  @java.lang.Override
877  public Builder clone() {
878  return super.clone();
879  }
880  @java.lang.Override
882  com.google.protobuf.Descriptors.FieldDescriptor field,
883  java.lang.Object value) {
884  return super.setField(field, value);
885  }
886  @java.lang.Override
888  com.google.protobuf.Descriptors.FieldDescriptor field) {
889  return super.clearField(field);
890  }
891  @java.lang.Override
893  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
894  return super.clearOneof(oneof);
895  }
896  @java.lang.Override
898  com.google.protobuf.Descriptors.FieldDescriptor field,
899  int index, java.lang.Object value) {
900  return super.setRepeatedField(field, index, value);
901  }
902  @java.lang.Override
904  com.google.protobuf.Descriptors.FieldDescriptor field,
905  java.lang.Object value) {
906  return super.addRepeatedField(field, value);
907  }
908  @java.lang.Override
909  public Builder mergeFrom(com.google.protobuf.Message other) {
910  if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
912  } else {
913  super.mergeFrom(other);
914  return this;
915  }
916  }
917 
920  if (other.hasStatus()) {
921  setStatus(other.getStatus());
922  }
923  if (other.hasStatusStr()) {
924  bitField0_ |= 0x00000002;
925  statusStr_ = other.statusStr_;
926  onChanged();
927  }
928  if (other.hasObjectiveValue()) {
929  setObjectiveValue(other.getObjectiveValue());
930  }
931  if (other.hasBestObjectiveBound()) {
932  setBestObjectiveBound(other.getBestObjectiveBound());
933  }
934  if (!other.variableValue_.isEmpty()) {
935  if (variableValue_.isEmpty()) {
936  variableValue_ = other.variableValue_;
937  bitField0_ = (bitField0_ & ~0x00000010);
938  } else {
939  ensureVariableValueIsMutable();
940  variableValue_.addAll(other.variableValue_);
941  }
942  onChanged();
943  }
944  if (!other.dualValue_.isEmpty()) {
945  if (dualValue_.isEmpty()) {
946  dualValue_ = other.dualValue_;
947  bitField0_ = (bitField0_ & ~0x00000020);
948  } else {
949  ensureDualValueIsMutable();
950  dualValue_.addAll(other.dualValue_);
951  }
952  onChanged();
953  }
954  if (!other.reducedCost_.isEmpty()) {
955  if (reducedCost_.isEmpty()) {
956  reducedCost_ = other.reducedCost_;
957  bitField0_ = (bitField0_ & ~0x00000040);
958  } else {
959  ensureReducedCostIsMutable();
960  reducedCost_.addAll(other.reducedCost_);
961  }
962  onChanged();
963  }
964  this.mergeUnknownFields(other.unknownFields);
965  onChanged();
966  return this;
967  }
968 
969  @java.lang.Override
970  public final boolean isInitialized() {
971  return true;
972  }
973 
974  @java.lang.Override
976  com.google.protobuf.CodedInputStream input,
977  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
978  throws java.io.IOException {
979  com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
980  try {
981  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
982  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
983  parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
984  throw e.unwrapIOException();
985  } finally {
986  if (parsedMessage != null) {
987  mergeFrom(parsedMessage);
988  }
989  }
990  return this;
991  }
992  private int bitField0_;
993 
994  private int status_ = 99;
1002  public boolean hasStatus() {
1003  return ((bitField0_ & 0x00000001) != 0);
1004  }
1013  @SuppressWarnings("deprecation")
1016  }
1025  if (value == null) {
1026  throw new NullPointerException();
1027  }
1028  bitField0_ |= 0x00000001;
1029  status_ = value.getNumber();
1030  onChanged();
1031  return this;
1032  }
1041  bitField0_ = (bitField0_ & ~0x00000001);
1042  status_ = 99;
1043  onChanged();
1044  return this;
1045  }
1046 
1047  private java.lang.Object statusStr_ = "";
1058  public boolean hasStatusStr() {
1059  return ((bitField0_ & 0x00000002) != 0);
1060  }
1071  public java.lang.String getStatusStr() {
1072  java.lang.Object ref = statusStr_;
1073  if (!(ref instanceof java.lang.String)) {
1074  com.google.protobuf.ByteString bs =
1075  (com.google.protobuf.ByteString) ref;
1076  java.lang.String s = bs.toStringUtf8();
1077  if (bs.isValidUtf8()) {
1078  statusStr_ = s;
1079  }
1080  return s;
1081  } else {
1082  return (java.lang.String) ref;
1083  }
1084  }
1095  public com.google.protobuf.ByteString
1097  java.lang.Object ref = statusStr_;
1098  if (ref instanceof String) {
1099  com.google.protobuf.ByteString b =
1100  com.google.protobuf.ByteString.copyFromUtf8(
1101  (java.lang.String) ref);
1102  statusStr_ = b;
1103  return b;
1104  } else {
1105  return (com.google.protobuf.ByteString) ref;
1106  }
1107  }
1119  java.lang.String value) {
1120  if (value == null) {
1121  throw new NullPointerException();
1122  }
1123  bitField0_ |= 0x00000002;
1124  statusStr_ = value;
1125  onChanged();
1126  return this;
1127  }
1139  bitField0_ = (bitField0_ & ~0x00000002);
1140  statusStr_ = getDefaultInstance().getStatusStr();
1141  onChanged();
1142  return this;
1143  }
1155  com.google.protobuf.ByteString value) {
1156  if (value == null) {
1157  throw new NullPointerException();
1158  }
1159  bitField0_ |= 0x00000002;
1160  statusStr_ = value;
1161  onChanged();
1162  return this;
1163  }
1164 
1165  private double objectiveValue_ ;
1175  public boolean hasObjectiveValue() {
1176  return ((bitField0_ & 0x00000004) != 0);
1177  }
1187  public double getObjectiveValue() {
1188  return objectiveValue_;
1189  }
1199  public Builder setObjectiveValue(double value) {
1200  bitField0_ |= 0x00000004;
1201  objectiveValue_ = value;
1202  onChanged();
1203  return this;
1204  }
1215  bitField0_ = (bitField0_ & ~0x00000004);
1216  objectiveValue_ = 0D;
1217  onChanged();
1218  return this;
1219  }
1220 
1221  private double bestObjectiveBound_ ;
1233  public boolean hasBestObjectiveBound() {
1234  return ((bitField0_ & 0x00000008) != 0);
1235  }
1247  public double getBestObjectiveBound() {
1248  return bestObjectiveBound_;
1249  }
1261  public Builder setBestObjectiveBound(double value) {
1262  bitField0_ |= 0x00000008;
1263  bestObjectiveBound_ = value;
1264  onChanged();
1265  return this;
1266  }
1279  bitField0_ = (bitField0_ & ~0x00000008);
1280  bestObjectiveBound_ = 0D;
1281  onChanged();
1282  return this;
1283  }
1284 
1285  private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1286  private void ensureVariableValueIsMutable() {
1287  if (!((bitField0_ & 0x00000010) != 0)) {
1288  variableValue_ = mutableCopy(variableValue_);
1289  bitField0_ |= 0x00000010;
1290  }
1291  }
1301  public java.util.List<java.lang.Double>
1303  return ((bitField0_ & 0x00000010) != 0) ?
1304  java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1305  }
1315  public int getVariableValueCount() {
1316  return variableValue_.size();
1317  }
1327  public double getVariableValue(int index) {
1328  return variableValue_.getDouble(index);
1329  }
1340  int index, double value) {
1341  ensureVariableValueIsMutable();
1342  variableValue_.setDouble(index, value);
1343  onChanged();
1344  return this;
1345  }
1355  public Builder addVariableValue(double value) {
1356  ensureVariableValueIsMutable();
1357  variableValue_.addDouble(value);
1358  onChanged();
1359  return this;
1360  }
1371  java.lang.Iterable<? extends java.lang.Double> values) {
1372  ensureVariableValueIsMutable();
1373  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1374  values, variableValue_);
1375  onChanged();
1376  return this;
1377  }
1388  variableValue_ = emptyDoubleList();
1389  bitField0_ = (bitField0_ & ~0x00000010);
1390  onChanged();
1391  return this;
1392  }
1393 
1394  private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1395  private void ensureDualValueIsMutable() {
1396  if (!((bitField0_ & 0x00000020) != 0)) {
1397  dualValue_ = mutableCopy(dualValue_);
1398  bitField0_ |= 0x00000020;
1399  }
1400  }
1413  public java.util.List<java.lang.Double>
1415  return ((bitField0_ & 0x00000020) != 0) ?
1416  java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1417  }
1430  public int getDualValueCount() {
1431  return dualValue_.size();
1432  }
1445  public double getDualValue(int index) {
1446  return dualValue_.getDouble(index);
1447  }
1461  int index, double value) {
1462  ensureDualValueIsMutable();
1463  dualValue_.setDouble(index, value);
1464  onChanged();
1465  return this;
1466  }
1479  public Builder addDualValue(double value) {
1480  ensureDualValueIsMutable();
1481  dualValue_.addDouble(value);
1482  onChanged();
1483  return this;
1484  }
1498  java.lang.Iterable<? extends java.lang.Double> values) {
1499  ensureDualValueIsMutable();
1500  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1501  values, dualValue_);
1502  onChanged();
1503  return this;
1504  }
1518  dualValue_ = emptyDoubleList();
1519  bitField0_ = (bitField0_ & ~0x00000020);
1520  onChanged();
1521  return this;
1522  }
1523 
1524  private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1525  private void ensureReducedCostIsMutable() {
1526  if (!((bitField0_ & 0x00000040) != 0)) {
1527  reducedCost_ = mutableCopy(reducedCost_);
1528  bitField0_ |= 0x00000040;
1529  }
1530  }
1543  public java.util.List<java.lang.Double>
1545  return ((bitField0_ & 0x00000040) != 0) ?
1546  java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1547  }
1560  public int getReducedCostCount() {
1561  return reducedCost_.size();
1562  }
1575  public double getReducedCost(int index) {
1576  return reducedCost_.getDouble(index);
1577  }
1591  int index, double value) {
1592  ensureReducedCostIsMutable();
1593  reducedCost_.setDouble(index, value);
1594  onChanged();
1595  return this;
1596  }
1609  public Builder addReducedCost(double value) {
1610  ensureReducedCostIsMutable();
1611  reducedCost_.addDouble(value);
1612  onChanged();
1613  return this;
1614  }
1628  java.lang.Iterable<? extends java.lang.Double> values) {
1629  ensureReducedCostIsMutable();
1630  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1631  values, reducedCost_);
1632  onChanged();
1633  return this;
1634  }
1648  reducedCost_ = emptyDoubleList();
1649  bitField0_ = (bitField0_ & ~0x00000040);
1650  onChanged();
1651  return this;
1652  }
1653  @java.lang.Override
1655  final com.google.protobuf.UnknownFieldSet unknownFields) {
1656  return super.setUnknownFields(unknownFields);
1657  }
1658 
1659  @java.lang.Override
1661  final com.google.protobuf.UnknownFieldSet unknownFields) {
1662  return super.mergeUnknownFields(unknownFields);
1663  }
1664 
1665 
1666  // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
1667  }
1668 
1669  // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
1670  private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
1671  static {
1672  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
1673  }
1674 
1676  return DEFAULT_INSTANCE;
1677  }
1678 
1679  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
1680  PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
1681  @java.lang.Override
1682  public MPSolutionResponse parsePartialFrom(
1683  com.google.protobuf.CodedInputStream input,
1684  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1685  throws com.google.protobuf.InvalidProtocolBufferException {
1686  return new MPSolutionResponse(input, extensionRegistry);
1687  }
1688  };
1689 
1690  public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
1691  return PARSER;
1692  }
1693 
1694  @java.lang.Override
1695  public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
1696  return PARSER;
1697  }
1698 
1699  @java.lang.Override
1701  return DEFAULT_INSTANCE;
1702  }
1703 
1704 }
1705 
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder setStatusStrBytes(com.google.protobuf.ByteString value)
.lang.Deprecated static MPSolverResponseStatus valueOf(int value)
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse buildPartial()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.protobuf.Parser< MPSolutionResponse > parser()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
.lang.Override com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Double > getVariableValueList()
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
java.util.List< java.lang.Double > getDualValueList()
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
java.util.List< java.lang.Double > getReducedCostList()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
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.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Deprecated static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse build()
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)