6package com.google.ortools.sat;
25public final class IntervalConstraintProto
extends
26 com.google.protobuf.GeneratedMessage implements
29private static final long serialVersionUID = 0L;
31 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
32 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
37 IntervalConstraintProto.class.getName());
40 private IntervalConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
43 private IntervalConstraintProto() {
46 public static final com.google.protobuf.Descriptors.Descriptor
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
52 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
54 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_fieldAccessorTable
55 .ensureFieldAccessorsInitialized(
56 com.google.ortools.sat.IntervalConstraintProto.class, com.google.ortools.sat.IntervalConstraintProto.Builder.class);
59 private int bitField0_;
68 return ((bitField0_ & 0x00000001) != 0);
76 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
83 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
94 return ((bitField0_ & 0x00000002) != 0);
102 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
109 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
120 return ((bitField0_ & 0x00000004) != 0);
128 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
135 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
138 private byte memoizedIsInitialized = -1;
145 memoizedIsInitialized = 1;
150 public void writeTo(com.google.protobuf.CodedOutputStream output)
151 throws java.io.IOException {
152 if (((bitField0_ & 0x00000001) != 0)) {
155 if (((bitField0_ & 0x00000002) != 0)) {
156 output.writeMessage(5,
getEnd());
158 if (((bitField0_ & 0x00000004) != 0)) {
159 output.writeMessage(6,
getSize());
161 getUnknownFields().writeTo(output);
166 int size = memoizedSize;
167 if (size != -1)
return size;
170 if (((bitField0_ & 0x00000001) != 0)) {
171 size += com.google.protobuf.CodedOutputStream
174 if (((bitField0_ & 0x00000002) != 0)) {
175 size += com.google.protobuf.CodedOutputStream
176 .computeMessageSize(5,
getEnd());
178 if (((bitField0_ & 0x00000004) != 0)) {
179 size += com.google.protobuf.CodedOutputStream
180 .computeMessageSize(6,
getSize());
182 size += getUnknownFields().getSerializedSize();
188 public boolean equals(
final java.lang.Object obj) {
192 if (!(obj instanceof com.google.ortools.sat.IntervalConstraintProto)) {
193 return super.equals(obj);
212 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
218 if (memoizedHashCode != 0) {
219 return memoizedHashCode;
235 hash = (29 * hash) + getUnknownFields().hashCode();
236 memoizedHashCode = hash;
241 java.nio.ByteBuffer data)
242 throws com.google.protobuf.InvalidProtocolBufferException {
243 return PARSER.parseFrom(data);
246 java.nio.ByteBuffer data,
247 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248 throws com.google.protobuf.InvalidProtocolBufferException {
249 return PARSER.parseFrom(data, extensionRegistry);
252 com.google.protobuf.ByteString data)
253 throws com.google.protobuf.InvalidProtocolBufferException {
254 return PARSER.parseFrom(data);
257 com.google.protobuf.ByteString data,
258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
259 throws com.google.protobuf.InvalidProtocolBufferException {
260 return PARSER.parseFrom(data, extensionRegistry);
263 throws com.google.protobuf.InvalidProtocolBufferException {
264 return PARSER.parseFrom(data);
268 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
269 throws com.google.protobuf.InvalidProtocolBufferException {
270 return PARSER.parseFrom(data, extensionRegistry);
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessage
275 .parseWithIOException(PARSER, input);
278 java.io.InputStream input,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseWithIOException(PARSER, input, extensionRegistry);
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessage
288 .parseDelimitedWithIOException(PARSER, input);
292 java.io.InputStream input,
293 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294 throws java.io.IOException {
295 return com.google.protobuf.GeneratedMessage
296 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
299 com.google.protobuf.CodedInputStream input)
300 throws java.io.IOException {
301 return com.google.protobuf.GeneratedMessage
302 .parseWithIOException(PARSER, input);
305 com.google.protobuf.CodedInputStream input,
306 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
307 throws java.io.IOException {
308 return com.google.protobuf.GeneratedMessage
309 .parseWithIOException(PARSER, input, extensionRegistry);
315 return DEFAULT_INSTANCE.toBuilder();
318 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
322 return this == DEFAULT_INSTANCE
328 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
349 public static final class Builder
extends
350 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
353 public static final com.google.protobuf.Descriptors.Descriptor
355 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
359 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
361 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_fieldAccessorTable
362 .ensureFieldAccessorsInitialized(
363 com.google.ortools.sat.IntervalConstraintProto.class, com.google.ortools.sat.IntervalConstraintProto.Builder.class);
368 maybeForceBuilderInitialization();
372 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
374 maybeForceBuilderInitialization();
376 private void maybeForceBuilderInitialization() {
377 if (com.google.protobuf.GeneratedMessage
378 .alwaysUseFieldBuilders) {
379 getStartFieldBuilder();
380 getEndFieldBuilder();
381 getSizeFieldBuilder();
389 if (startBuilder_ !=
null) {
390 startBuilder_.dispose();
391 startBuilder_ =
null;
394 if (endBuilder_ !=
null) {
395 endBuilder_.dispose();
399 if (sizeBuilder_ !=
null) {
400 sizeBuilder_.dispose();
407 public com.google.protobuf.Descriptors.Descriptor
409 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
414 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
421 throw newUninitializedMessageException(result);
429 if (bitField0_ != 0) { buildPartial0(result); }
434 private void buildPartial0(com.google.ortools.sat.IntervalConstraintProto result) {
435 int from_bitField0_ = bitField0_;
436 int to_bitField0_ = 0;
437 if (((from_bitField0_ & 0x00000001) != 0)) {
438 result.start_ = startBuilder_ ==
null
440 : startBuilder_.build();
441 to_bitField0_ |= 0x00000001;
443 if (((from_bitField0_ & 0x00000002) != 0)) {
444 result.end_ = endBuilder_ ==
null
446 : endBuilder_.build();
447 to_bitField0_ |= 0x00000002;
449 if (((from_bitField0_ & 0x00000004) != 0)) {
450 result.size_ = sizeBuilder_ ==
null
452 : sizeBuilder_.build();
453 to_bitField0_ |= 0x00000004;
455 result.bitField0_ |= to_bitField0_;
459 public Builder
mergeFrom(com.google.protobuf.Message other) {
460 if (other instanceof com.google.ortools.sat.IntervalConstraintProto) {
461 return mergeFrom((com.google.ortools.sat.IntervalConstraintProto)other);
463 super.mergeFrom(other);
468 public Builder
mergeFrom(com.google.ortools.sat.IntervalConstraintProto other) {
469 if (other == com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance())
return this;
470 if (other.hasStart()) {
473 if (other.hasEnd()) {
476 if (other.hasSize()) {
479 this.mergeUnknownFields(other.getUnknownFields());
491 com.google.protobuf.CodedInputStream input,
492 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
493 throws java.io.IOException {
494 if (extensionRegistry ==
null) {
495 throw new java.lang.NullPointerException();
498 boolean done =
false;
500 int tag = input.readTag();
507 getStartFieldBuilder().getBuilder(),
509 bitField0_ |= 0x00000001;
514 getEndFieldBuilder().getBuilder(),
516 bitField0_ |= 0x00000002;
521 getSizeFieldBuilder().getBuilder(),
523 bitField0_ |= 0x00000004;
527 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
534 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
535 throw e.unwrapIOException();
541 private int bitField0_;
544 private com.google.protobuf.SingleFieldBuilder<
545 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> startBuilder_;
551 return ((bitField0_ & 0x00000001) != 0);
558 if (startBuilder_ ==
null) {
559 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
561 return startBuilder_.getMessage();
567 public Builder
setStart(com.google.ortools.sat.LinearExpressionProto value) {
568 if (startBuilder_ ==
null) {
570 throw new NullPointerException();
574 startBuilder_.setMessage(value);
576 bitField0_ |= 0x00000001;
584 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
585 if (startBuilder_ ==
null) {
586 start_ = builderForValue.build();
588 startBuilder_.setMessage(builderForValue.build());
590 bitField0_ |= 0x00000001;
597 public Builder
mergeStart(com.google.ortools.sat.LinearExpressionProto value) {
598 if (startBuilder_ ==
null) {
599 if (((bitField0_ & 0x00000001) != 0) &&
601 start_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
607 startBuilder_.mergeFrom(value);
609 if (start_ !=
null) {
610 bitField0_ |= 0x00000001;
619 bitField0_ = (bitField0_ & ~0x00000001);
621 if (startBuilder_ !=
null) {
622 startBuilder_.dispose();
623 startBuilder_ =
null;
632 bitField0_ |= 0x00000001;
634 return getStartFieldBuilder().getBuilder();
640 if (startBuilder_ !=
null) {
641 return startBuilder_.getMessageOrBuilder();
643 return start_ ==
null ?
644 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
650 private com.google.protobuf.SingleFieldBuilder<
651 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
652 getStartFieldBuilder() {
653 if (startBuilder_ ==
null) {
654 startBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
655 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
657 getParentForChildren(),
661 return startBuilder_;
665 private com.google.protobuf.SingleFieldBuilder<
666 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> endBuilder_;
672 return ((bitField0_ & 0x00000002) != 0);
679 if (endBuilder_ ==
null) {
680 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
682 return endBuilder_.getMessage();
688 public Builder
setEnd(com.google.ortools.sat.LinearExpressionProto value) {
689 if (endBuilder_ ==
null) {
691 throw new NullPointerException();
695 endBuilder_.setMessage(value);
697 bitField0_ |= 0x00000002;
705 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
706 if (endBuilder_ ==
null) {
707 end_ = builderForValue.build();
709 endBuilder_.setMessage(builderForValue.build());
711 bitField0_ |= 0x00000002;
718 public Builder
mergeEnd(com.google.ortools.sat.LinearExpressionProto value) {
719 if (endBuilder_ ==
null) {
720 if (((bitField0_ & 0x00000002) != 0) &&
722 end_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
728 endBuilder_.mergeFrom(value);
731 bitField0_ |= 0x00000002;
740 bitField0_ = (bitField0_ & ~0x00000002);
742 if (endBuilder_ !=
null) {
743 endBuilder_.dispose();
753 bitField0_ |= 0x00000002;
755 return getEndFieldBuilder().getBuilder();
761 if (endBuilder_ !=
null) {
762 return endBuilder_.getMessageOrBuilder();
764 return end_ ==
null ?
765 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
771 private com.google.protobuf.SingleFieldBuilder<
772 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
773 getEndFieldBuilder() {
774 if (endBuilder_ ==
null) {
775 endBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
776 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
778 getParentForChildren(),
786 private com.google.protobuf.SingleFieldBuilder<
787 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> sizeBuilder_;
793 return ((bitField0_ & 0x00000004) != 0);
800 if (sizeBuilder_ ==
null) {
801 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
803 return sizeBuilder_.getMessage();
809 public Builder
setSize(com.google.ortools.sat.LinearExpressionProto value) {
810 if (sizeBuilder_ ==
null) {
812 throw new NullPointerException();
816 sizeBuilder_.setMessage(value);
818 bitField0_ |= 0x00000004;
826 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
827 if (sizeBuilder_ ==
null) {
828 size_ = builderForValue.build();
830 sizeBuilder_.setMessage(builderForValue.build());
832 bitField0_ |= 0x00000004;
839 public Builder
mergeSize(com.google.ortools.sat.LinearExpressionProto value) {
840 if (sizeBuilder_ ==
null) {
841 if (((bitField0_ & 0x00000004) != 0) &&
843 size_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
849 sizeBuilder_.mergeFrom(value);
852 bitField0_ |= 0x00000004;
861 bitField0_ = (bitField0_ & ~0x00000004);
863 if (sizeBuilder_ !=
null) {
864 sizeBuilder_.dispose();
874 bitField0_ |= 0x00000004;
876 return getSizeFieldBuilder().getBuilder();
882 if (sizeBuilder_ !=
null) {
883 return sizeBuilder_.getMessageOrBuilder();
885 return size_ ==
null ?
886 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
892 private com.google.protobuf.SingleFieldBuilder<
893 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
894 getSizeFieldBuilder() {
895 if (sizeBuilder_ ==
null) {
896 sizeBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
897 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
899 getParentForChildren(),
912 DEFAULT_INSTANCE =
new com.google.ortools.sat.IntervalConstraintProto();
916 return DEFAULT_INSTANCE;
923 com.google.protobuf.CodedInputStream input,
924 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
925 throws com.google.protobuf.InvalidProtocolBufferException {
928 builder.mergeFrom(input, extensionRegistry);
929 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
930 throw e.setUnfinishedMessage(builder.buildPartial());
931 }
catch (com.google.protobuf.UninitializedMessageException e) {
932 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
933 }
catch (java.io.IOException e) {
934 throw new com.google.protobuf.InvalidProtocolBufferException(e)
935 .setUnfinishedMessage(builder.buildPartial());
937 return builder.buildPartial();
941 public static com.google.protobuf.Parser<IntervalConstraintProto>
parser() {
952 return DEFAULT_INSTANCE;