Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ReservoirConstraintProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/sat/cp_model.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.sat;
6
29public final class ReservoirConstraintProto extends
30 com.google.protobuf.GeneratedMessage implements
31 // @@protoc_insertion_point(message_implements:operations_research.sat.ReservoirConstraintProto)
33private static final long serialVersionUID = 0L;
34 static {
35 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
36 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
37 /* major= */ 4,
38 /* minor= */ 26,
39 /* patch= */ 1,
40 /* suffix= */ "",
41 ReservoirConstraintProto.class.getName());
42 }
43 // Use ReservoirConstraintProto.newBuilder() to construct.
44 private ReservoirConstraintProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
45 super(builder);
46 }
47 private ReservoirConstraintProto() {
48 timeExprs_ = java.util.Collections.emptyList();
49 levelChanges_ = java.util.Collections.emptyList();
50 activeLiterals_ = emptyIntList();
51 }
52
53 public static final com.google.protobuf.Descriptors.Descriptor
55 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ReservoirConstraintProto_descriptor;
56 }
57
58 @java.lang.Override
59 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
61 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ReservoirConstraintProto_fieldAccessorTable
62 .ensureFieldAccessorsInitialized(
63 com.google.ortools.sat.ReservoirConstraintProto.class, com.google.ortools.sat.ReservoirConstraintProto.Builder.class);
64 }
65
66 public static final int MIN_LEVEL_FIELD_NUMBER = 1;
67 private long minLevel_ = 0L;
72 @java.lang.Override
73 public long getMinLevel() {
74 return minLevel_;
75 }
76
77 public static final int MAX_LEVEL_FIELD_NUMBER = 2;
78 private long maxLevel_ = 0L;
83 @java.lang.Override
84 public long getMaxLevel() {
85 return maxLevel_;
86 }
87
88 public static final int TIME_EXPRS_FIELD_NUMBER = 3;
89 @SuppressWarnings("serial")
90 private java.util.List<com.google.ortools.sat.LinearExpressionProto> timeExprs_;
98 @java.lang.Override
99 public java.util.List<com.google.ortools.sat.LinearExpressionProto> getTimeExprsList() {
100 return timeExprs_;
101 }
109 @java.lang.Override
110 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
112 return timeExprs_;
113 }
121 @java.lang.Override
122 public int getTimeExprsCount() {
123 return timeExprs_.size();
124 }
132 @java.lang.Override
134 return timeExprs_.get(index);
135 }
143 @java.lang.Override
145 int index) {
146 return timeExprs_.get(index);
147 }
148
149 public static final int LEVEL_CHANGES_FIELD_NUMBER = 6;
150 @SuppressWarnings("serial")
151 private java.util.List<com.google.ortools.sat.LinearExpressionProto> levelChanges_;
159 @java.lang.Override
160 public java.util.List<com.google.ortools.sat.LinearExpressionProto> getLevelChangesList() {
161 return levelChanges_;
162 }
170 @java.lang.Override
171 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
173 return levelChanges_;
174 }
182 @java.lang.Override
183 public int getLevelChangesCount() {
184 return levelChanges_.size();
185 }
193 @java.lang.Override
195 return levelChanges_.get(index);
196 }
204 @java.lang.Override
206 int index) {
207 return levelChanges_.get(index);
208 }
209
210 public static final int ACTIVE_LITERALS_FIELD_NUMBER = 5;
211 @SuppressWarnings("serial")
212 private com.google.protobuf.Internal.IntList activeLiterals_ =
213 emptyIntList();
218 @java.lang.Override
219 public java.util.List<java.lang.Integer>
221 return activeLiterals_;
222 }
228 return activeLiterals_.size();
229 }
235 public int getActiveLiterals(int index) {
236 return activeLiterals_.getInt(index);
237 }
238 private int activeLiteralsMemoizedSerializedSize = -1;
239
240 private byte memoizedIsInitialized = -1;
241 @java.lang.Override
242 public final boolean isInitialized() {
243 byte isInitialized = memoizedIsInitialized;
244 if (isInitialized == 1) return true;
245 if (isInitialized == 0) return false;
246
247 memoizedIsInitialized = 1;
248 return true;
249 }
250
251 @java.lang.Override
252 public void writeTo(com.google.protobuf.CodedOutputStream output)
253 throws java.io.IOException {
255 if (minLevel_ != 0L) {
256 output.writeInt64(1, minLevel_);
257 }
258 if (maxLevel_ != 0L) {
259 output.writeInt64(2, maxLevel_);
260 }
261 for (int i = 0; i < timeExprs_.size(); i++) {
262 output.writeMessage(3, timeExprs_.get(i));
263 }
264 if (getActiveLiteralsList().size() > 0) {
265 output.writeUInt32NoTag(42);
266 output.writeUInt32NoTag(activeLiteralsMemoizedSerializedSize);
267 }
268 for (int i = 0; i < activeLiterals_.size(); i++) {
269 output.writeInt32NoTag(activeLiterals_.getInt(i));
270 }
271 for (int i = 0; i < levelChanges_.size(); i++) {
272 output.writeMessage(6, levelChanges_.get(i));
273 }
274 getUnknownFields().writeTo(output);
275 }
276
277 @java.lang.Override
278 public int getSerializedSize() {
279 int size = memoizedSize;
280 if (size != -1) return size;
281
282 size = 0;
283 if (minLevel_ != 0L) {
284 size += com.google.protobuf.CodedOutputStream
285 .computeInt64Size(1, minLevel_);
286 }
287 if (maxLevel_ != 0L) {
288 size += com.google.protobuf.CodedOutputStream
289 .computeInt64Size(2, maxLevel_);
290 }
291 for (int i = 0; i < timeExprs_.size(); i++) {
292 size += com.google.protobuf.CodedOutputStream
293 .computeMessageSize(3, timeExprs_.get(i));
294 }
295 {
296 int dataSize = 0;
297 for (int i = 0; i < activeLiterals_.size(); i++) {
298 dataSize += com.google.protobuf.CodedOutputStream
299 .computeInt32SizeNoTag(activeLiterals_.getInt(i));
300 }
301 size += dataSize;
302 if (!getActiveLiteralsList().isEmpty()) {
303 size += 1;
304 size += com.google.protobuf.CodedOutputStream
305 .computeInt32SizeNoTag(dataSize);
306 }
307 activeLiteralsMemoizedSerializedSize = dataSize;
308 }
309 for (int i = 0; i < levelChanges_.size(); i++) {
310 size += com.google.protobuf.CodedOutputStream
311 .computeMessageSize(6, levelChanges_.get(i));
312 }
313 size += getUnknownFields().getSerializedSize();
314 memoizedSize = size;
315 return size;
316 }
317
318 @java.lang.Override
319 public boolean equals(final java.lang.Object obj) {
320 if (obj == this) {
321 return true;
322 }
323 if (!(obj instanceof com.google.ortools.sat.ReservoirConstraintProto)) {
324 return super.equals(obj);
325 }
326 com.google.ortools.sat.ReservoirConstraintProto other = (com.google.ortools.sat.ReservoirConstraintProto) obj;
327
328 if (getMinLevel()
329 != other.getMinLevel()) return false;
330 if (getMaxLevel()
331 != other.getMaxLevel()) return false;
332 if (!getTimeExprsList()
333 .equals(other.getTimeExprsList())) return false;
335 .equals(other.getLevelChangesList())) return false;
337 .equals(other.getActiveLiteralsList())) return false;
338 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
339 return true;
340 }
341
342 @java.lang.Override
343 public int hashCode() {
344 if (memoizedHashCode != 0) {
345 return memoizedHashCode;
346 }
347 int hash = 41;
348 hash = (19 * hash) + getDescriptor().hashCode();
349 hash = (37 * hash) + MIN_LEVEL_FIELD_NUMBER;
350 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
351 getMinLevel());
352 hash = (37 * hash) + MAX_LEVEL_FIELD_NUMBER;
353 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
354 getMaxLevel());
355 if (getTimeExprsCount() > 0) {
356 hash = (37 * hash) + TIME_EXPRS_FIELD_NUMBER;
357 hash = (53 * hash) + getTimeExprsList().hashCode();
358 }
359 if (getLevelChangesCount() > 0) {
360 hash = (37 * hash) + LEVEL_CHANGES_FIELD_NUMBER;
361 hash = (53 * hash) + getLevelChangesList().hashCode();
362 }
363 if (getActiveLiteralsCount() > 0) {
364 hash = (37 * hash) + ACTIVE_LITERALS_FIELD_NUMBER;
365 hash = (53 * hash) + getActiveLiteralsList().hashCode();
366 }
367 hash = (29 * hash) + getUnknownFields().hashCode();
368 memoizedHashCode = hash;
369 return hash;
370 }
371
373 java.nio.ByteBuffer data)
374 throws com.google.protobuf.InvalidProtocolBufferException {
375 return PARSER.parseFrom(data);
376 }
378 java.nio.ByteBuffer data,
379 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380 throws com.google.protobuf.InvalidProtocolBufferException {
381 return PARSER.parseFrom(data, extensionRegistry);
382 }
384 com.google.protobuf.ByteString data)
385 throws com.google.protobuf.InvalidProtocolBufferException {
386 return PARSER.parseFrom(data);
387 }
389 com.google.protobuf.ByteString data,
390 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
391 throws com.google.protobuf.InvalidProtocolBufferException {
392 return PARSER.parseFrom(data, extensionRegistry);
393 }
395 throws com.google.protobuf.InvalidProtocolBufferException {
396 return PARSER.parseFrom(data);
397 }
399 byte[] data,
400 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
401 throws com.google.protobuf.InvalidProtocolBufferException {
402 return PARSER.parseFrom(data, extensionRegistry);
403 }
404 public static com.google.ortools.sat.ReservoirConstraintProto parseFrom(java.io.InputStream input)
405 throws java.io.IOException {
406 return com.google.protobuf.GeneratedMessage
407 .parseWithIOException(PARSER, input);
408 }
410 java.io.InputStream input,
411 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
412 throws java.io.IOException {
413 return com.google.protobuf.GeneratedMessage
414 .parseWithIOException(PARSER, input, extensionRegistry);
415 }
416
418 throws java.io.IOException {
419 return com.google.protobuf.GeneratedMessage
420 .parseDelimitedWithIOException(PARSER, input);
421 }
422
424 java.io.InputStream input,
425 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
426 throws java.io.IOException {
427 return com.google.protobuf.GeneratedMessage
428 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
429 }
431 com.google.protobuf.CodedInputStream input)
432 throws java.io.IOException {
433 return com.google.protobuf.GeneratedMessage
434 .parseWithIOException(PARSER, input);
435 }
437 com.google.protobuf.CodedInputStream input,
438 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
439 throws java.io.IOException {
440 return com.google.protobuf.GeneratedMessage
441 .parseWithIOException(PARSER, input, extensionRegistry);
442 }
443
444 @java.lang.Override
445 public Builder newBuilderForType() { return newBuilder(); }
446 public static Builder newBuilder() {
447 return DEFAULT_INSTANCE.toBuilder();
448 }
449 public static Builder newBuilder(com.google.ortools.sat.ReservoirConstraintProto prototype) {
450 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
451 }
452 @java.lang.Override
454 return this == DEFAULT_INSTANCE
455 ? new Builder() : new Builder().mergeFrom(this);
456 }
457
458 @java.lang.Override
460 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
461 Builder builder = new Builder(parent);
462 return builder;
463 }
486 public static final class Builder extends
487 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
488 // @@protoc_insertion_point(builder_implements:operations_research.sat.ReservoirConstraintProto)
489 com.google.ortools.sat.ReservoirConstraintProtoOrBuilder {
490 public static final com.google.protobuf.Descriptors.Descriptor
492 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ReservoirConstraintProto_descriptor;
493 }
494
495 @java.lang.Override
496 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
498 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ReservoirConstraintProto_fieldAccessorTable
499 .ensureFieldAccessorsInitialized(
500 com.google.ortools.sat.ReservoirConstraintProto.class, com.google.ortools.sat.ReservoirConstraintProto.Builder.class);
501 }
502
503 // Construct using com.google.ortools.sat.ReservoirConstraintProto.newBuilder()
504 private Builder() {
505
506 }
507
508 private Builder(
509 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
510 super(parent);
511
512 }
513 @java.lang.Override
514 public Builder clear() {
515 super.clear();
516 bitField0_ = 0;
517 minLevel_ = 0L;
518 maxLevel_ = 0L;
519 if (timeExprsBuilder_ == null) {
520 timeExprs_ = java.util.Collections.emptyList();
521 } else {
522 timeExprs_ = null;
523 timeExprsBuilder_.clear();
524 }
525 bitField0_ = (bitField0_ & ~0x00000004);
526 if (levelChangesBuilder_ == null) {
527 levelChanges_ = java.util.Collections.emptyList();
528 } else {
529 levelChanges_ = null;
530 levelChangesBuilder_.clear();
531 }
532 bitField0_ = (bitField0_ & ~0x00000008);
533 activeLiterals_ = emptyIntList();
534 return this;
535 }
536
537 @java.lang.Override
538 public com.google.protobuf.Descriptors.Descriptor
540 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ReservoirConstraintProto_descriptor;
541 }
542
543 @java.lang.Override
545 return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
546 }
547
548 @java.lang.Override
551 if (!result.isInitialized()) {
552 throw newUninitializedMessageException(result);
553 }
554 return result;
555 }
556
557 @java.lang.Override
559 com.google.ortools.sat.ReservoirConstraintProto result = new com.google.ortools.sat.ReservoirConstraintProto(this);
560 buildPartialRepeatedFields(result);
561 if (bitField0_ != 0) { buildPartial0(result); }
562 onBuilt();
563 return result;
564 }
565
566 private void buildPartialRepeatedFields(com.google.ortools.sat.ReservoirConstraintProto result) {
567 if (timeExprsBuilder_ == null) {
568 if (((bitField0_ & 0x00000004) != 0)) {
569 timeExprs_ = java.util.Collections.unmodifiableList(timeExprs_);
570 bitField0_ = (bitField0_ & ~0x00000004);
571 }
572 result.timeExprs_ = timeExprs_;
573 } else {
574 result.timeExprs_ = timeExprsBuilder_.build();
575 }
576 if (levelChangesBuilder_ == null) {
577 if (((bitField0_ & 0x00000008) != 0)) {
578 levelChanges_ = java.util.Collections.unmodifiableList(levelChanges_);
579 bitField0_ = (bitField0_ & ~0x00000008);
580 }
581 result.levelChanges_ = levelChanges_;
582 } else {
583 result.levelChanges_ = levelChangesBuilder_.build();
584 }
585 }
586
587 private void buildPartial0(com.google.ortools.sat.ReservoirConstraintProto result) {
588 int from_bitField0_ = bitField0_;
589 if (((from_bitField0_ & 0x00000001) != 0)) {
590 result.minLevel_ = minLevel_;
591 }
592 if (((from_bitField0_ & 0x00000002) != 0)) {
593 result.maxLevel_ = maxLevel_;
594 }
595 if (((from_bitField0_ & 0x00000010) != 0)) {
596 activeLiterals_.makeImmutable();
597 result.activeLiterals_ = activeLiterals_;
598 }
599 }
600
601 @java.lang.Override
602 public Builder mergeFrom(com.google.protobuf.Message other) {
603 if (other instanceof com.google.ortools.sat.ReservoirConstraintProto) {
604 return mergeFrom((com.google.ortools.sat.ReservoirConstraintProto)other);
605 } else {
606 super.mergeFrom(other);
607 return this;
608 }
609 }
610
611 public Builder mergeFrom(com.google.ortools.sat.ReservoirConstraintProto other) {
612 if (other == com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance()) return this;
613 if (other.getMinLevel() != 0L) {
614 setMinLevel(other.getMinLevel());
615 }
616 if (other.getMaxLevel() != 0L) {
617 setMaxLevel(other.getMaxLevel());
618 }
619 if (timeExprsBuilder_ == null) {
620 if (!other.timeExprs_.isEmpty()) {
621 if (timeExprs_.isEmpty()) {
622 timeExprs_ = other.timeExprs_;
623 bitField0_ = (bitField0_ & ~0x00000004);
624 } else {
625 ensureTimeExprsIsMutable();
626 timeExprs_.addAll(other.timeExprs_);
627 }
628 onChanged();
629 }
630 } else {
631 if (!other.timeExprs_.isEmpty()) {
632 if (timeExprsBuilder_.isEmpty()) {
633 timeExprsBuilder_.dispose();
634 timeExprsBuilder_ = null;
635 timeExprs_ = other.timeExprs_;
636 bitField0_ = (bitField0_ & ~0x00000004);
637 timeExprsBuilder_ =
638 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
639 getTimeExprsFieldBuilder() : null;
640 } else {
641 timeExprsBuilder_.addAllMessages(other.timeExprs_);
642 }
643 }
644 }
645 if (levelChangesBuilder_ == null) {
646 if (!other.levelChanges_.isEmpty()) {
647 if (levelChanges_.isEmpty()) {
648 levelChanges_ = other.levelChanges_;
649 bitField0_ = (bitField0_ & ~0x00000008);
650 } else {
651 ensureLevelChangesIsMutable();
652 levelChanges_.addAll(other.levelChanges_);
653 }
654 onChanged();
655 }
656 } else {
657 if (!other.levelChanges_.isEmpty()) {
658 if (levelChangesBuilder_.isEmpty()) {
659 levelChangesBuilder_.dispose();
660 levelChangesBuilder_ = null;
661 levelChanges_ = other.levelChanges_;
662 bitField0_ = (bitField0_ & ~0x00000008);
663 levelChangesBuilder_ =
664 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
665 getLevelChangesFieldBuilder() : null;
666 } else {
667 levelChangesBuilder_.addAllMessages(other.levelChanges_);
668 }
669 }
670 }
671 if (!other.activeLiterals_.isEmpty()) {
672 if (activeLiterals_.isEmpty()) {
673 activeLiterals_ = other.activeLiterals_;
674 activeLiterals_.makeImmutable();
675 bitField0_ |= 0x00000010;
676 } else {
677 ensureActiveLiteralsIsMutable();
678 activeLiterals_.addAll(other.activeLiterals_);
679 }
680 onChanged();
681 }
682 this.mergeUnknownFields(other.getUnknownFields());
683 onChanged();
684 return this;
685 }
686
687 @java.lang.Override
688 public final boolean isInitialized() {
689 return true;
690 }
691
692 @java.lang.Override
694 com.google.protobuf.CodedInputStream input,
695 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
696 throws java.io.IOException {
697 if (extensionRegistry == null) {
698 throw new java.lang.NullPointerException();
699 }
700 try {
701 boolean done = false;
702 while (!done) {
703 int tag = input.readTag();
704 switch (tag) {
705 case 0:
706 done = true;
707 break;
708 case 8: {
709 minLevel_ = input.readInt64();
710 bitField0_ |= 0x00000001;
711 break;
712 } // case 8
713 case 16: {
714 maxLevel_ = input.readInt64();
715 bitField0_ |= 0x00000002;
716 break;
717 } // case 16
718 case 26: {
720 input.readMessage(
721 com.google.ortools.sat.LinearExpressionProto.parser(),
722 extensionRegistry);
723 if (timeExprsBuilder_ == null) {
724 ensureTimeExprsIsMutable();
725 timeExprs_.add(m);
726 } else {
727 timeExprsBuilder_.addMessage(m);
728 }
729 break;
730 } // case 26
731 case 40: {
732 int v = input.readInt32();
733 ensureActiveLiteralsIsMutable();
734 activeLiterals_.addInt(v);
735 break;
736 } // case 40
737 case 42: {
738 int length = input.readRawVarint32();
739 int limit = input.pushLimit(length);
740 ensureActiveLiteralsIsMutable();
741 while (input.getBytesUntilLimit() > 0) {
742 activeLiterals_.addInt(input.readInt32());
743 }
744 input.popLimit(limit);
745 break;
746 } // case 42
747 case 50: {
749 input.readMessage(
750 com.google.ortools.sat.LinearExpressionProto.parser(),
751 extensionRegistry);
752 if (levelChangesBuilder_ == null) {
753 ensureLevelChangesIsMutable();
754 levelChanges_.add(m);
755 } else {
756 levelChangesBuilder_.addMessage(m);
757 }
758 break;
759 } // case 50
760 default: {
761 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
762 done = true; // was an endgroup tag
763 }
764 break;
765 } // default:
766 } // switch (tag)
767 } // while (!done)
768 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
769 throw e.unwrapIOException();
770 } finally {
771 onChanged();
772 } // finally
773 return this;
774 }
775 private int bitField0_;
776
777 private long minLevel_ ;
782 @java.lang.Override
783 public long getMinLevel() {
784 return minLevel_;
785 }
791 public Builder setMinLevel(long value) {
792
793 minLevel_ = value;
794 bitField0_ |= 0x00000001;
795 onChanged();
796 return this;
797 }
803 bitField0_ = (bitField0_ & ~0x00000001);
804 minLevel_ = 0L;
805 onChanged();
806 return this;
807 }
808
809 private long maxLevel_ ;
814 @java.lang.Override
815 public long getMaxLevel() {
816 return maxLevel_;
817 }
823 public Builder setMaxLevel(long value) {
824
825 maxLevel_ = value;
826 bitField0_ |= 0x00000002;
827 onChanged();
828 return this;
829 }
835 bitField0_ = (bitField0_ & ~0x00000002);
836 maxLevel_ = 0L;
837 onChanged();
838 return this;
839 }
840
841 private java.util.List<com.google.ortools.sat.LinearExpressionProto> timeExprs_ =
842 java.util.Collections.emptyList();
843 private void ensureTimeExprsIsMutable() {
844 if (!((bitField0_ & 0x00000004) != 0)) {
845 timeExprs_ = new java.util.ArrayList<com.google.ortools.sat.LinearExpressionProto>(timeExprs_);
846 bitField0_ |= 0x00000004;
847 }
848 }
849
850 private com.google.protobuf.RepeatedFieldBuilder<
851 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> timeExprsBuilder_;
852
860 public java.util.List<com.google.ortools.sat.LinearExpressionProto> getTimeExprsList() {
861 if (timeExprsBuilder_ == null) {
862 return java.util.Collections.unmodifiableList(timeExprs_);
863 } else {
864 return timeExprsBuilder_.getMessageList();
865 }
866 }
874 public int getTimeExprsCount() {
875 if (timeExprsBuilder_ == null) {
876 return timeExprs_.size();
877 } else {
878 return timeExprsBuilder_.getCount();
879 }
880 }
889 if (timeExprsBuilder_ == null) {
890 return timeExprs_.get(index);
891 } else {
892 return timeExprsBuilder_.getMessage(index);
893 }
894 }
903 int index, com.google.ortools.sat.LinearExpressionProto value) {
904 if (timeExprsBuilder_ == null) {
905 if (value == null) {
906 throw new NullPointerException();
907 }
908 ensureTimeExprsIsMutable();
909 timeExprs_.set(index, value);
910 onChanged();
911 } else {
912 timeExprsBuilder_.setMessage(index, value);
913 }
914 return this;
915 }
924 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
925 if (timeExprsBuilder_ == null) {
926 ensureTimeExprsIsMutable();
927 timeExprs_.set(index, builderForValue.build());
928 onChanged();
929 } else {
930 timeExprsBuilder_.setMessage(index, builderForValue.build());
931 }
932 return this;
933 }
941 public Builder addTimeExprs(com.google.ortools.sat.LinearExpressionProto value) {
942 if (timeExprsBuilder_ == null) {
943 if (value == null) {
944 throw new NullPointerException();
945 }
946 ensureTimeExprsIsMutable();
947 timeExprs_.add(value);
948 onChanged();
949 } else {
950 timeExprsBuilder_.addMessage(value);
951 }
952 return this;
953 }
962 int index, com.google.ortools.sat.LinearExpressionProto value) {
963 if (timeExprsBuilder_ == null) {
964 if (value == null) {
965 throw new NullPointerException();
966 }
967 ensureTimeExprsIsMutable();
968 timeExprs_.add(index, value);
969 onChanged();
970 } else {
971 timeExprsBuilder_.addMessage(index, value);
972 }
973 return this;
974 }
983 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
984 if (timeExprsBuilder_ == null) {
985 ensureTimeExprsIsMutable();
986 timeExprs_.add(builderForValue.build());
987 onChanged();
988 } else {
989 timeExprsBuilder_.addMessage(builderForValue.build());
990 }
991 return this;
992 }
1001 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
1002 if (timeExprsBuilder_ == null) {
1003 ensureTimeExprsIsMutable();
1004 timeExprs_.add(index, builderForValue.build());
1005 onChanged();
1006 } else {
1007 timeExprsBuilder_.addMessage(index, builderForValue.build());
1008 }
1009 return this;
1010 }
1019 java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto> values) {
1020 if (timeExprsBuilder_ == null) {
1021 ensureTimeExprsIsMutable();
1022 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1023 values, timeExprs_);
1024 onChanged();
1025 } else {
1026 timeExprsBuilder_.addAllMessages(values);
1027 }
1028 return this;
1029 }
1038 if (timeExprsBuilder_ == null) {
1039 timeExprs_ = java.util.Collections.emptyList();
1040 bitField0_ = (bitField0_ & ~0x00000004);
1041 onChanged();
1042 } else {
1043 timeExprsBuilder_.clear();
1044 }
1045 return this;
1046 }
1054 public Builder removeTimeExprs(int index) {
1055 if (timeExprsBuilder_ == null) {
1056 ensureTimeExprsIsMutable();
1057 timeExprs_.remove(index);
1058 onChanged();
1059 } else {
1060 timeExprsBuilder_.remove(index);
1061 }
1062 return this;
1063 }
1072 int index) {
1073 return getTimeExprsFieldBuilder().getBuilder(index);
1074 }
1083 int index) {
1084 if (timeExprsBuilder_ == null) {
1085 return timeExprs_.get(index); } else {
1086 return timeExprsBuilder_.getMessageOrBuilder(index);
1087 }
1088 }
1096 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
1098 if (timeExprsBuilder_ != null) {
1099 return timeExprsBuilder_.getMessageOrBuilderList();
1100 } else {
1101 return java.util.Collections.unmodifiableList(timeExprs_);
1102 }
1103 }
1112 return getTimeExprsFieldBuilder().addBuilder(
1113 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
1114 }
1123 int index) {
1124 return getTimeExprsFieldBuilder().addBuilder(
1125 index, com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
1126 }
1134 public java.util.List<com.google.ortools.sat.LinearExpressionProto.Builder>
1136 return getTimeExprsFieldBuilder().getBuilderList();
1137 }
1138 private com.google.protobuf.RepeatedFieldBuilder<
1139 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
1140 getTimeExprsFieldBuilder() {
1141 if (timeExprsBuilder_ == null) {
1142 timeExprsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1143 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
1144 timeExprs_,
1145 ((bitField0_ & 0x00000004) != 0),
1146 getParentForChildren(),
1147 isClean());
1148 timeExprs_ = null;
1149 }
1150 return timeExprsBuilder_;
1151 }
1152
1153 private java.util.List<com.google.ortools.sat.LinearExpressionProto> levelChanges_ =
1154 java.util.Collections.emptyList();
1155 private void ensureLevelChangesIsMutable() {
1156 if (!((bitField0_ & 0x00000008) != 0)) {
1157 levelChanges_ = new java.util.ArrayList<com.google.ortools.sat.LinearExpressionProto>(levelChanges_);
1158 bitField0_ |= 0x00000008;
1159 }
1160 }
1161
1162 private com.google.protobuf.RepeatedFieldBuilder<
1163 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> levelChangesBuilder_;
1164
1172 public java.util.List<com.google.ortools.sat.LinearExpressionProto> getLevelChangesList() {
1173 if (levelChangesBuilder_ == null) {
1174 return java.util.Collections.unmodifiableList(levelChanges_);
1175 } else {
1176 return levelChangesBuilder_.getMessageList();
1177 }
1178 }
1187 if (levelChangesBuilder_ == null) {
1188 return levelChanges_.size();
1189 } else {
1190 return levelChangesBuilder_.getCount();
1191 }
1192 }
1201 if (levelChangesBuilder_ == null) {
1202 return levelChanges_.get(index);
1203 } else {
1204 return levelChangesBuilder_.getMessage(index);
1205 }
1206 }
1215 int index, com.google.ortools.sat.LinearExpressionProto value) {
1216 if (levelChangesBuilder_ == null) {
1217 if (value == null) {
1218 throw new NullPointerException();
1219 }
1220 ensureLevelChangesIsMutable();
1221 levelChanges_.set(index, value);
1222 onChanged();
1223 } else {
1224 levelChangesBuilder_.setMessage(index, value);
1225 }
1226 return this;
1227 }
1236 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
1237 if (levelChangesBuilder_ == null) {
1238 ensureLevelChangesIsMutable();
1239 levelChanges_.set(index, builderForValue.build());
1240 onChanged();
1241 } else {
1242 levelChangesBuilder_.setMessage(index, builderForValue.build());
1243 }
1244 return this;
1245 }
1253 public Builder addLevelChanges(com.google.ortools.sat.LinearExpressionProto value) {
1254 if (levelChangesBuilder_ == null) {
1255 if (value == null) {
1256 throw new NullPointerException();
1257 }
1258 ensureLevelChangesIsMutable();
1259 levelChanges_.add(value);
1260 onChanged();
1261 } else {
1262 levelChangesBuilder_.addMessage(value);
1263 }
1264 return this;
1265 }
1274 int index, com.google.ortools.sat.LinearExpressionProto value) {
1275 if (levelChangesBuilder_ == null) {
1276 if (value == null) {
1277 throw new NullPointerException();
1278 }
1279 ensureLevelChangesIsMutable();
1280 levelChanges_.add(index, value);
1281 onChanged();
1282 } else {
1283 levelChangesBuilder_.addMessage(index, value);
1284 }
1285 return this;
1286 }
1295 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
1296 if (levelChangesBuilder_ == null) {
1297 ensureLevelChangesIsMutable();
1298 levelChanges_.add(builderForValue.build());
1299 onChanged();
1300 } else {
1301 levelChangesBuilder_.addMessage(builderForValue.build());
1302 }
1303 return this;
1304 }
1313 int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
1314 if (levelChangesBuilder_ == null) {
1315 ensureLevelChangesIsMutable();
1316 levelChanges_.add(index, builderForValue.build());
1317 onChanged();
1318 } else {
1319 levelChangesBuilder_.addMessage(index, builderForValue.build());
1320 }
1321 return this;
1322 }
1331 java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto> values) {
1332 if (levelChangesBuilder_ == null) {
1333 ensureLevelChangesIsMutable();
1334 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1335 values, levelChanges_);
1336 onChanged();
1337 } else {
1338 levelChangesBuilder_.addAllMessages(values);
1339 }
1340 return this;
1341 }
1350 if (levelChangesBuilder_ == null) {
1351 levelChanges_ = java.util.Collections.emptyList();
1352 bitField0_ = (bitField0_ & ~0x00000008);
1353 onChanged();
1354 } else {
1355 levelChangesBuilder_.clear();
1356 }
1357 return this;
1358 }
1366 public Builder removeLevelChanges(int index) {
1367 if (levelChangesBuilder_ == null) {
1368 ensureLevelChangesIsMutable();
1369 levelChanges_.remove(index);
1370 onChanged();
1371 } else {
1372 levelChangesBuilder_.remove(index);
1373 }
1374 return this;
1375 }
1384 int index) {
1385 return getLevelChangesFieldBuilder().getBuilder(index);
1386 }
1395 int index) {
1396 if (levelChangesBuilder_ == null) {
1397 return levelChanges_.get(index); } else {
1398 return levelChangesBuilder_.getMessageOrBuilder(index);
1399 }
1400 }
1408 public java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder>
1410 if (levelChangesBuilder_ != null) {
1411 return levelChangesBuilder_.getMessageOrBuilderList();
1412 } else {
1413 return java.util.Collections.unmodifiableList(levelChanges_);
1414 }
1415 }
1424 return getLevelChangesFieldBuilder().addBuilder(
1425 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
1426 }
1435 int index) {
1436 return getLevelChangesFieldBuilder().addBuilder(
1437 index, com.google.ortools.sat.LinearExpressionProto.getDefaultInstance());
1438 }
1446 public java.util.List<com.google.ortools.sat.LinearExpressionProto.Builder>
1448 return getLevelChangesFieldBuilder().getBuilderList();
1449 }
1450 private com.google.protobuf.RepeatedFieldBuilder<
1451 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
1452 getLevelChangesFieldBuilder() {
1453 if (levelChangesBuilder_ == null) {
1454 levelChangesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1455 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
1456 levelChanges_,
1457 ((bitField0_ & 0x00000008) != 0),
1458 getParentForChildren(),
1459 isClean());
1460 levelChanges_ = null;
1461 }
1462 return levelChangesBuilder_;
1463 }
1464
1465 private com.google.protobuf.Internal.IntList activeLiterals_ = emptyIntList();
1466 private void ensureActiveLiteralsIsMutable() {
1467 if (!activeLiterals_.isModifiable()) {
1468 activeLiterals_ = makeMutableCopy(activeLiterals_);
1469 }
1470 bitField0_ |= 0x00000010;
1471 }
1476 public java.util.List<java.lang.Integer>
1478 activeLiterals_.makeImmutable();
1479 return activeLiterals_;
1480 }
1486 return activeLiterals_.size();
1487 }
1493 public int getActiveLiterals(int index) {
1494 return activeLiterals_.getInt(index);
1495 }
1503 int index, int value) {
1504
1505 ensureActiveLiteralsIsMutable();
1506 activeLiterals_.setInt(index, value);
1507 bitField0_ |= 0x00000010;
1508 onChanged();
1509 return this;
1510 }
1516 public Builder addActiveLiterals(int value) {
1517
1518 ensureActiveLiteralsIsMutable();
1519 activeLiterals_.addInt(value);
1520 bitField0_ |= 0x00000010;
1521 onChanged();
1522 return this;
1523 }
1530 java.lang.Iterable<? extends java.lang.Integer> values) {
1531 ensureActiveLiteralsIsMutable();
1532 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1533 values, activeLiterals_);
1534 bitField0_ |= 0x00000010;
1535 onChanged();
1536 return this;
1537 }
1543 activeLiterals_ = emptyIntList();
1544 bitField0_ = (bitField0_ & ~0x00000010);
1545 onChanged();
1546 return this;
1547 }
1548
1549 // @@protoc_insertion_point(builder_scope:operations_research.sat.ReservoirConstraintProto)
1550 }
1551
1552 // @@protoc_insertion_point(class_scope:operations_research.sat.ReservoirConstraintProto)
1553 private static final com.google.ortools.sat.ReservoirConstraintProto DEFAULT_INSTANCE;
1554 static {
1555 DEFAULT_INSTANCE = new com.google.ortools.sat.ReservoirConstraintProto();
1556 }
1557
1559 return DEFAULT_INSTANCE;
1560 }
1561
1562 private static final com.google.protobuf.Parser<ReservoirConstraintProto>
1563 PARSER = new com.google.protobuf.AbstractParser<ReservoirConstraintProto>() {
1564 @java.lang.Override
1565 public ReservoirConstraintProto parsePartialFrom(
1566 com.google.protobuf.CodedInputStream input,
1567 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1568 throws com.google.protobuf.InvalidProtocolBufferException {
1569 Builder builder = newBuilder();
1570 try {
1571 builder.mergeFrom(input, extensionRegistry);
1572 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1573 throw e.setUnfinishedMessage(builder.buildPartial());
1574 } catch (com.google.protobuf.UninitializedMessageException e) {
1575 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1576 } catch (java.io.IOException e) {
1577 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1578 .setUnfinishedMessage(builder.buildPartial());
1579 }
1580 return builder.buildPartial();
1581 }
1582 };
1583
1584 public static com.google.protobuf.Parser<ReservoirConstraintProto> parser() {
1585 return PARSER;
1586 }
1587
1588 @java.lang.Override
1589 public com.google.protobuf.Parser<ReservoirConstraintProto> getParserForType() {
1590 return PARSER;
1591 }
1592
1593 @java.lang.Override
1597
1598}
1599
Builder addLevelChanges(int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
Builder mergeFrom(com.google.ortools.sat.ReservoirConstraintProto other)
Builder addAllTimeExprs(java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto > values)
java.util.List< com.google.ortools.sat.LinearExpressionProto > getTimeExprsList()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > getLevelChangesOrBuilderList()
java.util.List< com.google.ortools.sat.LinearExpressionProto > getLevelChangesList()
Builder setTimeExprs(int index, com.google.ortools.sat.LinearExpressionProto value)
Builder addAllLevelChanges(java.lang.Iterable<? extends com.google.ortools.sat.LinearExpressionProto > values)
Builder setLevelChanges(int index, com.google.ortools.sat.LinearExpressionProto value)
com.google.ortools.sat.LinearExpressionProto.Builder addTimeExprsBuilder(int index)
com.google.ortools.sat.LinearExpressionProto.Builder addTimeExprsBuilder()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder addAllActiveLiterals(java.lang.Iterable<? extends java.lang.Integer > values)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder addTimeExprs(int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
com.google.ortools.sat.LinearExpressionProto.Builder addLevelChangesBuilder(int index)
com.google.ortools.sat.ReservoirConstraintProto buildPartial()
com.google.ortools.sat.LinearExpressionProto.Builder addLevelChangesBuilder()
com.google.ortools.sat.LinearExpressionProto.Builder getLevelChangesBuilder(int index)
com.google.ortools.sat.LinearExpressionProto.Builder getTimeExprsBuilder(int index)
Builder addLevelChanges(com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
com.google.ortools.sat.LinearExpressionProtoOrBuilder getTimeExprsOrBuilder(int index)
Builder addLevelChanges(com.google.ortools.sat.LinearExpressionProto value)
java.util.List< com.google.ortools.sat.LinearExpressionProto.Builder > getLevelChangesBuilderList()
Builder setTimeExprs(int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
Builder addLevelChanges(int index, com.google.ortools.sat.LinearExpressionProto value)
com.google.ortools.sat.ReservoirConstraintProto getDefaultInstanceForType()
Builder addTimeExprs(int index, com.google.ortools.sat.LinearExpressionProto value)
Builder setLevelChanges(int index, com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
com.google.ortools.sat.ReservoirConstraintProto build()
Builder addTimeExprs(com.google.ortools.sat.LinearExpressionProto.Builder builderForValue)
Builder addTimeExprs(com.google.ortools.sat.LinearExpressionProto value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > getTimeExprsOrBuilderList()
java.util.List< com.google.ortools.sat.LinearExpressionProto.Builder > getTimeExprsBuilderList()
com.google.ortools.sat.LinearExpressionProtoOrBuilder getLevelChangesOrBuilder(int index)
com.google.ortools.sat.LinearExpressionProto getTimeExprs(int index)
com.google.ortools.sat.LinearExpressionProto getLevelChanges(int index)
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > getLevelChangesOrBuilderList()
com.google.protobuf.Parser< ReservoirConstraintProto > getParserForType()
com.google.ortools.sat.LinearExpressionProto getTimeExprs(int index)
static com.google.ortools.sat.ReservoirConstraintProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.sat.ReservoirConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< com.google.ortools.sat.LinearExpressionProto > getLevelChangesList()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.sat.LinearExpressionProtoOrBuilder getLevelChangesOrBuilder(int index)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > getTimeExprsOrBuilderList()
com.google.ortools.sat.LinearExpressionProtoOrBuilder getTimeExprsOrBuilder(int index)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
java.util.List< com.google.ortools.sat.LinearExpressionProto > getTimeExprsList()
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.sat.ReservoirConstraintProto prototype)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(byte[] data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(java.io.InputStream input)
static com.google.ortools.sat.ReservoirConstraintProto getDefaultInstance()
com.google.ortools.sat.ReservoirConstraintProto getDefaultInstanceForType()
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Integer > getActiveLiteralsList()
static com.google.protobuf.Parser< ReservoirConstraintProto > parser()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.sat.LinearExpressionProto getLevelChanges(int index)
static com.google.ortools.sat.ReservoirConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)