Java Reference

Java Reference

MPGeneralConstraintProto.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 MPGeneralConstraintProto extends
14  com.google.protobuf.GeneratedMessageV3 implements
15  // @@protoc_insertion_point(message_implements:operations_research.MPGeneralConstraintProto)
17 private static final long serialVersionUID = 0L;
18  // Use MPGeneralConstraintProto.newBuilder() to construct.
19  private MPGeneralConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20  super(builder);
21  }
22  private MPGeneralConstraintProto() {
23  name_ = "";
24  }
25 
26  @java.lang.Override
27  @SuppressWarnings({"unused"})
28  protected java.lang.Object newInstance(
29  UnusedPrivateParameter unused) {
30  return new MPGeneralConstraintProto();
31  }
32 
33  @java.lang.Override
34  public final com.google.protobuf.UnknownFieldSet
36  return this.unknownFields;
37  }
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 10: {
58  com.google.protobuf.ByteString bs = input.readBytes();
59  bitField0_ |= 0x00000001;
60  name_ = bs;
61  break;
62  }
63  case 18: {
65  if (generalConstraintCase_ == 2) {
66  subBuilder = ((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_).toBuilder();
67  }
68  generalConstraint_ =
69  input.readMessage(com.google.ortools.linearsolver.MPIndicatorConstraint.PARSER, extensionRegistry);
70  if (subBuilder != null) {
71  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
72  generalConstraint_ = subBuilder.buildPartial();
73  }
74  generalConstraintCase_ = 2;
75  break;
76  }
77  case 26: {
79  if (generalConstraintCase_ == 3) {
80  subBuilder = ((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_).toBuilder();
81  }
82  generalConstraint_ =
83  input.readMessage(com.google.ortools.linearsolver.MPSosConstraint.PARSER, extensionRegistry);
84  if (subBuilder != null) {
85  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
86  generalConstraint_ = subBuilder.buildPartial();
87  }
88  generalConstraintCase_ = 3;
89  break;
90  }
91  case 34: {
93  if (generalConstraintCase_ == 4) {
94  subBuilder = ((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_).toBuilder();
95  }
96  generalConstraint_ =
97  input.readMessage(com.google.ortools.linearsolver.MPQuadraticConstraint.PARSER, extensionRegistry);
98  if (subBuilder != null) {
99  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
100  generalConstraint_ = subBuilder.buildPartial();
101  }
102  generalConstraintCase_ = 4;
103  break;
104  }
105  case 42: {
107  if (generalConstraintCase_ == 5) {
108  subBuilder = ((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_).toBuilder();
109  }
110  generalConstraint_ =
111  input.readMessage(com.google.ortools.linearsolver.MPAbsConstraint.PARSER, extensionRegistry);
112  if (subBuilder != null) {
113  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
114  generalConstraint_ = subBuilder.buildPartial();
115  }
116  generalConstraintCase_ = 5;
117  break;
118  }
119  case 50: {
121  if (generalConstraintCase_ == 6) {
122  subBuilder = ((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_).toBuilder();
123  }
124  generalConstraint_ =
125  input.readMessage(com.google.ortools.linearsolver.MPArrayConstraint.PARSER, extensionRegistry);
126  if (subBuilder != null) {
127  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
128  generalConstraint_ = subBuilder.buildPartial();
129  }
130  generalConstraintCase_ = 6;
131  break;
132  }
133  case 58: {
135  if (generalConstraintCase_ == 7) {
136  subBuilder = ((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_).toBuilder();
137  }
138  generalConstraint_ =
139  input.readMessage(com.google.ortools.linearsolver.MPArrayConstraint.PARSER, extensionRegistry);
140  if (subBuilder != null) {
141  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
142  generalConstraint_ = subBuilder.buildPartial();
143  }
144  generalConstraintCase_ = 7;
145  break;
146  }
147  case 66: {
149  if (generalConstraintCase_ == 8) {
150  subBuilder = ((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_).toBuilder();
151  }
152  generalConstraint_ =
153  input.readMessage(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.PARSER, extensionRegistry);
154  if (subBuilder != null) {
155  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
156  generalConstraint_ = subBuilder.buildPartial();
157  }
158  generalConstraintCase_ = 8;
159  break;
160  }
161  case 74: {
163  if (generalConstraintCase_ == 9) {
164  subBuilder = ((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_).toBuilder();
165  }
166  generalConstraint_ =
167  input.readMessage(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.PARSER, extensionRegistry);
168  if (subBuilder != null) {
169  subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
170  generalConstraint_ = subBuilder.buildPartial();
171  }
172  generalConstraintCase_ = 9;
173  break;
174  }
175  default: {
176  if (!parseUnknownField(
177  input, unknownFields, extensionRegistry, tag)) {
178  done = true;
179  }
180  break;
181  }
182  }
183  }
184  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
185  throw e.setUnfinishedMessage(this);
186  } catch (java.io.IOException e) {
187  throw new com.google.protobuf.InvalidProtocolBufferException(
188  e).setUnfinishedMessage(this);
189  } finally {
190  this.unknownFields = unknownFields.build();
191  makeExtensionsImmutable();
192  }
193  }
194  public static final com.google.protobuf.Descriptors.Descriptor
196  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
197  }
198 
199  @java.lang.Override
200  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
202  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
203  .ensureFieldAccessorsInitialized(
205  }
206 
207  private int bitField0_;
208  private int generalConstraintCase_ = 0;
209  private java.lang.Object generalConstraint_;
211  implements com.google.protobuf.Internal.EnumLite {
221  private final int value;
222  private GeneralConstraintCase(int value) {
223  this.value = value;
224  }
228  @java.lang.Deprecated
229  public static GeneralConstraintCase valueOf(int value) {
230  return forNumber(value);
231  }
232 
233  public static GeneralConstraintCase forNumber(int value) {
234  switch (value) {
235  case 2: return INDICATOR_CONSTRAINT;
236  case 3: return SOS_CONSTRAINT;
237  case 4: return QUADRATIC_CONSTRAINT;
238  case 5: return ABS_CONSTRAINT;
239  case 6: return AND_CONSTRAINT;
240  case 7: return OR_CONSTRAINT;
241  case 8: return MIN_CONSTRAINT;
242  case 9: return MAX_CONSTRAINT;
243  case 0: return GENERALCONSTRAINT_NOT_SET;
244  default: return null;
245  }
246  }
247  public int getNumber() {
248  return this.value;
249  }
250  };
251 
252  public GeneralConstraintCase
255  generalConstraintCase_);
256  }
257 
258  public static final int NAME_FIELD_NUMBER = 1;
259  private volatile java.lang.Object name_;
267  public boolean hasName() {
268  return ((bitField0_ & 0x00000001) != 0);
269  }
277  public java.lang.String getName() {
278  java.lang.Object ref = name_;
279  if (ref instanceof java.lang.String) {
280  return (java.lang.String) ref;
281  } else {
282  com.google.protobuf.ByteString bs =
283  (com.google.protobuf.ByteString) ref;
284  java.lang.String s = bs.toStringUtf8();
285  if (bs.isValidUtf8()) {
286  name_ = s;
287  }
288  return s;
289  }
290  }
298  public com.google.protobuf.ByteString
300  java.lang.Object ref = name_;
301  if (ref instanceof java.lang.String) {
302  com.google.protobuf.ByteString b =
303  com.google.protobuf.ByteString.copyFromUtf8(
304  (java.lang.String) ref);
305  name_ = b;
306  return b;
307  } else {
308  return (com.google.protobuf.ByteString) ref;
309  }
310  }
311 
312  public static final int INDICATOR_CONSTRAINT_FIELD_NUMBER = 2;
316  public boolean hasIndicatorConstraint() {
317  return generalConstraintCase_ == 2;
318  }
323  if (generalConstraintCase_ == 2) {
324  return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
325  }
327  }
332  if (generalConstraintCase_ == 2) {
333  return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
334  }
336  }
337 
338  public static final int SOS_CONSTRAINT_FIELD_NUMBER = 3;
342  public boolean hasSosConstraint() {
343  return generalConstraintCase_ == 3;
344  }
349  if (generalConstraintCase_ == 3) {
350  return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
351  }
353  }
358  if (generalConstraintCase_ == 3) {
359  return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
360  }
362  }
363 
364  public static final int QUADRATIC_CONSTRAINT_FIELD_NUMBER = 4;
368  public boolean hasQuadraticConstraint() {
369  return generalConstraintCase_ == 4;
370  }
375  if (generalConstraintCase_ == 4) {
376  return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
377  }
379  }
384  if (generalConstraintCase_ == 4) {
385  return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
386  }
388  }
389 
390  public static final int ABS_CONSTRAINT_FIELD_NUMBER = 5;
394  public boolean hasAbsConstraint() {
395  return generalConstraintCase_ == 5;
396  }
401  if (generalConstraintCase_ == 5) {
402  return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
403  }
405  }
410  if (generalConstraintCase_ == 5) {
411  return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
412  }
414  }
415 
416  public static final int AND_CONSTRAINT_FIELD_NUMBER = 6;
425  public boolean hasAndConstraint() {
426  return generalConstraintCase_ == 6;
427  }
437  if (generalConstraintCase_ == 6) {
438  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
439  }
441  }
451  if (generalConstraintCase_ == 6) {
452  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
453  }
455  }
456 
457  public static final int OR_CONSTRAINT_FIELD_NUMBER = 7;
466  public boolean hasOrConstraint() {
467  return generalConstraintCase_ == 7;
468  }
478  if (generalConstraintCase_ == 7) {
479  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
480  }
482  }
492  if (generalConstraintCase_ == 7) {
493  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
494  }
496  }
497 
498  public static final int MIN_CONSTRAINT_FIELD_NUMBER = 8;
506  public boolean hasMinConstraint() {
507  return generalConstraintCase_ == 8;
508  }
517  if (generalConstraintCase_ == 8) {
518  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
519  }
521  }
530  if (generalConstraintCase_ == 8) {
531  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
532  }
534  }
535 
536  public static final int MAX_CONSTRAINT_FIELD_NUMBER = 9;
544  public boolean hasMaxConstraint() {
545  return generalConstraintCase_ == 9;
546  }
555  if (generalConstraintCase_ == 9) {
556  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
557  }
559  }
568  if (generalConstraintCase_ == 9) {
569  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
570  }
572  }
573 
574  private byte memoizedIsInitialized = -1;
575  @java.lang.Override
576  public final boolean isInitialized() {
577  byte isInitialized = memoizedIsInitialized;
578  if (isInitialized == 1) return true;
579  if (isInitialized == 0) return false;
580 
581  memoizedIsInitialized = 1;
582  return true;
583  }
584 
585  @java.lang.Override
586  public void writeTo(com.google.protobuf.CodedOutputStream output)
587  throws java.io.IOException {
588  if (((bitField0_ & 0x00000001) != 0)) {
589  com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
590  }
591  if (generalConstraintCase_ == 2) {
592  output.writeMessage(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
593  }
594  if (generalConstraintCase_ == 3) {
595  output.writeMessage(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
596  }
597  if (generalConstraintCase_ == 4) {
598  output.writeMessage(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
599  }
600  if (generalConstraintCase_ == 5) {
601  output.writeMessage(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
602  }
603  if (generalConstraintCase_ == 6) {
604  output.writeMessage(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
605  }
606  if (generalConstraintCase_ == 7) {
607  output.writeMessage(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
608  }
609  if (generalConstraintCase_ == 8) {
610  output.writeMessage(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
611  }
612  if (generalConstraintCase_ == 9) {
613  output.writeMessage(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
614  }
615  unknownFields.writeTo(output);
616  }
617 
618  @java.lang.Override
619  public int getSerializedSize() {
620  int size = memoizedSize;
621  if (size != -1) return size;
622 
623  size = 0;
624  if (((bitField0_ & 0x00000001) != 0)) {
625  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
626  }
627  if (generalConstraintCase_ == 2) {
628  size += com.google.protobuf.CodedOutputStream
629  .computeMessageSize(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_);
630  }
631  if (generalConstraintCase_ == 3) {
632  size += com.google.protobuf.CodedOutputStream
633  .computeMessageSize(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_);
634  }
635  if (generalConstraintCase_ == 4) {
636  size += com.google.protobuf.CodedOutputStream
637  .computeMessageSize(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_);
638  }
639  if (generalConstraintCase_ == 5) {
640  size += com.google.protobuf.CodedOutputStream
641  .computeMessageSize(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_);
642  }
643  if (generalConstraintCase_ == 6) {
644  size += com.google.protobuf.CodedOutputStream
645  .computeMessageSize(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
646  }
647  if (generalConstraintCase_ == 7) {
648  size += com.google.protobuf.CodedOutputStream
649  .computeMessageSize(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_);
650  }
651  if (generalConstraintCase_ == 8) {
652  size += com.google.protobuf.CodedOutputStream
653  .computeMessageSize(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
654  }
655  if (generalConstraintCase_ == 9) {
656  size += com.google.protobuf.CodedOutputStream
657  .computeMessageSize(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_);
658  }
659  size += unknownFields.getSerializedSize();
660  memoizedSize = size;
661  return size;
662  }
663 
664  @java.lang.Override
665  public boolean equals(final java.lang.Object obj) {
666  if (obj == this) {
667  return true;
668  }
669  if (!(obj instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto)) {
670  return super.equals(obj);
671  }
673 
674  if (hasName() != other.hasName()) return false;
675  if (hasName()) {
676  if (!getName()
677  .equals(other.getName())) return false;
678  }
679  if (!getGeneralConstraintCase().equals(other.getGeneralConstraintCase())) return false;
680  switch (generalConstraintCase_) {
681  case 2:
683  .equals(other.getIndicatorConstraint())) return false;
684  break;
685  case 3:
686  if (!getSosConstraint()
687  .equals(other.getSosConstraint())) return false;
688  break;
689  case 4:
691  .equals(other.getQuadraticConstraint())) return false;
692  break;
693  case 5:
694  if (!getAbsConstraint()
695  .equals(other.getAbsConstraint())) return false;
696  break;
697  case 6:
698  if (!getAndConstraint()
699  .equals(other.getAndConstraint())) return false;
700  break;
701  case 7:
702  if (!getOrConstraint()
703  .equals(other.getOrConstraint())) return false;
704  break;
705  case 8:
706  if (!getMinConstraint()
707  .equals(other.getMinConstraint())) return false;
708  break;
709  case 9:
710  if (!getMaxConstraint()
711  .equals(other.getMaxConstraint())) return false;
712  break;
713  case 0:
714  default:
715  }
716  if (!unknownFields.equals(other.unknownFields)) return false;
717  return true;
718  }
719 
720  @java.lang.Override
721  public int hashCode() {
722  if (memoizedHashCode != 0) {
723  return memoizedHashCode;
724  }
725  int hash = 41;
726  hash = (19 * hash) + getDescriptor().hashCode();
727  if (hasName()) {
728  hash = (37 * hash) + NAME_FIELD_NUMBER;
729  hash = (53 * hash) + getName().hashCode();
730  }
731  switch (generalConstraintCase_) {
732  case 2:
733  hash = (37 * hash) + INDICATOR_CONSTRAINT_FIELD_NUMBER;
734  hash = (53 * hash) + getIndicatorConstraint().hashCode();
735  break;
736  case 3:
737  hash = (37 * hash) + SOS_CONSTRAINT_FIELD_NUMBER;
738  hash = (53 * hash) + getSosConstraint().hashCode();
739  break;
740  case 4:
741  hash = (37 * hash) + QUADRATIC_CONSTRAINT_FIELD_NUMBER;
742  hash = (53 * hash) + getQuadraticConstraint().hashCode();
743  break;
744  case 5:
745  hash = (37 * hash) + ABS_CONSTRAINT_FIELD_NUMBER;
746  hash = (53 * hash) + getAbsConstraint().hashCode();
747  break;
748  case 6:
749  hash = (37 * hash) + AND_CONSTRAINT_FIELD_NUMBER;
750  hash = (53 * hash) + getAndConstraint().hashCode();
751  break;
752  case 7:
753  hash = (37 * hash) + OR_CONSTRAINT_FIELD_NUMBER;
754  hash = (53 * hash) + getOrConstraint().hashCode();
755  break;
756  case 8:
757  hash = (37 * hash) + MIN_CONSTRAINT_FIELD_NUMBER;
758  hash = (53 * hash) + getMinConstraint().hashCode();
759  break;
760  case 9:
761  hash = (37 * hash) + MAX_CONSTRAINT_FIELD_NUMBER;
762  hash = (53 * hash) + getMaxConstraint().hashCode();
763  break;
764  case 0:
765  default:
766  }
767  hash = (29 * hash) + unknownFields.hashCode();
768  memoizedHashCode = hash;
769  return hash;
770  }
771 
773  java.nio.ByteBuffer data)
774  throws com.google.protobuf.InvalidProtocolBufferException {
775  return PARSER.parseFrom(data);
776  }
778  java.nio.ByteBuffer data,
779  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
780  throws com.google.protobuf.InvalidProtocolBufferException {
781  return PARSER.parseFrom(data, extensionRegistry);
782  }
784  com.google.protobuf.ByteString data)
785  throws com.google.protobuf.InvalidProtocolBufferException {
786  return PARSER.parseFrom(data);
787  }
789  com.google.protobuf.ByteString data,
790  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
791  throws com.google.protobuf.InvalidProtocolBufferException {
792  return PARSER.parseFrom(data, extensionRegistry);
793  }
795  throws com.google.protobuf.InvalidProtocolBufferException {
796  return PARSER.parseFrom(data);
797  }
799  byte[] data,
800  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
801  throws com.google.protobuf.InvalidProtocolBufferException {
802  return PARSER.parseFrom(data, extensionRegistry);
803  }
804  public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input)
805  throws java.io.IOException {
806  return com.google.protobuf.GeneratedMessageV3
807  .parseWithIOException(PARSER, input);
808  }
810  java.io.InputStream input,
811  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
812  throws java.io.IOException {
813  return com.google.protobuf.GeneratedMessageV3
814  .parseWithIOException(PARSER, input, extensionRegistry);
815  }
817  throws java.io.IOException {
818  return com.google.protobuf.GeneratedMessageV3
819  .parseDelimitedWithIOException(PARSER, input);
820  }
822  java.io.InputStream input,
823  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
824  throws java.io.IOException {
825  return com.google.protobuf.GeneratedMessageV3
826  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
827  }
829  com.google.protobuf.CodedInputStream input)
830  throws java.io.IOException {
831  return com.google.protobuf.GeneratedMessageV3
832  .parseWithIOException(PARSER, input);
833  }
835  com.google.protobuf.CodedInputStream input,
836  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837  throws java.io.IOException {
838  return com.google.protobuf.GeneratedMessageV3
839  .parseWithIOException(PARSER, input, extensionRegistry);
840  }
841 
842  @java.lang.Override
843  public Builder newBuilderForType() { return newBuilder(); }
844  public static Builder newBuilder() {
845  return DEFAULT_INSTANCE.toBuilder();
846  }
848  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
849  }
850  @java.lang.Override
851  public Builder toBuilder() {
852  return this == DEFAULT_INSTANCE
853  ? new Builder() : new Builder().mergeFrom(this);
854  }
855 
856  @java.lang.Override
858  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
859  Builder builder = new Builder(parent);
860  return builder;
861  }
869  public static final class Builder extends
870  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
871  // @@protoc_insertion_point(builder_implements:operations_research.MPGeneralConstraintProto)
872  com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder {
873  public static final com.google.protobuf.Descriptors.Descriptor
875  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
876  }
877 
878  @java.lang.Override
879  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
881  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable
882  .ensureFieldAccessorsInitialized(
884  }
885 
886  // Construct using com.google.ortools.linearsolver.MPGeneralConstraintProto.newBuilder()
887  private Builder() {
888  maybeForceBuilderInitialization();
889  }
890 
891  private Builder(
892  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
893  super(parent);
894  maybeForceBuilderInitialization();
895  }
896  private void maybeForceBuilderInitialization() {
897  if (com.google.protobuf.GeneratedMessageV3
898  .alwaysUseFieldBuilders) {
899  }
900  }
901  @java.lang.Override
902  public Builder clear() {
903  super.clear();
904  name_ = "";
905  bitField0_ = (bitField0_ & ~0x00000001);
906  generalConstraintCase_ = 0;
907  generalConstraint_ = null;
908  return this;
909  }
910 
911  @java.lang.Override
912  public com.google.protobuf.Descriptors.Descriptor
914  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor;
915  }
916 
917  @java.lang.Override
920  }
921 
922  @java.lang.Override
925  if (!result.isInitialized()) {
926  throw newUninitializedMessageException(result);
927  }
928  return result;
929  }
930 
931  @java.lang.Override
934  int from_bitField0_ = bitField0_;
935  int to_bitField0_ = 0;
936  if (((from_bitField0_ & 0x00000001) != 0)) {
937  to_bitField0_ |= 0x00000001;
938  }
939  result.name_ = name_;
940  if (generalConstraintCase_ == 2) {
941  if (indicatorConstraintBuilder_ == null) {
942  result.generalConstraint_ = generalConstraint_;
943  } else {
944  result.generalConstraint_ = indicatorConstraintBuilder_.build();
945  }
946  }
947  if (generalConstraintCase_ == 3) {
948  if (sosConstraintBuilder_ == null) {
949  result.generalConstraint_ = generalConstraint_;
950  } else {
951  result.generalConstraint_ = sosConstraintBuilder_.build();
952  }
953  }
954  if (generalConstraintCase_ == 4) {
955  if (quadraticConstraintBuilder_ == null) {
956  result.generalConstraint_ = generalConstraint_;
957  } else {
958  result.generalConstraint_ = quadraticConstraintBuilder_.build();
959  }
960  }
961  if (generalConstraintCase_ == 5) {
962  if (absConstraintBuilder_ == null) {
963  result.generalConstraint_ = generalConstraint_;
964  } else {
965  result.generalConstraint_ = absConstraintBuilder_.build();
966  }
967  }
968  if (generalConstraintCase_ == 6) {
969  if (andConstraintBuilder_ == null) {
970  result.generalConstraint_ = generalConstraint_;
971  } else {
972  result.generalConstraint_ = andConstraintBuilder_.build();
973  }
974  }
975  if (generalConstraintCase_ == 7) {
976  if (orConstraintBuilder_ == null) {
977  result.generalConstraint_ = generalConstraint_;
978  } else {
979  result.generalConstraint_ = orConstraintBuilder_.build();
980  }
981  }
982  if (generalConstraintCase_ == 8) {
983  if (minConstraintBuilder_ == null) {
984  result.generalConstraint_ = generalConstraint_;
985  } else {
986  result.generalConstraint_ = minConstraintBuilder_.build();
987  }
988  }
989  if (generalConstraintCase_ == 9) {
990  if (maxConstraintBuilder_ == null) {
991  result.generalConstraint_ = generalConstraint_;
992  } else {
993  result.generalConstraint_ = maxConstraintBuilder_.build();
994  }
995  }
996  result.bitField0_ = to_bitField0_;
997  result.generalConstraintCase_ = generalConstraintCase_;
998  onBuilt();
999  return result;
1000  }
1001 
1002  @java.lang.Override
1003  public Builder clone() {
1004  return super.clone();
1005  }
1006  @java.lang.Override
1008  com.google.protobuf.Descriptors.FieldDescriptor field,
1009  java.lang.Object value) {
1010  return super.setField(field, value);
1011  }
1012  @java.lang.Override
1014  com.google.protobuf.Descriptors.FieldDescriptor field) {
1015  return super.clearField(field);
1016  }
1017  @java.lang.Override
1019  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1020  return super.clearOneof(oneof);
1021  }
1022  @java.lang.Override
1024  com.google.protobuf.Descriptors.FieldDescriptor field,
1025  int index, java.lang.Object value) {
1026  return super.setRepeatedField(field, index, value);
1027  }
1028  @java.lang.Override
1030  com.google.protobuf.Descriptors.FieldDescriptor field,
1031  java.lang.Object value) {
1032  return super.addRepeatedField(field, value);
1033  }
1034  @java.lang.Override
1035  public Builder mergeFrom(com.google.protobuf.Message other) {
1036  if (other instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto) {
1038  } else {
1039  super.mergeFrom(other);
1040  return this;
1041  }
1042  }
1043 
1046  if (other.hasName()) {
1047  bitField0_ |= 0x00000001;
1048  name_ = other.name_;
1049  onChanged();
1050  }
1051  switch (other.getGeneralConstraintCase()) {
1052  case INDICATOR_CONSTRAINT: {
1053  mergeIndicatorConstraint(other.getIndicatorConstraint());
1054  break;
1055  }
1056  case SOS_CONSTRAINT: {
1057  mergeSosConstraint(other.getSosConstraint());
1058  break;
1059  }
1060  case QUADRATIC_CONSTRAINT: {
1061  mergeQuadraticConstraint(other.getQuadraticConstraint());
1062  break;
1063  }
1064  case ABS_CONSTRAINT: {
1065  mergeAbsConstraint(other.getAbsConstraint());
1066  break;
1067  }
1068  case AND_CONSTRAINT: {
1069  mergeAndConstraint(other.getAndConstraint());
1070  break;
1071  }
1072  case OR_CONSTRAINT: {
1073  mergeOrConstraint(other.getOrConstraint());
1074  break;
1075  }
1076  case MIN_CONSTRAINT: {
1077  mergeMinConstraint(other.getMinConstraint());
1078  break;
1079  }
1080  case MAX_CONSTRAINT: {
1081  mergeMaxConstraint(other.getMaxConstraint());
1082  break;
1083  }
1084  case GENERALCONSTRAINT_NOT_SET: {
1085  break;
1086  }
1087  }
1088  this.mergeUnknownFields(other.unknownFields);
1089  onChanged();
1090  return this;
1091  }
1092 
1093  @java.lang.Override
1094  public final boolean isInitialized() {
1095  return true;
1096  }
1097 
1098  @java.lang.Override
1100  com.google.protobuf.CodedInputStream input,
1101  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1102  throws java.io.IOException {
1104  try {
1105  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1106  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1107  parsedMessage = (com.google.ortools.linearsolver.MPGeneralConstraintProto) e.getUnfinishedMessage();
1108  throw e.unwrapIOException();
1109  } finally {
1110  if (parsedMessage != null) {
1111  mergeFrom(parsedMessage);
1112  }
1113  }
1114  return this;
1115  }
1116  private int generalConstraintCase_ = 0;
1117  private java.lang.Object generalConstraint_;
1118  public GeneralConstraintCase
1121  generalConstraintCase_);
1122  }
1123 
1125  generalConstraintCase_ = 0;
1126  generalConstraint_ = null;
1127  onChanged();
1128  return this;
1129  }
1130 
1131  private int bitField0_;
1132 
1133  private java.lang.Object name_ = "";
1141  public boolean hasName() {
1142  return ((bitField0_ & 0x00000001) != 0);
1143  }
1151  public java.lang.String getName() {
1152  java.lang.Object ref = name_;
1153  if (!(ref instanceof java.lang.String)) {
1154  com.google.protobuf.ByteString bs =
1155  (com.google.protobuf.ByteString) ref;
1156  java.lang.String s = bs.toStringUtf8();
1157  if (bs.isValidUtf8()) {
1158  name_ = s;
1159  }
1160  return s;
1161  } else {
1162  return (java.lang.String) ref;
1163  }
1164  }
1172  public com.google.protobuf.ByteString
1174  java.lang.Object ref = name_;
1175  if (ref instanceof String) {
1176  com.google.protobuf.ByteString b =
1177  com.google.protobuf.ByteString.copyFromUtf8(
1178  (java.lang.String) ref);
1179  name_ = b;
1180  return b;
1181  } else {
1182  return (com.google.protobuf.ByteString) ref;
1183  }
1184  }
1193  java.lang.String value) {
1194  if (value == null) {
1195  throw new NullPointerException();
1196  }
1197  bitField0_ |= 0x00000001;
1198  name_ = value;
1199  onChanged();
1200  return this;
1201  }
1209  public Builder clearName() {
1210  bitField0_ = (bitField0_ & ~0x00000001);
1211  name_ = getDefaultInstance().getName();
1212  onChanged();
1213  return this;
1214  }
1223  com.google.protobuf.ByteString value) {
1224  if (value == null) {
1225  throw new NullPointerException();
1226  }
1227  bitField0_ |= 0x00000001;
1228  name_ = value;
1229  onChanged();
1230  return this;
1231  }
1232 
1233  private com.google.protobuf.SingleFieldBuilderV3<
1238  public boolean hasIndicatorConstraint() {
1239  return generalConstraintCase_ == 2;
1240  }
1245  if (indicatorConstraintBuilder_ == null) {
1246  if (generalConstraintCase_ == 2) {
1247  return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1248  }
1250  } else {
1251  if (generalConstraintCase_ == 2) {
1252  return indicatorConstraintBuilder_.getMessage();
1253  }
1255  }
1256  }
1261  if (indicatorConstraintBuilder_ == null) {
1262  if (value == null) {
1263  throw new NullPointerException();
1264  }
1265  generalConstraint_ = value;
1266  onChanged();
1267  } else {
1268  indicatorConstraintBuilder_.setMessage(value);
1269  }
1270  generalConstraintCase_ = 2;
1271  return this;
1272  }
1278  if (indicatorConstraintBuilder_ == null) {
1279  generalConstraint_ = builderForValue.build();
1280  onChanged();
1281  } else {
1282  indicatorConstraintBuilder_.setMessage(builderForValue.build());
1283  }
1284  generalConstraintCase_ = 2;
1285  return this;
1286  }
1291  if (indicatorConstraintBuilder_ == null) {
1292  if (generalConstraintCase_ == 2 &&
1295  .mergeFrom(value).buildPartial();
1296  } else {
1297  generalConstraint_ = value;
1298  }
1299  onChanged();
1300  } else {
1301  if (generalConstraintCase_ == 2) {
1302  indicatorConstraintBuilder_.mergeFrom(value);
1303  }
1304  indicatorConstraintBuilder_.setMessage(value);
1305  }
1306  generalConstraintCase_ = 2;
1307  return this;
1308  }
1313  if (indicatorConstraintBuilder_ == null) {
1314  if (generalConstraintCase_ == 2) {
1315  generalConstraintCase_ = 0;
1316  generalConstraint_ = null;
1317  onChanged();
1318  }
1319  } else {
1320  if (generalConstraintCase_ == 2) {
1321  generalConstraintCase_ = 0;
1322  generalConstraint_ = null;
1323  }
1324  indicatorConstraintBuilder_.clear();
1325  }
1326  return this;
1327  }
1332  return getIndicatorConstraintFieldBuilder().getBuilder();
1333  }
1338  if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ != null)) {
1339  return indicatorConstraintBuilder_.getMessageOrBuilder();
1340  } else {
1341  if (generalConstraintCase_ == 2) {
1342  return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_;
1343  }
1345  }
1346  }
1350  private com.google.protobuf.SingleFieldBuilderV3<
1352  getIndicatorConstraintFieldBuilder() {
1353  if (indicatorConstraintBuilder_ == null) {
1354  if (!(generalConstraintCase_ == 2)) {
1356  }
1357  indicatorConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1359  (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_,
1360  getParentForChildren(),
1361  isClean());
1362  generalConstraint_ = null;
1363  }
1364  generalConstraintCase_ = 2;
1365  onChanged();;
1366  return indicatorConstraintBuilder_;
1367  }
1368 
1369  private com.google.protobuf.SingleFieldBuilderV3<
1374  public boolean hasSosConstraint() {
1375  return generalConstraintCase_ == 3;
1376  }
1381  if (sosConstraintBuilder_ == null) {
1382  if (generalConstraintCase_ == 3) {
1383  return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1384  }
1386  } else {
1387  if (generalConstraintCase_ == 3) {
1388  return sosConstraintBuilder_.getMessage();
1389  }
1391  }
1392  }
1397  if (sosConstraintBuilder_ == null) {
1398  if (value == null) {
1399  throw new NullPointerException();
1400  }
1401  generalConstraint_ = value;
1402  onChanged();
1403  } else {
1404  sosConstraintBuilder_.setMessage(value);
1405  }
1406  generalConstraintCase_ = 3;
1407  return this;
1408  }
1414  if (sosConstraintBuilder_ == null) {
1415  generalConstraint_ = builderForValue.build();
1416  onChanged();
1417  } else {
1418  sosConstraintBuilder_.setMessage(builderForValue.build());
1419  }
1420  generalConstraintCase_ = 3;
1421  return this;
1422  }
1427  if (sosConstraintBuilder_ == null) {
1428  if (generalConstraintCase_ == 3 &&
1431  .mergeFrom(value).buildPartial();
1432  } else {
1433  generalConstraint_ = value;
1434  }
1435  onChanged();
1436  } else {
1437  if (generalConstraintCase_ == 3) {
1438  sosConstraintBuilder_.mergeFrom(value);
1439  }
1440  sosConstraintBuilder_.setMessage(value);
1441  }
1442  generalConstraintCase_ = 3;
1443  return this;
1444  }
1449  if (sosConstraintBuilder_ == null) {
1450  if (generalConstraintCase_ == 3) {
1451  generalConstraintCase_ = 0;
1452  generalConstraint_ = null;
1453  onChanged();
1454  }
1455  } else {
1456  if (generalConstraintCase_ == 3) {
1457  generalConstraintCase_ = 0;
1458  generalConstraint_ = null;
1459  }
1460  sosConstraintBuilder_.clear();
1461  }
1462  return this;
1463  }
1468  return getSosConstraintFieldBuilder().getBuilder();
1469  }
1474  if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ != null)) {
1475  return sosConstraintBuilder_.getMessageOrBuilder();
1476  } else {
1477  if (generalConstraintCase_ == 3) {
1478  return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_;
1479  }
1481  }
1482  }
1486  private com.google.protobuf.SingleFieldBuilderV3<
1488  getSosConstraintFieldBuilder() {
1489  if (sosConstraintBuilder_ == null) {
1490  if (!(generalConstraintCase_ == 3)) {
1492  }
1493  sosConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1495  (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_,
1496  getParentForChildren(),
1497  isClean());
1498  generalConstraint_ = null;
1499  }
1500  generalConstraintCase_ = 3;
1501  onChanged();;
1502  return sosConstraintBuilder_;
1503  }
1504 
1505  private com.google.protobuf.SingleFieldBuilderV3<
1510  public boolean hasQuadraticConstraint() {
1511  return generalConstraintCase_ == 4;
1512  }
1517  if (quadraticConstraintBuilder_ == null) {
1518  if (generalConstraintCase_ == 4) {
1519  return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1520  }
1522  } else {
1523  if (generalConstraintCase_ == 4) {
1524  return quadraticConstraintBuilder_.getMessage();
1525  }
1527  }
1528  }
1533  if (quadraticConstraintBuilder_ == null) {
1534  if (value == null) {
1535  throw new NullPointerException();
1536  }
1537  generalConstraint_ = value;
1538  onChanged();
1539  } else {
1540  quadraticConstraintBuilder_.setMessage(value);
1541  }
1542  generalConstraintCase_ = 4;
1543  return this;
1544  }
1550  if (quadraticConstraintBuilder_ == null) {
1551  generalConstraint_ = builderForValue.build();
1552  onChanged();
1553  } else {
1554  quadraticConstraintBuilder_.setMessage(builderForValue.build());
1555  }
1556  generalConstraintCase_ = 4;
1557  return this;
1558  }
1563  if (quadraticConstraintBuilder_ == null) {
1564  if (generalConstraintCase_ == 4 &&
1567  .mergeFrom(value).buildPartial();
1568  } else {
1569  generalConstraint_ = value;
1570  }
1571  onChanged();
1572  } else {
1573  if (generalConstraintCase_ == 4) {
1574  quadraticConstraintBuilder_.mergeFrom(value);
1575  }
1576  quadraticConstraintBuilder_.setMessage(value);
1577  }
1578  generalConstraintCase_ = 4;
1579  return this;
1580  }
1585  if (quadraticConstraintBuilder_ == null) {
1586  if (generalConstraintCase_ == 4) {
1587  generalConstraintCase_ = 0;
1588  generalConstraint_ = null;
1589  onChanged();
1590  }
1591  } else {
1592  if (generalConstraintCase_ == 4) {
1593  generalConstraintCase_ = 0;
1594  generalConstraint_ = null;
1595  }
1596  quadraticConstraintBuilder_.clear();
1597  }
1598  return this;
1599  }
1604  return getQuadraticConstraintFieldBuilder().getBuilder();
1605  }
1610  if ((generalConstraintCase_ == 4) && (quadraticConstraintBuilder_ != null)) {
1611  return quadraticConstraintBuilder_.getMessageOrBuilder();
1612  } else {
1613  if (generalConstraintCase_ == 4) {
1614  return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_;
1615  }
1617  }
1618  }
1622  private com.google.protobuf.SingleFieldBuilderV3<
1624  getQuadraticConstraintFieldBuilder() {
1625  if (quadraticConstraintBuilder_ == null) {
1626  if (!(generalConstraintCase_ == 4)) {
1628  }
1629  quadraticConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1631  (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_,
1632  getParentForChildren(),
1633  isClean());
1634  generalConstraint_ = null;
1635  }
1636  generalConstraintCase_ = 4;
1637  onChanged();;
1638  return quadraticConstraintBuilder_;
1639  }
1640 
1641  private com.google.protobuf.SingleFieldBuilderV3<
1646  public boolean hasAbsConstraint() {
1647  return generalConstraintCase_ == 5;
1648  }
1653  if (absConstraintBuilder_ == null) {
1654  if (generalConstraintCase_ == 5) {
1655  return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1656  }
1658  } else {
1659  if (generalConstraintCase_ == 5) {
1660  return absConstraintBuilder_.getMessage();
1661  }
1663  }
1664  }
1669  if (absConstraintBuilder_ == null) {
1670  if (value == null) {
1671  throw new NullPointerException();
1672  }
1673  generalConstraint_ = value;
1674  onChanged();
1675  } else {
1676  absConstraintBuilder_.setMessage(value);
1677  }
1678  generalConstraintCase_ = 5;
1679  return this;
1680  }
1686  if (absConstraintBuilder_ == null) {
1687  generalConstraint_ = builderForValue.build();
1688  onChanged();
1689  } else {
1690  absConstraintBuilder_.setMessage(builderForValue.build());
1691  }
1692  generalConstraintCase_ = 5;
1693  return this;
1694  }
1699  if (absConstraintBuilder_ == null) {
1700  if (generalConstraintCase_ == 5 &&
1703  .mergeFrom(value).buildPartial();
1704  } else {
1705  generalConstraint_ = value;
1706  }
1707  onChanged();
1708  } else {
1709  if (generalConstraintCase_ == 5) {
1710  absConstraintBuilder_.mergeFrom(value);
1711  }
1712  absConstraintBuilder_.setMessage(value);
1713  }
1714  generalConstraintCase_ = 5;
1715  return this;
1716  }
1721  if (absConstraintBuilder_ == null) {
1722  if (generalConstraintCase_ == 5) {
1723  generalConstraintCase_ = 0;
1724  generalConstraint_ = null;
1725  onChanged();
1726  }
1727  } else {
1728  if (generalConstraintCase_ == 5) {
1729  generalConstraintCase_ = 0;
1730  generalConstraint_ = null;
1731  }
1732  absConstraintBuilder_.clear();
1733  }
1734  return this;
1735  }
1740  return getAbsConstraintFieldBuilder().getBuilder();
1741  }
1746  if ((generalConstraintCase_ == 5) && (absConstraintBuilder_ != null)) {
1747  return absConstraintBuilder_.getMessageOrBuilder();
1748  } else {
1749  if (generalConstraintCase_ == 5) {
1750  return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_;
1751  }
1753  }
1754  }
1758  private com.google.protobuf.SingleFieldBuilderV3<
1760  getAbsConstraintFieldBuilder() {
1761  if (absConstraintBuilder_ == null) {
1762  if (!(generalConstraintCase_ == 5)) {
1764  }
1765  absConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1767  (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_,
1768  getParentForChildren(),
1769  isClean());
1770  generalConstraint_ = null;
1771  }
1772  generalConstraintCase_ = 5;
1773  onChanged();;
1774  return absConstraintBuilder_;
1775  }
1776 
1777  private com.google.protobuf.SingleFieldBuilderV3<
1787  public boolean hasAndConstraint() {
1788  return generalConstraintCase_ == 6;
1789  }
1799  if (andConstraintBuilder_ == null) {
1800  if (generalConstraintCase_ == 6) {
1801  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1802  }
1804  } else {
1805  if (generalConstraintCase_ == 6) {
1806  return andConstraintBuilder_.getMessage();
1807  }
1809  }
1810  }
1820  if (andConstraintBuilder_ == null) {
1821  if (value == null) {
1822  throw new NullPointerException();
1823  }
1824  generalConstraint_ = value;
1825  onChanged();
1826  } else {
1827  andConstraintBuilder_.setMessage(value);
1828  }
1829  generalConstraintCase_ = 6;
1830  return this;
1831  }
1842  if (andConstraintBuilder_ == null) {
1843  generalConstraint_ = builderForValue.build();
1844  onChanged();
1845  } else {
1846  andConstraintBuilder_.setMessage(builderForValue.build());
1847  }
1848  generalConstraintCase_ = 6;
1849  return this;
1850  }
1860  if (andConstraintBuilder_ == null) {
1861  if (generalConstraintCase_ == 6 &&
1864  .mergeFrom(value).buildPartial();
1865  } else {
1866  generalConstraint_ = value;
1867  }
1868  onChanged();
1869  } else {
1870  if (generalConstraintCase_ == 6) {
1871  andConstraintBuilder_.mergeFrom(value);
1872  }
1873  andConstraintBuilder_.setMessage(value);
1874  }
1875  generalConstraintCase_ = 6;
1876  return this;
1877  }
1887  if (andConstraintBuilder_ == null) {
1888  if (generalConstraintCase_ == 6) {
1889  generalConstraintCase_ = 0;
1890  generalConstraint_ = null;
1891  onChanged();
1892  }
1893  } else {
1894  if (generalConstraintCase_ == 6) {
1895  generalConstraintCase_ = 0;
1896  generalConstraint_ = null;
1897  }
1898  andConstraintBuilder_.clear();
1899  }
1900  return this;
1901  }
1911  return getAndConstraintFieldBuilder().getBuilder();
1912  }
1922  if ((generalConstraintCase_ == 6) && (andConstraintBuilder_ != null)) {
1923  return andConstraintBuilder_.getMessageOrBuilder();
1924  } else {
1925  if (generalConstraintCase_ == 6) {
1926  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1927  }
1929  }
1930  }
1939  private com.google.protobuf.SingleFieldBuilderV3<
1941  getAndConstraintFieldBuilder() {
1942  if (andConstraintBuilder_ == null) {
1943  if (!(generalConstraintCase_ == 6)) {
1945  }
1946  andConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1948  (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
1949  getParentForChildren(),
1950  isClean());
1951  generalConstraint_ = null;
1952  }
1953  generalConstraintCase_ = 6;
1954  onChanged();;
1955  return andConstraintBuilder_;
1956  }
1957 
1958  private com.google.protobuf.SingleFieldBuilderV3<
1968  public boolean hasOrConstraint() {
1969  return generalConstraintCase_ == 7;
1970  }
1980  if (orConstraintBuilder_ == null) {
1981  if (generalConstraintCase_ == 7) {
1982  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
1983  }
1985  } else {
1986  if (generalConstraintCase_ == 7) {
1987  return orConstraintBuilder_.getMessage();
1988  }
1990  }
1991  }
2001  if (orConstraintBuilder_ == null) {
2002  if (value == null) {
2003  throw new NullPointerException();
2004  }
2005  generalConstraint_ = value;
2006  onChanged();
2007  } else {
2008  orConstraintBuilder_.setMessage(value);
2009  }
2010  generalConstraintCase_ = 7;
2011  return this;
2012  }
2023  if (orConstraintBuilder_ == null) {
2024  generalConstraint_ = builderForValue.build();
2025  onChanged();
2026  } else {
2027  orConstraintBuilder_.setMessage(builderForValue.build());
2028  }
2029  generalConstraintCase_ = 7;
2030  return this;
2031  }
2041  if (orConstraintBuilder_ == null) {
2042  if (generalConstraintCase_ == 7 &&
2045  .mergeFrom(value).buildPartial();
2046  } else {
2047  generalConstraint_ = value;
2048  }
2049  onChanged();
2050  } else {
2051  if (generalConstraintCase_ == 7) {
2052  orConstraintBuilder_.mergeFrom(value);
2053  }
2054  orConstraintBuilder_.setMessage(value);
2055  }
2056  generalConstraintCase_ = 7;
2057  return this;
2058  }
2068  if (orConstraintBuilder_ == null) {
2069  if (generalConstraintCase_ == 7) {
2070  generalConstraintCase_ = 0;
2071  generalConstraint_ = null;
2072  onChanged();
2073  }
2074  } else {
2075  if (generalConstraintCase_ == 7) {
2076  generalConstraintCase_ = 0;
2077  generalConstraint_ = null;
2078  }
2079  orConstraintBuilder_.clear();
2080  }
2081  return this;
2082  }
2092  return getOrConstraintFieldBuilder().getBuilder();
2093  }
2103  if ((generalConstraintCase_ == 7) && (orConstraintBuilder_ != null)) {
2104  return orConstraintBuilder_.getMessageOrBuilder();
2105  } else {
2106  if (generalConstraintCase_ == 7) {
2107  return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_;
2108  }
2110  }
2111  }
2120  private com.google.protobuf.SingleFieldBuilderV3<
2122  getOrConstraintFieldBuilder() {
2123  if (orConstraintBuilder_ == null) {
2124  if (!(generalConstraintCase_ == 7)) {
2126  }
2127  orConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2129  (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_,
2130  getParentForChildren(),
2131  isClean());
2132  generalConstraint_ = null;
2133  }
2134  generalConstraintCase_ = 7;
2135  onChanged();;
2136  return orConstraintBuilder_;
2137  }
2138 
2139  private com.google.protobuf.SingleFieldBuilderV3<
2148  public boolean hasMinConstraint() {
2149  return generalConstraintCase_ == 8;
2150  }
2159  if (minConstraintBuilder_ == null) {
2160  if (generalConstraintCase_ == 8) {
2161  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2162  }
2164  } else {
2165  if (generalConstraintCase_ == 8) {
2166  return minConstraintBuilder_.getMessage();
2167  }
2169  }
2170  }
2179  if (minConstraintBuilder_ == null) {
2180  if (value == null) {
2181  throw new NullPointerException();
2182  }
2183  generalConstraint_ = value;
2184  onChanged();
2185  } else {
2186  minConstraintBuilder_.setMessage(value);
2187  }
2188  generalConstraintCase_ = 8;
2189  return this;
2190  }
2200  if (minConstraintBuilder_ == null) {
2201  generalConstraint_ = builderForValue.build();
2202  onChanged();
2203  } else {
2204  minConstraintBuilder_.setMessage(builderForValue.build());
2205  }
2206  generalConstraintCase_ = 8;
2207  return this;
2208  }
2217  if (minConstraintBuilder_ == null) {
2218  if (generalConstraintCase_ == 8 &&
2221  .mergeFrom(value).buildPartial();
2222  } else {
2223  generalConstraint_ = value;
2224  }
2225  onChanged();
2226  } else {
2227  if (generalConstraintCase_ == 8) {
2228  minConstraintBuilder_.mergeFrom(value);
2229  }
2230  minConstraintBuilder_.setMessage(value);
2231  }
2232  generalConstraintCase_ = 8;
2233  return this;
2234  }
2243  if (minConstraintBuilder_ == null) {
2244  if (generalConstraintCase_ == 8) {
2245  generalConstraintCase_ = 0;
2246  generalConstraint_ = null;
2247  onChanged();
2248  }
2249  } else {
2250  if (generalConstraintCase_ == 8) {
2251  generalConstraintCase_ = 0;
2252  generalConstraint_ = null;
2253  }
2254  minConstraintBuilder_.clear();
2255  }
2256  return this;
2257  }
2266  return getMinConstraintFieldBuilder().getBuilder();
2267  }
2276  if ((generalConstraintCase_ == 8) && (minConstraintBuilder_ != null)) {
2277  return minConstraintBuilder_.getMessageOrBuilder();
2278  } else {
2279  if (generalConstraintCase_ == 8) {
2280  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2281  }
2283  }
2284  }
2292  private com.google.protobuf.SingleFieldBuilderV3<
2294  getMinConstraintFieldBuilder() {
2295  if (minConstraintBuilder_ == null) {
2296  if (!(generalConstraintCase_ == 8)) {
2298  }
2299  minConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2302  getParentForChildren(),
2303  isClean());
2304  generalConstraint_ = null;
2305  }
2306  generalConstraintCase_ = 8;
2307  onChanged();;
2308  return minConstraintBuilder_;
2309  }
2310 
2311  private com.google.protobuf.SingleFieldBuilderV3<
2320  public boolean hasMaxConstraint() {
2321  return generalConstraintCase_ == 9;
2322  }
2331  if (maxConstraintBuilder_ == null) {
2332  if (generalConstraintCase_ == 9) {
2333  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2334  }
2336  } else {
2337  if (generalConstraintCase_ == 9) {
2338  return maxConstraintBuilder_.getMessage();
2339  }
2341  }
2342  }
2351  if (maxConstraintBuilder_ == null) {
2352  if (value == null) {
2353  throw new NullPointerException();
2354  }
2355  generalConstraint_ = value;
2356  onChanged();
2357  } else {
2358  maxConstraintBuilder_.setMessage(value);
2359  }
2360  generalConstraintCase_ = 9;
2361  return this;
2362  }
2372  if (maxConstraintBuilder_ == null) {
2373  generalConstraint_ = builderForValue.build();
2374  onChanged();
2375  } else {
2376  maxConstraintBuilder_.setMessage(builderForValue.build());
2377  }
2378  generalConstraintCase_ = 9;
2379  return this;
2380  }
2389  if (maxConstraintBuilder_ == null) {
2390  if (generalConstraintCase_ == 9 &&
2393  .mergeFrom(value).buildPartial();
2394  } else {
2395  generalConstraint_ = value;
2396  }
2397  onChanged();
2398  } else {
2399  if (generalConstraintCase_ == 9) {
2400  maxConstraintBuilder_.mergeFrom(value);
2401  }
2402  maxConstraintBuilder_.setMessage(value);
2403  }
2404  generalConstraintCase_ = 9;
2405  return this;
2406  }
2415  if (maxConstraintBuilder_ == null) {
2416  if (generalConstraintCase_ == 9) {
2417  generalConstraintCase_ = 0;
2418  generalConstraint_ = null;
2419  onChanged();
2420  }
2421  } else {
2422  if (generalConstraintCase_ == 9) {
2423  generalConstraintCase_ = 0;
2424  generalConstraint_ = null;
2425  }
2426  maxConstraintBuilder_.clear();
2427  }
2428  return this;
2429  }
2438  return getMaxConstraintFieldBuilder().getBuilder();
2439  }
2448  if ((generalConstraintCase_ == 9) && (maxConstraintBuilder_ != null)) {
2449  return maxConstraintBuilder_.getMessageOrBuilder();
2450  } else {
2451  if (generalConstraintCase_ == 9) {
2452  return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_;
2453  }
2455  }
2456  }
2464  private com.google.protobuf.SingleFieldBuilderV3<
2466  getMaxConstraintFieldBuilder() {
2467  if (maxConstraintBuilder_ == null) {
2468  if (!(generalConstraintCase_ == 9)) {
2470  }
2471  maxConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2474  getParentForChildren(),
2475  isClean());
2476  generalConstraint_ = null;
2477  }
2478  generalConstraintCase_ = 9;
2479  onChanged();;
2480  return maxConstraintBuilder_;
2481  }
2482  @java.lang.Override
2484  final com.google.protobuf.UnknownFieldSet unknownFields) {
2485  return super.setUnknownFields(unknownFields);
2486  }
2487 
2488  @java.lang.Override
2490  final com.google.protobuf.UnknownFieldSet unknownFields) {
2491  return super.mergeUnknownFields(unknownFields);
2492  }
2493 
2494 
2495  // @@protoc_insertion_point(builder_scope:operations_research.MPGeneralConstraintProto)
2496  }
2497 
2498  // @@protoc_insertion_point(class_scope:operations_research.MPGeneralConstraintProto)
2499  private static final com.google.ortools.linearsolver.MPGeneralConstraintProto DEFAULT_INSTANCE;
2500  static {
2501  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPGeneralConstraintProto();
2502  }
2503 
2505  return DEFAULT_INSTANCE;
2506  }
2507 
2508  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPGeneralConstraintProto>
2509  PARSER = new com.google.protobuf.AbstractParser<MPGeneralConstraintProto>() {
2510  @java.lang.Override
2511  public MPGeneralConstraintProto parsePartialFrom(
2512  com.google.protobuf.CodedInputStream input,
2513  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2514  throws com.google.protobuf.InvalidProtocolBufferException {
2515  return new MPGeneralConstraintProto(input, extensionRegistry);
2516  }
2517  };
2518 
2519  public static com.google.protobuf.Parser<MPGeneralConstraintProto> parser() {
2520  return PARSER;
2521  }
2522 
2523  @java.lang.Override
2525  return PARSER;
2526  }
2527 
2528  @java.lang.Override
2530  return DEFAULT_INSTANCE;
2531  }
2532 
2533 }
2534 
static final int QUADRATIC_CONSTRAINT_FIELD_NUMBER
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder()
static final int SOS_CONSTRAINT_FIELD_NUMBER
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Deprecated static GeneralConstraintCase valueOf(int value)
com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value)
optional .operations_research.MPSosConstraint sos_constraint = 3;
.lang.Override int hashCode()
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
.lang.Override boolean equals(final java.lang.Object obj)
boolean hasName()
static Builder newBuilder()
com.google.ortools.linearsolver.MPIndicatorConstraint.Builder getIndicatorConstraintBuilder()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
.lang.Override int hashCode()
static Builder newBuilder()
.lang.Override com.google.ortools.linearsolver.MPGeneralConstraintProto build()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
java.lang.String getName()
Builder clearQuadraticConstraint()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
.lang.Override Builder clear()
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
boolean hasOrConstraint()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder()
.lang.Deprecated static final com.google.protobuf.Parser< MPArrayWithConstantConstraint > PARSER
static Builder newBuilder()
com.google.ortools.linearsolver.MPSosConstraint getSosConstraint()
optional .operations_research.MPSosConstraint sos_constraint = 3;
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
boolean hasName()
com.google.protobuf.ByteString getNameBytes()
.lang.Override Builder clone()
Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue)
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
Builder clearIndicatorConstraint()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
static com.google.ortools.linearsolver.MPQuadraticConstraint getDefaultInstance()
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder()
.lang.Override com.google.ortools.linearsolver.MPQuadraticConstraint buildPartial()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder()
com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder()
optional .operations_research.MPSosConstraint sos_constraint = 3;
static Builder newBuilder()
com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(byte[] data)
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint()
.lang.Deprecated static final com.google.protobuf.Parser< MPAbsConstraint > PARSER
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
Builder clearGeneralConstraint()
Builder clearName()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstance()
.lang.Override final boolean isInitialized()
.lang.Override com.google.ortools.linearsolver.MPSosConstraint buildPartial()
.lang.Deprecated static final com.google.protobuf.Parser< MPQuadraticConstraint > PARSER
boolean hasMaxConstraint()
SOS_CONSTRAINT
com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
boolean hasAbsConstraint()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
static com.google.ortools.linearsolver.MPArrayConstraint getDefaultInstance()
Builder clearOrConstraint()
com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override int hashCode()
ABS_CONSTRAINT
.lang.Override com.google.ortools.linearsolver.MPAbsConstraint buildPartial()
com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
boolean hasIndicatorConstraint()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
MIN_CONSTRAINT
.lang.Override com.google.ortools.linearsolver.MPArrayWithConstantConstraint buildPartial()
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
com.google.ortools.linearsolver.MPSosConstraint getSosConstraint()
optional .operations_research.MPSosConstraint sos_constraint = 3;
com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMinConstraintBuilder()
Builder setName(java.lang.String value)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override boolean equals(final java.lang.Object obj)
static Builder newBuilder(com.google.ortools.linearsolver.MPGeneralConstraintProto prototype)
static final int OR_CONSTRAINT_FIELD_NUMBER
boolean hasMinConstraint()
com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder()
optional .operations_research.MPSosConstraint sos_constraint = 3;
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPSosConstraint getDefaultInstance()
Builder clearAndConstraint()
Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value)
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
GENERALCONSTRAINT_NOT_SET
com.google.ortools.linearsolver.MPArrayConstraint.Builder getAndConstraintBuilder()
.lang.Override boolean equals(final java.lang.Object obj)
boolean hasAndConstraint()
com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue)
optional .operations_research.MPSosConstraint sos_constraint = 3;
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder mergeMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
boolean hasQuadraticConstraint()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
INDICATOR_CONSTRAINT
com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMaxConstraintBuilder()
boolean hasMaxConstraint()
Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue)
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
.lang.Override com.google.protobuf.Parser< MPGeneralConstraintProto > getParserForType()
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder()
OR_CONSTRAINT
Builder setNameBytes(com.google.protobuf.ByteString value)
static com.google.ortools.linearsolver.MPArrayWithConstantConstraint getDefaultInstance()
.lang.Override Builder toBuilder()
Builder mergeFrom(com.google.ortools.linearsolver.MPGeneralConstraintProto other)
static final int NAME_FIELD_NUMBER
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint()
com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint()
com.google.protobuf.ByteString getNameBytes()
static final int MIN_CONSTRAINT_FIELD_NUMBER
static com.google.protobuf.Parser< MPGeneralConstraintProto > parser()
Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value)
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
com.google.ortools.linearsolver.MPSosConstraint.Builder getSosConstraintBuilder()
optional .operations_research.MPSosConstraint sos_constraint = 3;
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue)
.lang.Override boolean equals(final java.lang.Object obj)
Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value)
optional .operations_research.MPAbsConstraint abs_constraint = 5;
Builder clearAbsConstraint()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
.lang.Override int hashCode()
.lang.Override boolean equals(final java.lang.Object obj)
Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
com.google.ortools.linearsolver.MPArrayConstraint.Builder getOrConstraintBuilder()
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
.lang.Deprecated static final com.google.protobuf.Parser< MPIndicatorConstraint > PARSER
static com.google.ortools.linearsolver.MPAbsConstraint getDefaultInstance()
com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
static Builder newBuilder()
int getNumber()
static Builder newBuilder()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input)
Builder mergeQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value)
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
boolean hasAbsConstraint()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
static final int MAX_CONSTRAINT_FIELD_NUMBER
boolean hasQuadraticConstraint()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
.lang.Override boolean equals(final java.lang.Object obj)
Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
static final int AND_CONSTRAINT_FIELD_NUMBER
.lang.Override com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType()
boolean hasMinConstraint()
boolean hasSosConstraint()
optional .operations_research.MPSosConstraint sos_constraint = 3;
GeneralConstraintCase getGeneralConstraintCase()
Builder clearMinConstraint()
Builder mergeAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value)
optional .operations_research.MPAbsConstraint abs_constraint = 5;
Builder clearSosConstraint()
optional .operations_research.MPSosConstraint sos_constraint = 3;
com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder()
.lang.Deprecated static final com.google.protobuf.Parser< MPArrayConstraint > PARSER
com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint()
boolean hasAndConstraint()
Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue)
GeneralConstraintCase getGeneralConstraintCase()
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder()
Builder mergeAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.nio.ByteBuffer data)
.lang.Override final boolean isInitialized()
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.lang.String getName()
.lang.Override com.google.ortools.linearsolver.MPGeneralConstraintProto buildPartial()
com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint()
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static GeneralConstraintCase forNumber(int value)
static final int INDICATOR_CONSTRAINT_FIELD_NUMBER
Builder mergeIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value)
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue)
optional .operations_research.MPAbsConstraint abs_constraint = 5;
static com.google.ortools.linearsolver.MPIndicatorConstraint getDefaultInstance()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Override boolean equals(final java.lang.Object obj)
com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder()
.lang.Override com.google.ortools.linearsolver.MPIndicatorConstraint buildPartial()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(com.google.protobuf.ByteString data)
.lang.Override com.google.ortools.linearsolver.MPArrayConstraint buildPartial()
.lang.Override Builder newBuilderForType()
static Builder newBuilder()
Builder mergeSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value)
optional .operations_research.MPSosConstraint sos_constraint = 3;
AND_CONSTRAINT
com.google.ortools.linearsolver.MPAbsConstraint.Builder getAbsConstraintBuilder()
optional .operations_research.MPAbsConstraint abs_constraint = 5;
QUADRATIC_CONSTRAINT
static final int ABS_CONSTRAINT_FIELD_NUMBER
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Deprecated static final com.google.protobuf.Parser< MPGeneralConstraintProto > PARSER
boolean hasSosConstraint()
optional .operations_research.MPSosConstraint sos_constraint = 3;
Builder mergeMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value)
MAX_CONSTRAINT
Builder clearMaxConstraint()
.lang.Override com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType()
boolean hasOrConstraint()
com.google.ortools.linearsolver.MPQuadraticConstraint.Builder getQuadraticConstraintBuilder()
optional .operations_research.MPQuadraticConstraint quadratic_constraint = 4;
.lang.Override int hashCode()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
.lang.Override int hashCode()
.lang.Override int hashCode()
.lang.Deprecated static final com.google.protobuf.Parser< MPSosConstraint > PARSER
.lang.Override int getSerializedSize()
Builder mergeOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value)
com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint()
Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue)
boolean hasIndicatorConstraint()
optional .operations_research.MPIndicatorConstraint indicator_constraint = 2;
Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue)