6package com.google.ortools.constraintsolver;
15public final class RuinStrategy
extends
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27 RuinStrategy.class.getName());
30 private RuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 private RuinStrategy() {
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.constraintsolver.RuinStrategy.class, com.google.ortools.constraintsolver.RuinStrategy.Builder.class);
49 private int strategyCase_ = 0;
50 @SuppressWarnings(
"serial")
51 private java.lang.Object strategy_;
52 public enum StrategyCase
53 implements com.google.protobuf.Internal.EnumLite,
54 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
59 private final int value;
60 private StrategyCase(
int value) {
69 public static StrategyCase
valueOf(
int value) {
100 return strategyCase_ == 1;
108 if (strategyCase_ == 1) {
109 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
111 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
118 if (strategyCase_ == 1) {
119 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
121 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
131 return strategyCase_ == 2;
139 if (strategyCase_ == 2) {
140 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
142 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
149 if (strategyCase_ == 2) {
150 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
152 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
162 return strategyCase_ == 3;
170 if (strategyCase_ == 3) {
171 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
173 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
180 if (strategyCase_ == 3) {
181 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
183 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
186 private byte memoizedIsInitialized = -1;
193 memoizedIsInitialized = 1;
198 public void writeTo(com.google.protobuf.CodedOutputStream output)
199 throws java.io.IOException {
200 if (strategyCase_ == 1) {
201 output.writeMessage(1, (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_);
203 if (strategyCase_ == 2) {
204 output.writeMessage(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
206 if (strategyCase_ == 3) {
207 output.writeMessage(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
209 getUnknownFields().writeTo(output);
214 int size = memoizedSize;
215 if (size != -1)
return size;
218 if (strategyCase_ == 1) {
219 size += com.google.protobuf.CodedOutputStream
220 .computeMessageSize(1, (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_);
222 if (strategyCase_ == 2) {
223 size += com.google.protobuf.CodedOutputStream
224 .computeMessageSize(2, (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_);
226 if (strategyCase_ == 3) {
227 size += com.google.protobuf.CodedOutputStream
228 .computeMessageSize(3, (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_);
230 size += getUnknownFields().getSerializedSize();
236 public boolean equals(
final java.lang.Object obj) {
240 if (!(obj instanceof com.google.ortools.constraintsolver.RuinStrategy)) {
241 return super.equals(obj);
246 switch (strategyCase_) {
262 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
268 if (memoizedHashCode != 0) {
269 return memoizedHashCode;
273 switch (strategyCase_) {
289 hash = (29 * hash) + getUnknownFields().hashCode();
290 memoizedHashCode = hash;
295 java.nio.ByteBuffer data)
296 throws com.google.protobuf.InvalidProtocolBufferException {
297 return PARSER.parseFrom(data);
300 java.nio.ByteBuffer data,
301 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
302 throws com.google.protobuf.InvalidProtocolBufferException {
303 return PARSER.parseFrom(data, extensionRegistry);
306 com.google.protobuf.ByteString data)
307 throws com.google.protobuf.InvalidProtocolBufferException {
308 return PARSER.parseFrom(data);
311 com.google.protobuf.ByteString data,
312 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
313 throws com.google.protobuf.InvalidProtocolBufferException {
314 return PARSER.parseFrom(data, extensionRegistry);
317 throws com.google.protobuf.InvalidProtocolBufferException {
318 return PARSER.parseFrom(data);
322 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
323 throws com.google.protobuf.InvalidProtocolBufferException {
324 return PARSER.parseFrom(data, extensionRegistry);
327 throws java.io.IOException {
328 return com.google.protobuf.GeneratedMessage
329 .parseWithIOException(PARSER, input);
332 java.io.InputStream input,
333 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
334 throws java.io.IOException {
335 return com.google.protobuf.GeneratedMessage
336 .parseWithIOException(PARSER, input, extensionRegistry);
340 throws java.io.IOException {
341 return com.google.protobuf.GeneratedMessage
342 .parseDelimitedWithIOException(PARSER, input);
346 java.io.InputStream input,
347 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
348 throws java.io.IOException {
349 return com.google.protobuf.GeneratedMessage
350 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
353 com.google.protobuf.CodedInputStream input)
354 throws java.io.IOException {
355 return com.google.protobuf.GeneratedMessage
356 .parseWithIOException(PARSER, input);
359 com.google.protobuf.CodedInputStream input,
360 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
361 throws java.io.IOException {
362 return com.google.protobuf.GeneratedMessage
363 .parseWithIOException(PARSER, input, extensionRegistry);
369 return DEFAULT_INSTANCE.toBuilder();
372 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
376 return this == DEFAULT_INSTANCE
382 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
393 public static final class Builder
extends
394 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
397 public static final com.google.protobuf.Descriptors.Descriptor
399 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
403 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
405 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_fieldAccessorTable
406 .ensureFieldAccessorsInitialized(
407 com.google.ortools.constraintsolver.RuinStrategy.class, com.google.ortools.constraintsolver.RuinStrategy.Builder.class);
416 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
424 if (spatiallyCloseRoutesBuilder_ !=
null) {
425 spatiallyCloseRoutesBuilder_.clear();
427 if (randomWalkBuilder_ !=
null) {
428 randomWalkBuilder_.clear();
430 if (sisrBuilder_ !=
null) {
431 sisrBuilder_.clear();
439 public com.google.protobuf.Descriptors.Descriptor
441 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RuinStrategy_descriptor;
446 return com.google.ortools.constraintsolver.RuinStrategy.getDefaultInstance();
453 throw newUninitializedMessageException(result);
461 if (bitField0_ != 0) { buildPartial0(result); }
462 buildPartialOneofs(result);
467 private void buildPartial0(com.google.ortools.constraintsolver.RuinStrategy result) {
468 int from_bitField0_ = bitField0_;
471 private void buildPartialOneofs(com.google.ortools.constraintsolver.RuinStrategy result) {
472 result.strategyCase_ = strategyCase_;
473 result.strategy_ = this.strategy_;
474 if (strategyCase_ == 1 &&
475 spatiallyCloseRoutesBuilder_ !=
null) {
476 result.strategy_ = spatiallyCloseRoutesBuilder_.build();
478 if (strategyCase_ == 2 &&
479 randomWalkBuilder_ !=
null) {
480 result.strategy_ = randomWalkBuilder_.build();
482 if (strategyCase_ == 3 &&
483 sisrBuilder_ !=
null) {
484 result.strategy_ = sisrBuilder_.build();
489 public Builder
mergeFrom(com.google.protobuf.Message other) {
490 if (other instanceof com.google.ortools.constraintsolver.RuinStrategy) {
491 return mergeFrom((com.google.ortools.constraintsolver.RuinStrategy)other);
493 super.mergeFrom(other);
498 public Builder
mergeFrom(com.google.ortools.constraintsolver.RuinStrategy other) {
499 if (other == com.google.ortools.constraintsolver.RuinStrategy.getDefaultInstance())
return this;
500 switch (other.getStrategyCase()) {
501 case SPATIALLY_CLOSE_ROUTES: {
513 case STRATEGY_NOT_SET: {
517 this.mergeUnknownFields(other.getUnknownFields());
529 com.google.protobuf.CodedInputStream input,
530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
531 throws java.io.IOException {
532 if (extensionRegistry ==
null) {
533 throw new java.lang.NullPointerException();
536 boolean done =
false;
538 int tag = input.readTag();
545 getSpatiallyCloseRoutesFieldBuilder().getBuilder(),
552 getRandomWalkFieldBuilder().getBuilder(),
559 getSisrFieldBuilder().getBuilder(),
565 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
572 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
573 throw e.unwrapIOException();
579 private int strategyCase_ = 0;
580 private java.lang.Object strategy_;
594 private int bitField0_;
596 private com.google.protobuf.SingleFieldBuilder<
597 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder> spatiallyCloseRoutesBuilder_;
604 return strategyCase_ == 1;
612 if (spatiallyCloseRoutesBuilder_ ==
null) {
613 if (strategyCase_ == 1) {
614 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
616 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
618 if (strategyCase_ == 1) {
619 return spatiallyCloseRoutesBuilder_.getMessage();
621 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
628 if (spatiallyCloseRoutesBuilder_ ==
null) {
630 throw new NullPointerException();
635 spatiallyCloseRoutesBuilder_.setMessage(value);
644 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder builderForValue) {
645 if (spatiallyCloseRoutesBuilder_ ==
null) {
646 strategy_ = builderForValue.build();
649 spatiallyCloseRoutesBuilder_.setMessage(builderForValue.build());
658 if (spatiallyCloseRoutesBuilder_ ==
null) {
659 if (strategyCase_ == 1 &&
660 strategy_ != com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance()) {
661 strategy_ = com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.newBuilder((com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_)
662 .mergeFrom(value).buildPartial();
668 if (strategyCase_ == 1) {
669 spatiallyCloseRoutesBuilder_.mergeFrom(value);
671 spatiallyCloseRoutesBuilder_.setMessage(value);
681 if (spatiallyCloseRoutesBuilder_ ==
null) {
682 if (strategyCase_ == 1) {
688 if (strategyCase_ == 1) {
692 spatiallyCloseRoutesBuilder_.clear();
700 return getSpatiallyCloseRoutesFieldBuilder().getBuilder();
707 if ((strategyCase_ == 1) && (spatiallyCloseRoutesBuilder_ !=
null)) {
708 return spatiallyCloseRoutesBuilder_.getMessageOrBuilder();
710 if (strategyCase_ == 1) {
711 return (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_;
713 return com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
719 private com.google.protobuf.SingleFieldBuilder<
720 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder>
721 getSpatiallyCloseRoutesFieldBuilder() {
722 if (spatiallyCloseRoutesBuilder_ ==
null) {
723 if (!(strategyCase_ == 1)) {
724 strategy_ = com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.getDefaultInstance();
726 spatiallyCloseRoutesBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
727 com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy.Builder, com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategyOrBuilder>(
728 (com.google.ortools.constraintsolver.SpatiallyCloseRoutesRuinStrategy) strategy_,
729 getParentForChildren(),
735 return spatiallyCloseRoutesBuilder_;
738 private com.google.protobuf.SingleFieldBuilder<
739 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder> randomWalkBuilder_;
746 return strategyCase_ == 2;
754 if (randomWalkBuilder_ ==
null) {
755 if (strategyCase_ == 2) {
756 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
758 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
760 if (strategyCase_ == 2) {
761 return randomWalkBuilder_.getMessage();
763 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
769 public Builder
setRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value) {
770 if (randomWalkBuilder_ ==
null) {
772 throw new NullPointerException();
777 randomWalkBuilder_.setMessage(value);
786 com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder builderForValue) {
787 if (randomWalkBuilder_ ==
null) {
788 strategy_ = builderForValue.build();
791 randomWalkBuilder_.setMessage(builderForValue.build());
799 public Builder
mergeRandomWalk(com.google.ortools.constraintsolver.RandomWalkRuinStrategy value) {
800 if (randomWalkBuilder_ ==
null) {
801 if (strategyCase_ == 2 &&
802 strategy_ != com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance()) {
803 strategy_ = com.google.ortools.constraintsolver.RandomWalkRuinStrategy.newBuilder((com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_)
804 .mergeFrom(value).buildPartial();
810 if (strategyCase_ == 2) {
811 randomWalkBuilder_.mergeFrom(value);
813 randomWalkBuilder_.setMessage(value);
823 if (randomWalkBuilder_ ==
null) {
824 if (strategyCase_ == 2) {
830 if (strategyCase_ == 2) {
834 randomWalkBuilder_.clear();
842 return getRandomWalkFieldBuilder().getBuilder();
849 if ((strategyCase_ == 2) && (randomWalkBuilder_ !=
null)) {
850 return randomWalkBuilder_.getMessageOrBuilder();
852 if (strategyCase_ == 2) {
853 return (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_;
855 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
861 private com.google.protobuf.SingleFieldBuilder<
862 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder>
863 getRandomWalkFieldBuilder() {
864 if (randomWalkBuilder_ ==
null) {
865 if (!(strategyCase_ == 2)) {
866 strategy_ = com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
868 randomWalkBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
869 com.google.ortools.constraintsolver.RandomWalkRuinStrategy, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder, com.google.ortools.constraintsolver.RandomWalkRuinStrategyOrBuilder>(
870 (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) strategy_,
871 getParentForChildren(),
877 return randomWalkBuilder_;
880 private com.google.protobuf.SingleFieldBuilder<
881 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder> sisrBuilder_;
888 return strategyCase_ == 3;
896 if (sisrBuilder_ ==
null) {
897 if (strategyCase_ == 3) {
898 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
900 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
902 if (strategyCase_ == 3) {
903 return sisrBuilder_.getMessage();
905 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
911 public Builder
setSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value) {
912 if (sisrBuilder_ ==
null) {
914 throw new NullPointerException();
919 sisrBuilder_.setMessage(value);
928 com.google.ortools.constraintsolver.SISRRuinStrategy.Builder builderForValue) {
929 if (sisrBuilder_ ==
null) {
930 strategy_ = builderForValue.build();
933 sisrBuilder_.setMessage(builderForValue.build());
941 public Builder
mergeSisr(com.google.ortools.constraintsolver.SISRRuinStrategy value) {
942 if (sisrBuilder_ ==
null) {
943 if (strategyCase_ == 3 &&
944 strategy_ != com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance()) {
945 strategy_ = com.google.ortools.constraintsolver.SISRRuinStrategy.newBuilder((com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_)
946 .mergeFrom(value).buildPartial();
952 if (strategyCase_ == 3) {
953 sisrBuilder_.mergeFrom(value);
955 sisrBuilder_.setMessage(value);
965 if (sisrBuilder_ ==
null) {
966 if (strategyCase_ == 3) {
972 if (strategyCase_ == 3) {
976 sisrBuilder_.clear();
984 return getSisrFieldBuilder().getBuilder();
991 if ((strategyCase_ == 3) && (sisrBuilder_ !=
null)) {
992 return sisrBuilder_.getMessageOrBuilder();
994 if (strategyCase_ == 3) {
995 return (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_;
997 return com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
1003 private com.google.protobuf.SingleFieldBuilder<
1004 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder>
1005 getSisrFieldBuilder() {
1006 if (sisrBuilder_ ==
null) {
1007 if (!(strategyCase_ == 3)) {
1008 strategy_ = com.google.ortools.constraintsolver.SISRRuinStrategy.getDefaultInstance();
1010 sisrBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
1011 com.google.ortools.constraintsolver.SISRRuinStrategy, com.google.ortools.constraintsolver.SISRRuinStrategy.Builder, com.google.ortools.constraintsolver.SISRRuinStrategyOrBuilder>(
1012 (com.google.ortools.constraintsolver.SISRRuinStrategy) strategy_,
1013 getParentForChildren(),
1019 return sisrBuilder_;
1028 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.RuinStrategy();
1032 return DEFAULT_INSTANCE;
1035 private static final com.google.protobuf.Parser<
RuinStrategy>
1036 PARSER =
new com.google.protobuf.AbstractParser<
RuinStrategy>() {
1039 com.google.protobuf.CodedInputStream input,
1040 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1041 throws com.google.protobuf.InvalidProtocolBufferException {
1044 builder.mergeFrom(input, extensionRegistry);
1045 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1046 throw e.setUnfinishedMessage(builder.buildPartial());
1047 }
catch (com.google.protobuf.UninitializedMessageException e) {
1048 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1049 }
catch (java.io.IOException e) {
1050 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1051 .setUnfinishedMessage(builder.buildPartial());
1053 return builder.buildPartial();
1057 public static com.google.protobuf.Parser<RuinStrategy>
parser() {
1068 return DEFAULT_INSTANCE;