4 package com.google.ortools.linearsolver;
14 com.google.protobuf.GeneratedMessageV3 implements
17 private static final long serialVersionUID = 0L;
27 @SuppressWarnings({
"unused"})
29 UnusedPrivateParameter unused) {
34 public final com.
google.protobuf.UnknownFieldSet
36 return this.unknownFields;
39 com.
google.protobuf.CodedInputStream input,
40 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
41 throws com.
google.protobuf.InvalidProtocolBufferException {
43 if (extensionRegistry ==
null) {
44 throw new java.lang.NullPointerException();
46 int mutable_bitField0_ = 0;
47 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
48 com.
google.protobuf.UnknownFieldSet.newBuilder();
52 int tag = input.readTag();
58 com.
google.protobuf.ByteString bs = input.readBytes();
59 bitField0_ |= 0x00000001;
65 if (generalConstraintCase_ == 2) {
70 if (subBuilder !=
null) {
72 generalConstraint_ = subBuilder.buildPartial();
74 generalConstraintCase_ = 2;
79 if (generalConstraintCase_ == 3) {
84 if (subBuilder !=
null) {
86 generalConstraint_ = subBuilder.buildPartial();
88 generalConstraintCase_ = 3;
92 if (!parseUnknownField(
93 input, unknownFields, extensionRegistry, tag)) {
100 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
101 throw e.setUnfinishedMessage(
this);
102 }
catch (java.io.IOException e) {
103 throw new com.
google.protobuf.InvalidProtocolBufferException(
104 e).setUnfinishedMessage(
this);
106 this.unknownFields = unknownFields.build();
107 makeExtensionsImmutable();
110 public static final com.
google.protobuf.Descriptors.Descriptor
116 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
119 .ensureFieldAccessorsInitialized(
123 private int bitField0_;
124 private int generalConstraintCase_ = 0;
125 private java.lang.Object generalConstraint_;
127 implements
com.
google.protobuf.Internal.EnumLite {
131 private final int value;
138 @java.lang.Deprecated
140 return forNumber(value);
145 case 2:
return INDICATOR_CONSTRAINT;
146 case 3:
return SOS_CONSTRAINT;
147 case 0:
return GENERALCONSTRAINT_NOT_SET;
148 default:
return null;
156 public GeneralConstraintCase
159 generalConstraintCase_);
163 private volatile java.lang.Object name_;
172 return ((bitField0_ & 0x00000001) != 0);
182 java.lang.Object ref = name_;
183 if (ref instanceof java.lang.String) {
184 return (java.lang.String) ref;
188 java.lang.String s = bs.toStringUtf8();
189 if (bs.isValidUtf8()) {
204 java.lang.Object ref = name_;
205 if (ref instanceof java.lang.String) {
207 com.
google.protobuf.ByteString.copyFromUtf8(
208 (java.lang.String) ref);
212 return (
com.
google.protobuf.ByteString) ref;
221 return generalConstraintCase_ == 2;
227 if (generalConstraintCase_ == 2) {
236 if (generalConstraintCase_ == 2) {
247 return generalConstraintCase_ == 3;
253 if (generalConstraintCase_ == 3) {
262 if (generalConstraintCase_ == 3) {
268 private byte memoizedIsInitialized = -1;
275 memoizedIsInitialized = 1;
281 throws java.io.IOException {
282 if (((bitField0_ & 0x00000001) != 0)) {
283 com.
google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
285 if (generalConstraintCase_ == 2) {
288 if (generalConstraintCase_ == 3) {
291 unknownFields.writeTo(output);
296 int size = memoizedSize;
297 if (size != -1)
return size;
300 if (((bitField0_ & 0x00000001) != 0)) {
301 size +=
com.
google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
303 if (generalConstraintCase_ == 2) {
304 size +=
com.
google.protobuf.CodedOutputStream
307 if (generalConstraintCase_ == 3) {
308 size +=
com.
google.protobuf.CodedOutputStream
311 size += unknownFields.getSerializedSize();
317 public boolean equals(
final java.lang.Object obj) {
322 return super.equals(obj);
326 if (
hasName() != other.hasName())
return false;
329 .equals(other.getName()))
return false;
332 switch (generalConstraintCase_) {
335 .
equals(other.getIndicatorConstraint()))
return false;
339 .
equals(other.getSosConstraint()))
return false;
344 if (!unknownFields.equals(other.unknownFields))
return false;
350 if (memoizedHashCode != 0) {
351 return memoizedHashCode;
357 hash = (53 * hash) +
getName().hashCode();
359 switch (generalConstraintCase_) {
371 hash = (29 * hash) + unknownFields.hashCode();
372 memoizedHashCode = hash;
377 java.nio.ByteBuffer data)
378 throws com.
google.protobuf.InvalidProtocolBufferException {
379 return PARSER.parseFrom(data);
382 java.nio.ByteBuffer data,
383 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
384 throws com.
google.protobuf.InvalidProtocolBufferException {
385 return PARSER.parseFrom(data, extensionRegistry);
389 throws com.
google.protobuf.InvalidProtocolBufferException {
390 return PARSER.parseFrom(data);
394 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
395 throws com.
google.protobuf.InvalidProtocolBufferException {
396 return PARSER.parseFrom(data, extensionRegistry);
399 throws com.
google.protobuf.InvalidProtocolBufferException {
400 return PARSER.parseFrom(data);
404 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
405 throws com.
google.protobuf.InvalidProtocolBufferException {
406 return PARSER.parseFrom(data, extensionRegistry);
409 throws java.io.IOException {
410 return com.
google.protobuf.GeneratedMessageV3
411 .parseWithIOException(
PARSER, input);
414 java.io.InputStream input,
415 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
416 throws java.io.IOException {
417 return com.
google.protobuf.GeneratedMessageV3
418 .parseWithIOException(
PARSER, input, extensionRegistry);
421 throws java.io.IOException {
422 return com.
google.protobuf.GeneratedMessageV3
423 .parseDelimitedWithIOException(
PARSER, input);
426 java.io.InputStream input,
427 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
428 throws java.io.IOException {
429 return com.
google.protobuf.GeneratedMessageV3
430 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
433 com.
google.protobuf.CodedInputStream input)
434 throws java.io.IOException {
435 return com.
google.protobuf.GeneratedMessageV3
436 .parseWithIOException(
PARSER, input);
439 com.
google.protobuf.CodedInputStream input,
440 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
441 throws java.io.IOException {
442 return com.
google.protobuf.GeneratedMessageV3
443 .parseWithIOException(
PARSER, input, extensionRegistry);
456 return this == DEFAULT_INSTANCE
462 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
474 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
477 public static final com.
google.protobuf.Descriptors.Descriptor
483 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
486 .ensureFieldAccessorsInitialized(
492 maybeForceBuilderInitialization();
496 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
498 maybeForceBuilderInitialization();
500 private void maybeForceBuilderInitialization() {
501 if (
com.
google.protobuf.GeneratedMessageV3
502 .alwaysUseFieldBuilders) {
509 bitField0_ = (bitField0_ & ~0x00000001);
510 generalConstraintCase_ = 0;
511 generalConstraint_ =
null;
516 public com.
google.protobuf.Descriptors.Descriptor
529 if (!result.isInitialized()) {
530 throw newUninitializedMessageException(result);
538 int from_bitField0_ = bitField0_;
539 int to_bitField0_ = 0;
540 if (((from_bitField0_ & 0x00000001) != 0)) {
541 to_bitField0_ |= 0x00000001;
543 result.name_ = name_;
544 if (generalConstraintCase_ == 2) {
545 if (indicatorConstraintBuilder_ ==
null) {
546 result.generalConstraint_ = generalConstraint_;
548 result.generalConstraint_ = indicatorConstraintBuilder_.build();
551 if (generalConstraintCase_ == 3) {
552 if (sosConstraintBuilder_ ==
null) {
553 result.generalConstraint_ = generalConstraint_;
555 result.generalConstraint_ = sosConstraintBuilder_.build();
558 result.bitField0_ = to_bitField0_;
559 result.generalConstraintCase_ = generalConstraintCase_;
566 return super.
clone();
570 com.
google.protobuf.Descriptors.FieldDescriptor field,
571 java.lang.Object value) {
572 return super.
setField(field, value);
576 com.
google.protobuf.Descriptors.FieldDescriptor field) {
581 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
586 com.
google.protobuf.Descriptors.FieldDescriptor field,
587 int index, java.lang.Object value) {
592 com.
google.protobuf.Descriptors.FieldDescriptor field,
593 java.lang.Object value) {
601 super.mergeFrom(other);
608 if (other.hasName()) {
609 bitField0_ |= 0x00000001;
613 switch (other.getGeneralConstraintCase()) {
614 case INDICATOR_CONSTRAINT: {
618 case SOS_CONSTRAINT: {
622 case GENERALCONSTRAINT_NOT_SET: {
638 com.
google.protobuf.CodedInputStream input,
639 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
640 throws java.io.IOException {
643 parsedMessage =
PARSER.parsePartialFrom(input, extensionRegistry);
644 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
646 throw e.unwrapIOException();
648 if (parsedMessage !=
null) {
654 private int generalConstraintCase_ = 0;
655 private java.lang.Object generalConstraint_;
659 generalConstraintCase_);
663 generalConstraintCase_ = 0;
664 generalConstraint_ =
null;
669 private int bitField0_;
671 private java.lang.Object name_ =
"";
680 return ((bitField0_ & 0x00000001) != 0);
690 java.lang.Object ref = name_;
691 if (!(ref instanceof java.lang.String)) {
694 java.lang.String s = bs.toStringUtf8();
695 if (bs.isValidUtf8()) {
700 return (java.lang.String) ref;
712 java.lang.Object ref = name_;
713 if (ref instanceof String) {
715 com.
google.protobuf.ByteString.copyFromUtf8(
716 (java.lang.String) ref);
720 return (
com.
google.protobuf.ByteString) ref;
731 java.lang.String value) {
733 throw new NullPointerException();
735 bitField0_ |= 0x00000001;
748 bitField0_ = (bitField0_ & ~0x00000001);
763 throw new NullPointerException();
765 bitField0_ |= 0x00000001;
771 private com.
google.protobuf.SingleFieldBuilderV3<
777 return generalConstraintCase_ == 2;
783 if (indicatorConstraintBuilder_ ==
null) {
784 if (generalConstraintCase_ == 2) {
789 if (generalConstraintCase_ == 2) {
790 return indicatorConstraintBuilder_.getMessage();
799 if (indicatorConstraintBuilder_ ==
null) {
801 throw new NullPointerException();
803 generalConstraint_ = value;
806 indicatorConstraintBuilder_.setMessage(value);
808 generalConstraintCase_ = 2;
816 if (indicatorConstraintBuilder_ ==
null) {
817 generalConstraint_ = builderForValue.build();
820 indicatorConstraintBuilder_.setMessage(builderForValue.build());
822 generalConstraintCase_ = 2;
829 if (indicatorConstraintBuilder_ ==
null) {
830 if (generalConstraintCase_ == 2 &&
835 generalConstraint_ = value;
839 if (generalConstraintCase_ == 2) {
840 indicatorConstraintBuilder_.mergeFrom(value);
842 indicatorConstraintBuilder_.setMessage(value);
844 generalConstraintCase_ = 2;
851 if (indicatorConstraintBuilder_ ==
null) {
852 if (generalConstraintCase_ == 2) {
853 generalConstraintCase_ = 0;
854 generalConstraint_ =
null;
858 if (generalConstraintCase_ == 2) {
859 generalConstraintCase_ = 0;
860 generalConstraint_ =
null;
862 indicatorConstraintBuilder_.clear();
870 return getIndicatorConstraintFieldBuilder().getBuilder();
876 if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ !=
null)) {
877 return indicatorConstraintBuilder_.getMessageOrBuilder();
879 if (generalConstraintCase_ == 2) {
888 private com.
google.protobuf.SingleFieldBuilderV3<
890 getIndicatorConstraintFieldBuilder() {
891 if (indicatorConstraintBuilder_ ==
null) {
892 if (!(generalConstraintCase_ == 2)) {
895 indicatorConstraintBuilder_ =
new com.
google.protobuf.SingleFieldBuilderV3<
898 getParentForChildren(),
900 generalConstraint_ =
null;
902 generalConstraintCase_ = 2;
904 return indicatorConstraintBuilder_;
907 private com.
google.protobuf.SingleFieldBuilderV3<
913 return generalConstraintCase_ == 3;
919 if (sosConstraintBuilder_ ==
null) {
920 if (generalConstraintCase_ == 3) {
925 if (generalConstraintCase_ == 3) {
926 return sosConstraintBuilder_.getMessage();
935 if (sosConstraintBuilder_ ==
null) {
937 throw new NullPointerException();
939 generalConstraint_ = value;
942 sosConstraintBuilder_.setMessage(value);
944 generalConstraintCase_ = 3;
952 if (sosConstraintBuilder_ ==
null) {
953 generalConstraint_ = builderForValue.build();
956 sosConstraintBuilder_.setMessage(builderForValue.build());
958 generalConstraintCase_ = 3;
965 if (sosConstraintBuilder_ ==
null) {
966 if (generalConstraintCase_ == 3 &&
971 generalConstraint_ = value;
975 if (generalConstraintCase_ == 3) {
976 sosConstraintBuilder_.mergeFrom(value);
978 sosConstraintBuilder_.setMessage(value);
980 generalConstraintCase_ = 3;
987 if (sosConstraintBuilder_ ==
null) {
988 if (generalConstraintCase_ == 3) {
989 generalConstraintCase_ = 0;
990 generalConstraint_ =
null;
994 if (generalConstraintCase_ == 3) {
995 generalConstraintCase_ = 0;
996 generalConstraint_ =
null;
998 sosConstraintBuilder_.clear();
1006 return getSosConstraintFieldBuilder().getBuilder();
1012 if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ !=
null)) {
1013 return sosConstraintBuilder_.getMessageOrBuilder();
1015 if (generalConstraintCase_ == 3) {
1024 private com.
google.protobuf.SingleFieldBuilderV3<
1026 getSosConstraintFieldBuilder() {
1027 if (sosConstraintBuilder_ ==
null) {
1028 if (!(generalConstraintCase_ == 3)) {
1031 sosConstraintBuilder_ =
new com.
google.protobuf.SingleFieldBuilderV3<
1034 getParentForChildren(),
1036 generalConstraint_ =
null;
1038 generalConstraintCase_ = 3;
1040 return sosConstraintBuilder_;
1044 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1050 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1065 return DEFAULT_INSTANCE;
1072 com.
google.protobuf.CodedInputStream input,
1073 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1074 throws com.
google.protobuf.InvalidProtocolBufferException {
1090 return DEFAULT_INSTANCE;