Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SetCoverSolutionResponse.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/algorithms/set_cover.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.algorithms;
6
10public final class SetCoverSolutionResponse extends
11 com.google.protobuf.GeneratedMessage implements
12 // @@protoc_insertion_point(message_implements:operations_research.SetCoverSolutionResponse)
14private static final long serialVersionUID = 0L;
15 static {
16 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
17 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
18 /* major= */ 4,
19 /* minor= */ 26,
20 /* patch= */ 1,
21 /* suffix= */ "",
22 SetCoverSolutionResponse.class.getName());
23 }
24 // Use SetCoverSolutionResponse.newBuilder() to construct.
25 private SetCoverSolutionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
26 super(builder);
27 }
28 private SetCoverSolutionResponse() {
29 status_ = 0;
30 subset_ = emptyIntList();
31 }
32
33 public static final com.google.protobuf.Descriptors.Descriptor
35 return com.google.ortools.algorithms.SetCover.internal_static_operations_research_SetCoverSolutionResponse_descriptor;
36 }
37
38 @java.lang.Override
39 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
41 return com.google.ortools.algorithms.SetCover.internal_static_operations_research_SetCoverSolutionResponse_fieldAccessorTable
42 .ensureFieldAccessorsInitialized(
43 com.google.ortools.algorithms.SetCoverSolutionResponse.class, com.google.ortools.algorithms.SetCoverSolutionResponse.Builder.class);
44 }
45
53 public enum Status
54 implements com.google.protobuf.ProtocolMessageEnum {
97 ;
98
99 static {
100 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
101 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
102 /* major= */ 4,
103 /* minor= */ 26,
104 /* patch= */ 1,
105 /* suffix= */ "",
106 Status.class.getName());
107 }
115 public static final int UNDEFINED_VALUE = 0;
123 public static final int OPTIMAL_VALUE = 1;
132 public static final int FEASIBLE_VALUE = 2;
140 public static final int INFEASIBLE_VALUE = 3;
148 public static final int INVALID_VALUE = 4;
149
150
151 public final int getNumber() {
152 if (this == UNRECOGNIZED) {
153 throw new java.lang.IllegalArgumentException(
154 "Can't get the number of an unknown enum value.");
155 }
156 return value;
157 }
158
164 @java.lang.Deprecated
165 public static Status valueOf(int value) {
166 return forNumber(value);
167 }
168
173 public static Status forNumber(int value) {
174 switch (value) {
175 case 0: return UNDEFINED;
176 case 1: return OPTIMAL;
177 case 2: return FEASIBLE;
178 case 3: return INFEASIBLE;
179 case 4: return INVALID;
180 default: return null;
181 }
182 }
183
184 public static com.google.protobuf.Internal.EnumLiteMap<Status>
186 return internalValueMap;
187 }
188 private static final com.google.protobuf.Internal.EnumLiteMap<
189 Status> internalValueMap =
190 new com.google.protobuf.Internal.EnumLiteMap<Status>() {
191 public Status findValueByNumber(int number) {
192 return Status.forNumber(number);
193 }
194 };
195
196 public final com.google.protobuf.Descriptors.EnumValueDescriptor
198 if (this == UNRECOGNIZED) {
199 throw new java.lang.IllegalStateException(
200 "Can't get the descriptor of an unrecognized enum value.");
201 }
202 return getDescriptor().getValues().get(ordinal());
203 }
204 public final com.google.protobuf.Descriptors.EnumDescriptor
206 return getDescriptor();
207 }
208 public static final com.google.protobuf.Descriptors.EnumDescriptor
210 return com.google.ortools.algorithms.SetCoverSolutionResponse.getDescriptor().getEnumTypes().get(0);
211 }
212
213 private static final Status[] VALUES = values();
214
215 public static Status valueOf(
216 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
217 if (desc.getType() != getDescriptor()) {
218 throw new java.lang.IllegalArgumentException(
219 "EnumValueDescriptor is not for this type.");
220 }
221 if (desc.getIndex() == -1) {
222 return UNRECOGNIZED;
223 }
224 return VALUES[desc.getIndex()];
225 }
226
227 private final int value;
228
229 private Status(int value) {
230 this.value = value;
231 }
232
233 // @@protoc_insertion_point(enum_scope:operations_research.SetCoverSolutionResponse.Status)
234 }
235
236 private int bitField0_;
237 public static final int STATUS_FIELD_NUMBER = 1;
238 private int status_ = 0;
247 @java.lang.Override public boolean hasStatus() {
248 return ((bitField0_ & 0x00000001) != 0);
249 }
258 @java.lang.Override public int getStatusValue() {
259 return status_;
260 }
270 com.google.ortools.algorithms.SetCoverSolutionResponse.Status result = com.google.ortools.algorithms.SetCoverSolutionResponse.Status.forNumber(status_);
271 return result == null ? com.google.ortools.algorithms.SetCoverSolutionResponse.Status.UNRECOGNIZED : result;
272 }
273
274 public static final int NUM_SUBSETS_FIELD_NUMBER = 2;
275 private int numSubsets_ = 0;
285 @java.lang.Override
286 public boolean hasNumSubsets() {
287 return ((bitField0_ & 0x00000002) != 0);
288 }
298 @java.lang.Override
299 public int getNumSubsets() {
300 return numSubsets_;
301 }
302
303 public static final int SUBSET_FIELD_NUMBER = 3;
304 @SuppressWarnings("serial")
305 private com.google.protobuf.Internal.IntList subset_ =
306 emptyIntList();
315 @java.lang.Override
316 public java.util.List<java.lang.Integer>
318 return subset_;
319 }
328 public int getSubsetCount() {
329 return subset_.size();
330 }
340 public int getSubset(int index) {
341 return subset_.getInt(index);
342 }
343 private int subsetMemoizedSerializedSize = -1;
344
345 public static final int COST_FIELD_NUMBER = 4;
346 private double cost_ = 0D;
355 @java.lang.Override
356 public boolean hasCost() {
357 return ((bitField0_ & 0x00000004) != 0);
358 }
367 @java.lang.Override
368 public double getCost() {
369 return cost_;
370 }
371
372 public static final int COST_LOWER_BOUND_FIELD_NUMBER = 5;
373 private double costLowerBound_ = 0D;
382 @java.lang.Override
383 public boolean hasCostLowerBound() {
384 return ((bitField0_ & 0x00000008) != 0);
385 }
394 @java.lang.Override
395 public double getCostLowerBound() {
396 return costLowerBound_;
397 }
398
399 public static final int FINGERPRINT_FIELD_NUMBER = 6;
400 private com.google.ortools.util.Int128 fingerprint_;
409 @java.lang.Override
410 public boolean hasFingerprint() {
411 return ((bitField0_ & 0x00000010) != 0);
412 }
421 @java.lang.Override
423 return fingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : fingerprint_;
424 }
432 @java.lang.Override
434 return fingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : fingerprint_;
435 }
436
437 public static final int MODEL_FINGERPRINT_FIELD_NUMBER = 7;
438 private com.google.ortools.util.Int128 modelFingerprint_;
447 @java.lang.Override
448 public boolean hasModelFingerprint() {
449 return ((bitField0_ & 0x00000020) != 0);
450 }
459 @java.lang.Override
461 return modelFingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : modelFingerprint_;
462 }
470 @java.lang.Override
472 return modelFingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : modelFingerprint_;
473 }
474
475 private byte memoizedIsInitialized = -1;
476 @java.lang.Override
477 public final boolean isInitialized() {
478 byte isInitialized = memoizedIsInitialized;
479 if (isInitialized == 1) return true;
480 if (isInitialized == 0) return false;
481
482 memoizedIsInitialized = 1;
483 return true;
484 }
485
486 @java.lang.Override
487 public void writeTo(com.google.protobuf.CodedOutputStream output)
488 throws java.io.IOException {
490 if (((bitField0_ & 0x00000001) != 0)) {
491 output.writeEnum(1, status_);
492 }
493 if (((bitField0_ & 0x00000002) != 0)) {
494 output.writeInt32(2, numSubsets_);
495 }
496 if (getSubsetList().size() > 0) {
497 output.writeUInt32NoTag(26);
498 output.writeUInt32NoTag(subsetMemoizedSerializedSize);
499 }
500 for (int i = 0; i < subset_.size(); i++) {
501 output.writeInt32NoTag(subset_.getInt(i));
502 }
503 if (((bitField0_ & 0x00000004) != 0)) {
504 output.writeDouble(4, cost_);
505 }
506 if (((bitField0_ & 0x00000008) != 0)) {
507 output.writeDouble(5, costLowerBound_);
508 }
509 if (((bitField0_ & 0x00000010) != 0)) {
510 output.writeMessage(6, getFingerprint());
511 }
512 if (((bitField0_ & 0x00000020) != 0)) {
513 output.writeMessage(7, getModelFingerprint());
514 }
515 getUnknownFields().writeTo(output);
516 }
517
518 @java.lang.Override
519 public int getSerializedSize() {
520 int size = memoizedSize;
521 if (size != -1) return size;
522
523 size = 0;
524 if (((bitField0_ & 0x00000001) != 0)) {
525 size += com.google.protobuf.CodedOutputStream
526 .computeEnumSize(1, status_);
527 }
528 if (((bitField0_ & 0x00000002) != 0)) {
529 size += com.google.protobuf.CodedOutputStream
530 .computeInt32Size(2, numSubsets_);
531 }
532 {
533 int dataSize = 0;
534 for (int i = 0; i < subset_.size(); i++) {
535 dataSize += com.google.protobuf.CodedOutputStream
536 .computeInt32SizeNoTag(subset_.getInt(i));
537 }
538 size += dataSize;
539 if (!getSubsetList().isEmpty()) {
540 size += 1;
541 size += com.google.protobuf.CodedOutputStream
542 .computeInt32SizeNoTag(dataSize);
543 }
544 subsetMemoizedSerializedSize = dataSize;
545 }
546 if (((bitField0_ & 0x00000004) != 0)) {
547 size += com.google.protobuf.CodedOutputStream
548 .computeDoubleSize(4, cost_);
549 }
550 if (((bitField0_ & 0x00000008) != 0)) {
551 size += com.google.protobuf.CodedOutputStream
552 .computeDoubleSize(5, costLowerBound_);
553 }
554 if (((bitField0_ & 0x00000010) != 0)) {
555 size += com.google.protobuf.CodedOutputStream
556 .computeMessageSize(6, getFingerprint());
557 }
558 if (((bitField0_ & 0x00000020) != 0)) {
559 size += com.google.protobuf.CodedOutputStream
560 .computeMessageSize(7, getModelFingerprint());
561 }
562 size += getUnknownFields().getSerializedSize();
563 memoizedSize = size;
564 return size;
565 }
566
567 @java.lang.Override
568 public boolean equals(final java.lang.Object obj) {
569 if (obj == this) {
570 return true;
571 }
572 if (!(obj instanceof com.google.ortools.algorithms.SetCoverSolutionResponse)) {
573 return super.equals(obj);
574 }
575 com.google.ortools.algorithms.SetCoverSolutionResponse other = (com.google.ortools.algorithms.SetCoverSolutionResponse) obj;
576
577 if (hasStatus() != other.hasStatus()) return false;
578 if (hasStatus()) {
579 if (status_ != other.status_) return false;
580 }
581 if (hasNumSubsets() != other.hasNumSubsets()) return false;
582 if (hasNumSubsets()) {
583 if (getNumSubsets()
584 != other.getNumSubsets()) return false;
585 }
586 if (!getSubsetList()
587 .equals(other.getSubsetList())) return false;
588 if (hasCost() != other.hasCost()) return false;
589 if (hasCost()) {
590 if (java.lang.Double.doubleToLongBits(getCost())
591 != java.lang.Double.doubleToLongBits(
592 other.getCost())) return false;
593 }
594 if (hasCostLowerBound() != other.hasCostLowerBound()) return false;
595 if (hasCostLowerBound()) {
596 if (java.lang.Double.doubleToLongBits(getCostLowerBound())
597 != java.lang.Double.doubleToLongBits(
598 other.getCostLowerBound())) return false;
599 }
600 if (hasFingerprint() != other.hasFingerprint()) return false;
601 if (hasFingerprint()) {
602 if (!getFingerprint()
603 .equals(other.getFingerprint())) return false;
604 }
605 if (hasModelFingerprint() != other.hasModelFingerprint()) return false;
606 if (hasModelFingerprint()) {
608 .equals(other.getModelFingerprint())) return false;
609 }
610 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
611 return true;
612 }
613
614 @java.lang.Override
615 public int hashCode() {
616 if (memoizedHashCode != 0) {
617 return memoizedHashCode;
618 }
619 int hash = 41;
620 hash = (19 * hash) + getDescriptor().hashCode();
621 if (hasStatus()) {
622 hash = (37 * hash) + STATUS_FIELD_NUMBER;
623 hash = (53 * hash) + status_;
624 }
625 if (hasNumSubsets()) {
626 hash = (37 * hash) + NUM_SUBSETS_FIELD_NUMBER;
627 hash = (53 * hash) + getNumSubsets();
628 }
629 if (getSubsetCount() > 0) {
630 hash = (37 * hash) + SUBSET_FIELD_NUMBER;
631 hash = (53 * hash) + getSubsetList().hashCode();
632 }
633 if (hasCost()) {
634 hash = (37 * hash) + COST_FIELD_NUMBER;
635 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
636 java.lang.Double.doubleToLongBits(getCost()));
637 }
638 if (hasCostLowerBound()) {
639 hash = (37 * hash) + COST_LOWER_BOUND_FIELD_NUMBER;
640 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
641 java.lang.Double.doubleToLongBits(getCostLowerBound()));
642 }
643 if (hasFingerprint()) {
644 hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
645 hash = (53 * hash) + getFingerprint().hashCode();
646 }
647 if (hasModelFingerprint()) {
648 hash = (37 * hash) + MODEL_FINGERPRINT_FIELD_NUMBER;
649 hash = (53 * hash) + getModelFingerprint().hashCode();
650 }
651 hash = (29 * hash) + getUnknownFields().hashCode();
652 memoizedHashCode = hash;
653 return hash;
654 }
655
657 java.nio.ByteBuffer data)
658 throws com.google.protobuf.InvalidProtocolBufferException {
659 return PARSER.parseFrom(data);
660 }
662 java.nio.ByteBuffer data,
663 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
664 throws com.google.protobuf.InvalidProtocolBufferException {
665 return PARSER.parseFrom(data, extensionRegistry);
666 }
668 com.google.protobuf.ByteString data)
669 throws com.google.protobuf.InvalidProtocolBufferException {
670 return PARSER.parseFrom(data);
671 }
673 com.google.protobuf.ByteString data,
674 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
675 throws com.google.protobuf.InvalidProtocolBufferException {
676 return PARSER.parseFrom(data, extensionRegistry);
677 }
679 throws com.google.protobuf.InvalidProtocolBufferException {
680 return PARSER.parseFrom(data);
681 }
683 byte[] data,
684 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
685 throws com.google.protobuf.InvalidProtocolBufferException {
686 return PARSER.parseFrom(data, extensionRegistry);
687 }
689 throws java.io.IOException {
690 return com.google.protobuf.GeneratedMessage
691 .parseWithIOException(PARSER, input);
692 }
694 java.io.InputStream input,
695 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
696 throws java.io.IOException {
697 return com.google.protobuf.GeneratedMessage
698 .parseWithIOException(PARSER, input, extensionRegistry);
699 }
700
702 throws java.io.IOException {
703 return com.google.protobuf.GeneratedMessage
704 .parseDelimitedWithIOException(PARSER, input);
705 }
706
708 java.io.InputStream input,
709 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
710 throws java.io.IOException {
711 return com.google.protobuf.GeneratedMessage
712 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
713 }
715 com.google.protobuf.CodedInputStream input)
716 throws java.io.IOException {
717 return com.google.protobuf.GeneratedMessage
718 .parseWithIOException(PARSER, input);
719 }
721 com.google.protobuf.CodedInputStream input,
722 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
723 throws java.io.IOException {
724 return com.google.protobuf.GeneratedMessage
725 .parseWithIOException(PARSER, input, extensionRegistry);
726 }
727
728 @java.lang.Override
729 public Builder newBuilderForType() { return newBuilder(); }
730 public static Builder newBuilder() {
731 return DEFAULT_INSTANCE.toBuilder();
732 }
733 public static Builder newBuilder(com.google.ortools.algorithms.SetCoverSolutionResponse prototype) {
734 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
735 }
736 @java.lang.Override
738 return this == DEFAULT_INSTANCE
739 ? new Builder() : new Builder().mergeFrom(this);
740 }
741
742 @java.lang.Override
744 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
745 Builder builder = new Builder(parent);
746 return builder;
747 }
751 public static final class Builder extends
752 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
753 // @@protoc_insertion_point(builder_implements:operations_research.SetCoverSolutionResponse)
754 com.google.ortools.algorithms.SetCoverSolutionResponseOrBuilder {
755 public static final com.google.protobuf.Descriptors.Descriptor
757 return com.google.ortools.algorithms.SetCover.internal_static_operations_research_SetCoverSolutionResponse_descriptor;
758 }
759
760 @java.lang.Override
761 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
763 return com.google.ortools.algorithms.SetCover.internal_static_operations_research_SetCoverSolutionResponse_fieldAccessorTable
764 .ensureFieldAccessorsInitialized(
765 com.google.ortools.algorithms.SetCoverSolutionResponse.class, com.google.ortools.algorithms.SetCoverSolutionResponse.Builder.class);
766 }
767
768 // Construct using com.google.ortools.algorithms.SetCoverSolutionResponse.newBuilder()
769 private Builder() {
770 maybeForceBuilderInitialization();
771 }
772
773 private Builder(
774 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
775 super(parent);
776 maybeForceBuilderInitialization();
777 }
778 private void maybeForceBuilderInitialization() {
779 if (com.google.protobuf.GeneratedMessage
780 .alwaysUseFieldBuilders) {
781 getFingerprintFieldBuilder();
782 getModelFingerprintFieldBuilder();
783 }
784 }
785 @java.lang.Override
786 public Builder clear() {
787 super.clear();
788 bitField0_ = 0;
789 status_ = 0;
790 numSubsets_ = 0;
791 subset_ = emptyIntList();
792 cost_ = 0D;
793 costLowerBound_ = 0D;
794 fingerprint_ = null;
795 if (fingerprintBuilder_ != null) {
796 fingerprintBuilder_.dispose();
797 fingerprintBuilder_ = null;
798 }
799 modelFingerprint_ = null;
800 if (modelFingerprintBuilder_ != null) {
801 modelFingerprintBuilder_.dispose();
802 modelFingerprintBuilder_ = null;
803 }
804 return this;
805 }
806
807 @java.lang.Override
808 public com.google.protobuf.Descriptors.Descriptor
810 return com.google.ortools.algorithms.SetCover.internal_static_operations_research_SetCoverSolutionResponse_descriptor;
811 }
812
813 @java.lang.Override
815 return com.google.ortools.algorithms.SetCoverSolutionResponse.getDefaultInstance();
816 }
817
818 @java.lang.Override
821 if (!result.isInitialized()) {
822 throw newUninitializedMessageException(result);
823 }
824 return result;
825 }
826
827 @java.lang.Override
829 com.google.ortools.algorithms.SetCoverSolutionResponse result = new com.google.ortools.algorithms.SetCoverSolutionResponse(this);
830 if (bitField0_ != 0) { buildPartial0(result); }
831 onBuilt();
832 return result;
833 }
834
835 private void buildPartial0(com.google.ortools.algorithms.SetCoverSolutionResponse result) {
836 int from_bitField0_ = bitField0_;
837 int to_bitField0_ = 0;
838 if (((from_bitField0_ & 0x00000001) != 0)) {
839 result.status_ = status_;
840 to_bitField0_ |= 0x00000001;
841 }
842 if (((from_bitField0_ & 0x00000002) != 0)) {
843 result.numSubsets_ = numSubsets_;
844 to_bitField0_ |= 0x00000002;
845 }
846 if (((from_bitField0_ & 0x00000004) != 0)) {
847 subset_.makeImmutable();
848 result.subset_ = subset_;
849 }
850 if (((from_bitField0_ & 0x00000008) != 0)) {
851 result.cost_ = cost_;
852 to_bitField0_ |= 0x00000004;
853 }
854 if (((from_bitField0_ & 0x00000010) != 0)) {
855 result.costLowerBound_ = costLowerBound_;
856 to_bitField0_ |= 0x00000008;
857 }
858 if (((from_bitField0_ & 0x00000020) != 0)) {
859 result.fingerprint_ = fingerprintBuilder_ == null
860 ? fingerprint_
861 : fingerprintBuilder_.build();
862 to_bitField0_ |= 0x00000010;
863 }
864 if (((from_bitField0_ & 0x00000040) != 0)) {
865 result.modelFingerprint_ = modelFingerprintBuilder_ == null
866 ? modelFingerprint_
867 : modelFingerprintBuilder_.build();
868 to_bitField0_ |= 0x00000020;
869 }
870 result.bitField0_ |= to_bitField0_;
871 }
872
873 @java.lang.Override
874 public Builder mergeFrom(com.google.protobuf.Message other) {
875 if (other instanceof com.google.ortools.algorithms.SetCoverSolutionResponse) {
876 return mergeFrom((com.google.ortools.algorithms.SetCoverSolutionResponse)other);
877 } else {
878 super.mergeFrom(other);
879 return this;
880 }
881 }
882
883 public Builder mergeFrom(com.google.ortools.algorithms.SetCoverSolutionResponse other) {
884 if (other == com.google.ortools.algorithms.SetCoverSolutionResponse.getDefaultInstance()) return this;
885 if (other.hasStatus()) {
886 setStatus(other.getStatus());
887 }
888 if (other.hasNumSubsets()) {
889 setNumSubsets(other.getNumSubsets());
890 }
891 if (!other.subset_.isEmpty()) {
892 if (subset_.isEmpty()) {
893 subset_ = other.subset_;
894 subset_.makeImmutable();
895 bitField0_ |= 0x00000004;
896 } else {
897 ensureSubsetIsMutable();
898 subset_.addAll(other.subset_);
899 }
900 onChanged();
901 }
902 if (other.hasCost()) {
903 setCost(other.getCost());
904 }
905 if (other.hasCostLowerBound()) {
906 setCostLowerBound(other.getCostLowerBound());
907 }
908 if (other.hasFingerprint()) {
909 mergeFingerprint(other.getFingerprint());
910 }
911 if (other.hasModelFingerprint()) {
912 mergeModelFingerprint(other.getModelFingerprint());
913 }
914 this.mergeUnknownFields(other.getUnknownFields());
915 onChanged();
916 return this;
917 }
918
919 @java.lang.Override
920 public final boolean isInitialized() {
921 return true;
922 }
923
924 @java.lang.Override
926 com.google.protobuf.CodedInputStream input,
927 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
928 throws java.io.IOException {
929 if (extensionRegistry == null) {
930 throw new java.lang.NullPointerException();
931 }
932 try {
933 boolean done = false;
934 while (!done) {
935 int tag = input.readTag();
936 switch (tag) {
937 case 0:
938 done = true;
939 break;
940 case 8: {
941 status_ = input.readEnum();
942 bitField0_ |= 0x00000001;
943 break;
944 } // case 8
945 case 16: {
946 numSubsets_ = input.readInt32();
947 bitField0_ |= 0x00000002;
948 break;
949 } // case 16
950 case 24: {
951 int v = input.readInt32();
952 ensureSubsetIsMutable();
953 subset_.addInt(v);
954 break;
955 } // case 24
956 case 26: {
957 int length = input.readRawVarint32();
958 int limit = input.pushLimit(length);
959 ensureSubsetIsMutable();
960 while (input.getBytesUntilLimit() > 0) {
961 subset_.addInt(input.readInt32());
962 }
963 input.popLimit(limit);
964 break;
965 } // case 26
966 case 33: {
967 cost_ = input.readDouble();
968 bitField0_ |= 0x00000008;
969 break;
970 } // case 33
971 case 41: {
972 costLowerBound_ = input.readDouble();
973 bitField0_ |= 0x00000010;
974 break;
975 } // case 41
976 case 50: {
977 input.readMessage(
978 getFingerprintFieldBuilder().getBuilder(),
979 extensionRegistry);
980 bitField0_ |= 0x00000020;
981 break;
982 } // case 50
983 case 58: {
984 input.readMessage(
985 getModelFingerprintFieldBuilder().getBuilder(),
986 extensionRegistry);
987 bitField0_ |= 0x00000040;
988 break;
989 } // case 58
990 default: {
991 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
992 done = true; // was an endgroup tag
993 }
994 break;
995 } // default:
996 } // switch (tag)
997 } // while (!done)
998 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
999 throw e.unwrapIOException();
1000 } finally {
1001 onChanged();
1002 } // finally
1003 return this;
1004 }
1005 private int bitField0_;
1006
1007 private int status_ = 0;
1016 @java.lang.Override public boolean hasStatus() {
1017 return ((bitField0_ & 0x00000001) != 0);
1018 }
1027 @java.lang.Override public int getStatusValue() {
1028 return status_;
1029 }
1039 public Builder setStatusValue(int value) {
1040 status_ = value;
1041 bitField0_ |= 0x00000001;
1042 onChanged();
1043 return this;
1044 }
1053 @java.lang.Override
1055 com.google.ortools.algorithms.SetCoverSolutionResponse.Status result = com.google.ortools.algorithms.SetCoverSolutionResponse.Status.forNumber(status_);
1056 return result == null ? com.google.ortools.algorithms.SetCoverSolutionResponse.Status.UNRECOGNIZED : result;
1057 }
1067 public Builder setStatus(com.google.ortools.algorithms.SetCoverSolutionResponse.Status value) {
1068 if (value == null) {
1069 throw new NullPointerException();
1070 }
1071 bitField0_ |= 0x00000001;
1072 status_ = value.getNumber();
1073 onChanged();
1074 return this;
1075 }
1085 bitField0_ = (bitField0_ & ~0x00000001);
1086 status_ = 0;
1087 onChanged();
1088 return this;
1089 }
1090
1091 private int numSubsets_ ;
1101 @java.lang.Override
1102 public boolean hasNumSubsets() {
1103 return ((bitField0_ & 0x00000002) != 0);
1104 }
1114 @java.lang.Override
1115 public int getNumSubsets() {
1116 return numSubsets_;
1117 }
1128 public Builder setNumSubsets(int value) {
1129
1130 numSubsets_ = value;
1131 bitField0_ |= 0x00000002;
1132 onChanged();
1133 return this;
1134 }
1145 bitField0_ = (bitField0_ & ~0x00000002);
1146 numSubsets_ = 0;
1147 onChanged();
1148 return this;
1149 }
1150
1151 private com.google.protobuf.Internal.IntList subset_ = emptyIntList();
1152 private void ensureSubsetIsMutable() {
1153 if (!subset_.isModifiable()) {
1154 subset_ = makeMutableCopy(subset_);
1155 }
1156 bitField0_ |= 0x00000004;
1157 }
1166 public java.util.List<java.lang.Integer>
1168 subset_.makeImmutable();
1169 return subset_;
1170 }
1179 public int getSubsetCount() {
1180 return subset_.size();
1181 }
1191 public int getSubset(int index) {
1192 return subset_.getInt(index);
1193 }
1205 int index, int value) {
1206
1207 ensureSubsetIsMutable();
1208 subset_.setInt(index, value);
1209 bitField0_ |= 0x00000004;
1210 onChanged();
1211 return this;
1212 }
1222 public Builder addSubset(int value) {
1223
1224 ensureSubsetIsMutable();
1225 subset_.addInt(value);
1226 bitField0_ |= 0x00000004;
1227 onChanged();
1228 return this;
1229 }
1240 java.lang.Iterable<? extends java.lang.Integer> values) {
1241 ensureSubsetIsMutable();
1242 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1243 values, subset_);
1244 bitField0_ |= 0x00000004;
1245 onChanged();
1246 return this;
1247 }
1257 subset_ = emptyIntList();
1258 bitField0_ = (bitField0_ & ~0x00000004);
1259 onChanged();
1260 return this;
1261 }
1262
1263 private double cost_ ;
1272 @java.lang.Override
1273 public boolean hasCost() {
1274 return ((bitField0_ & 0x00000008) != 0);
1275 }
1284 @java.lang.Override
1285 public double getCost() {
1286 return cost_;
1287 }
1297 public Builder setCost(double value) {
1298
1299 cost_ = value;
1300 bitField0_ |= 0x00000008;
1301 onChanged();
1302 return this;
1303 }
1313 bitField0_ = (bitField0_ & ~0x00000008);
1314 cost_ = 0D;
1315 onChanged();
1316 return this;
1317 }
1318
1319 private double costLowerBound_ ;
1328 @java.lang.Override
1329 public boolean hasCostLowerBound() {
1330 return ((bitField0_ & 0x00000010) != 0);
1331 }
1340 @java.lang.Override
1341 public double getCostLowerBound() {
1342 return costLowerBound_;
1343 }
1353 public Builder setCostLowerBound(double value) {
1354
1355 costLowerBound_ = value;
1356 bitField0_ |= 0x00000010;
1357 onChanged();
1358 return this;
1359 }
1369 bitField0_ = (bitField0_ & ~0x00000010);
1370 costLowerBound_ = 0D;
1371 onChanged();
1372 return this;
1373 }
1374
1375 private com.google.ortools.util.Int128 fingerprint_;
1376 private com.google.protobuf.SingleFieldBuilder<
1377 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder> fingerprintBuilder_;
1386 public boolean hasFingerprint() {
1387 return ((bitField0_ & 0x00000020) != 0);
1388 }
1398 if (fingerprintBuilder_ == null) {
1399 return fingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : fingerprint_;
1400 } else {
1401 return fingerprintBuilder_.getMessage();
1402 }
1403 }
1411 public Builder setFingerprint(com.google.ortools.util.Int128 value) {
1412 if (fingerprintBuilder_ == null) {
1413 if (value == null) {
1414 throw new NullPointerException();
1415 }
1416 fingerprint_ = value;
1417 } else {
1418 fingerprintBuilder_.setMessage(value);
1419 }
1420 bitField0_ |= 0x00000020;
1421 onChanged();
1422 return this;
1423 }
1432 com.google.ortools.util.Int128.Builder builderForValue) {
1433 if (fingerprintBuilder_ == null) {
1434 fingerprint_ = builderForValue.build();
1435 } else {
1436 fingerprintBuilder_.setMessage(builderForValue.build());
1437 }
1438 bitField0_ |= 0x00000020;
1439 onChanged();
1440 return this;
1441 }
1449 public Builder mergeFingerprint(com.google.ortools.util.Int128 value) {
1450 if (fingerprintBuilder_ == null) {
1451 if (((bitField0_ & 0x00000020) != 0) &&
1452 fingerprint_ != null &&
1453 fingerprint_ != com.google.ortools.util.Int128.getDefaultInstance()) {
1455 } else {
1456 fingerprint_ = value;
1457 }
1458 } else {
1459 fingerprintBuilder_.mergeFrom(value);
1460 }
1461 if (fingerprint_ != null) {
1462 bitField0_ |= 0x00000020;
1463 onChanged();
1464 }
1465 return this;
1466 }
1475 bitField0_ = (bitField0_ & ~0x00000020);
1476 fingerprint_ = null;
1477 if (fingerprintBuilder_ != null) {
1478 fingerprintBuilder_.dispose();
1479 fingerprintBuilder_ = null;
1480 }
1481 onChanged();
1482 return this;
1483 }
1492 bitField0_ |= 0x00000020;
1493 onChanged();
1494 return getFingerprintFieldBuilder().getBuilder();
1495 }
1504 if (fingerprintBuilder_ != null) {
1505 return fingerprintBuilder_.getMessageOrBuilder();
1506 } else {
1507 return fingerprint_ == null ?
1508 com.google.ortools.util.Int128.getDefaultInstance() : fingerprint_;
1509 }
1510 }
1518 private com.google.protobuf.SingleFieldBuilder<
1519 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder>
1520 getFingerprintFieldBuilder() {
1521 if (fingerprintBuilder_ == null) {
1522 fingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1523 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder>(
1525 getParentForChildren(),
1526 isClean());
1527 fingerprint_ = null;
1528 }
1529 return fingerprintBuilder_;
1530 }
1531
1532 private com.google.ortools.util.Int128 modelFingerprint_;
1533 private com.google.protobuf.SingleFieldBuilder<
1534 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder> modelFingerprintBuilder_;
1543 public boolean hasModelFingerprint() {
1544 return ((bitField0_ & 0x00000040) != 0);
1545 }
1555 if (modelFingerprintBuilder_ == null) {
1556 return modelFingerprint_ == null ? com.google.ortools.util.Int128.getDefaultInstance() : modelFingerprint_;
1557 } else {
1558 return modelFingerprintBuilder_.getMessage();
1559 }
1560 }
1568 public Builder setModelFingerprint(com.google.ortools.util.Int128 value) {
1569 if (modelFingerprintBuilder_ == null) {
1570 if (value == null) {
1571 throw new NullPointerException();
1572 }
1573 modelFingerprint_ = value;
1574 } else {
1575 modelFingerprintBuilder_.setMessage(value);
1576 }
1577 bitField0_ |= 0x00000040;
1578 onChanged();
1579 return this;
1580 }
1589 com.google.ortools.util.Int128.Builder builderForValue) {
1590 if (modelFingerprintBuilder_ == null) {
1591 modelFingerprint_ = builderForValue.build();
1592 } else {
1593 modelFingerprintBuilder_.setMessage(builderForValue.build());
1594 }
1595 bitField0_ |= 0x00000040;
1596 onChanged();
1597 return this;
1598 }
1606 public Builder mergeModelFingerprint(com.google.ortools.util.Int128 value) {
1607 if (modelFingerprintBuilder_ == null) {
1608 if (((bitField0_ & 0x00000040) != 0) &&
1609 modelFingerprint_ != null &&
1610 modelFingerprint_ != com.google.ortools.util.Int128.getDefaultInstance()) {
1612 } else {
1613 modelFingerprint_ = value;
1614 }
1615 } else {
1616 modelFingerprintBuilder_.mergeFrom(value);
1617 }
1618 if (modelFingerprint_ != null) {
1619 bitField0_ |= 0x00000040;
1620 onChanged();
1621 }
1622 return this;
1623 }
1632 bitField0_ = (bitField0_ & ~0x00000040);
1633 modelFingerprint_ = null;
1634 if (modelFingerprintBuilder_ != null) {
1635 modelFingerprintBuilder_.dispose();
1636 modelFingerprintBuilder_ = null;
1637 }
1638 onChanged();
1639 return this;
1640 }
1649 bitField0_ |= 0x00000040;
1650 onChanged();
1651 return getModelFingerprintFieldBuilder().getBuilder();
1652 }
1661 if (modelFingerprintBuilder_ != null) {
1662 return modelFingerprintBuilder_.getMessageOrBuilder();
1663 } else {
1664 return modelFingerprint_ == null ?
1665 com.google.ortools.util.Int128.getDefaultInstance() : modelFingerprint_;
1666 }
1667 }
1675 private com.google.protobuf.SingleFieldBuilder<
1676 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder>
1677 getModelFingerprintFieldBuilder() {
1678 if (modelFingerprintBuilder_ == null) {
1679 modelFingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1680 com.google.ortools.util.Int128, com.google.ortools.util.Int128.Builder, com.google.ortools.util.Int128OrBuilder>(
1682 getParentForChildren(),
1683 isClean());
1684 modelFingerprint_ = null;
1685 }
1686 return modelFingerprintBuilder_;
1687 }
1688
1689 // @@protoc_insertion_point(builder_scope:operations_research.SetCoverSolutionResponse)
1690 }
1691
1692 // @@protoc_insertion_point(class_scope:operations_research.SetCoverSolutionResponse)
1693 private static final com.google.ortools.algorithms.SetCoverSolutionResponse DEFAULT_INSTANCE;
1694 static {
1695 DEFAULT_INSTANCE = new com.google.ortools.algorithms.SetCoverSolutionResponse();
1696 }
1697
1699 return DEFAULT_INSTANCE;
1700 }
1701
1702 private static final com.google.protobuf.Parser<SetCoverSolutionResponse>
1703 PARSER = new com.google.protobuf.AbstractParser<SetCoverSolutionResponse>() {
1704 @java.lang.Override
1705 public SetCoverSolutionResponse parsePartialFrom(
1706 com.google.protobuf.CodedInputStream input,
1707 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1708 throws com.google.protobuf.InvalidProtocolBufferException {
1709 Builder builder = newBuilder();
1710 try {
1711 builder.mergeFrom(input, extensionRegistry);
1712 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1713 throw e.setUnfinishedMessage(builder.buildPartial());
1714 } catch (com.google.protobuf.UninitializedMessageException e) {
1715 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1716 } catch (java.io.IOException e) {
1717 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1718 .setUnfinishedMessage(builder.buildPartial());
1719 }
1720 return builder.buildPartial();
1721 }
1722 };
1723
1724 public static com.google.protobuf.Parser<SetCoverSolutionResponse> parser() {
1725 return PARSER;
1726 }
1727
1728 @java.lang.Override
1729 public com.google.protobuf.Parser<SetCoverSolutionResponse> getParserForType() {
1730 return PARSER;
1731 }
1732
1733 @java.lang.Override
1735 return DEFAULT_INSTANCE;
1736 }
1737
1738}
1739
com.google.ortools.algorithms.SetCoverSolutionResponse.Status getStatus()
Builder setFingerprint(com.google.ortools.util.Int128.Builder builderForValue)
com.google.ortools.algorithms.SetCoverSolutionResponse buildPartial()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setModelFingerprint(com.google.ortools.util.Int128.Builder builderForValue)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.algorithms.SetCoverSolutionResponse build()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder setStatus(com.google.ortools.algorithms.SetCoverSolutionResponse.Status value)
com.google.ortools.algorithms.SetCoverSolutionResponse getDefaultInstanceForType()
Builder addAllSubset(java.lang.Iterable<? extends java.lang.Integer > values)
Builder mergeFrom(com.google.ortools.algorithms.SetCoverSolutionResponse other)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.algorithms.SetCoverSolutionResponse prototype)
com.google.ortools.algorithms.SetCoverSolutionResponse getDefaultInstanceForType()
com.google.ortools.util.Int128OrBuilder getFingerprintOrBuilder()
com.google.protobuf.Parser< SetCoverSolutionResponse > getParserForType()
static com.google.ortools.algorithms.SetCoverSolutionResponse parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.algorithms.SetCoverSolutionResponse getDefaultInstance()
static com.google.protobuf.Parser< SetCoverSolutionResponse > parser()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.algorithms.SetCoverSolutionResponse.Status getStatus()
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(java.io.InputStream input)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(byte[] data)
static com.google.ortools.algorithms.SetCoverSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.util.Int128OrBuilder getModelFingerprintOrBuilder()
static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
static com.google.protobuf.Internal.EnumLiteMap< Status > internalGetValueMap()
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()