5package com.google.ortools.constraintsolver;
15 com.google.protobuf.GeneratedMessage implements
18private static final long serialVersionUID = 0L;
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.constraintsolver.RoutingParameters.internal_static_operations_research_RoutingModelParameters_descriptor;
41 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
43 return com.google.ortools.constraintsolver.RoutingParameters.internal_static_operations_research_RoutingModelParameters_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.constraintsolver.RoutingModelParameters.class, com.google.ortools.constraintsolver.RoutingModelParameters.Builder.class);
48 private int bitField0_;
61 return ((bitField0_ & 0x00000001) != 0);
73 return solverParameters_ ==
null ? com.google.ortools.constraintsolver.ConstraintSolverParameters.getDefaultInstance() : solverParameters_;
84 return solverParameters_ ==
null ? com.google.ortools.constraintsolver.ConstraintSolverParameters.getDefaultInstance() : solverParameters_;
88 private boolean reduceVehicleCostModel_ =
false;
102 return reduceVehicleCostModel_;
106 private int maxCallbackCacheSize_ = 0;
118 return maxCallbackCacheSize_;
121 private byte memoizedIsInitialized = -1;
128 memoizedIsInitialized = 1;
133 public void writeTo(com.google.protobuf.CodedOutputStream output)
134 throws java.io.IOException {
135 if (((bitField0_ & 0x00000001) != 0)) {
138 if (reduceVehicleCostModel_ !=
false) {
139 output.writeBool(2, reduceVehicleCostModel_);
141 if (maxCallbackCacheSize_ != 0) {
142 output.writeInt32(3, maxCallbackCacheSize_);
144 getUnknownFields().writeTo(output);
149 int size = memoizedSize;
150 if (size != -1)
return size;
153 if (((bitField0_ & 0x00000001) != 0)) {
154 size += com.google.protobuf.CodedOutputStream
157 if (reduceVehicleCostModel_ !=
false) {
158 size += com.google.protobuf.CodedOutputStream
159 .computeBoolSize(2, reduceVehicleCostModel_);
161 if (maxCallbackCacheSize_ != 0) {
162 size += com.google.protobuf.CodedOutputStream
163 .computeInt32Size(3, maxCallbackCacheSize_);
165 size += getUnknownFields().getSerializedSize();
171 public boolean equals(
final java.lang.Object obj) {
175 if (!(obj instanceof com.google.ortools.constraintsolver.RoutingModelParameters)) {
176 return super.equals(obj);
189 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
195 if (memoizedHashCode != 0) {
196 return memoizedHashCode;
205 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
209 hash = (29 * hash) + getUnknownFields().hashCode();
210 memoizedHashCode = hash;
215 java.nio.ByteBuffer data)
216 throws com.google.protobuf.InvalidProtocolBufferException {
217 return PARSER.parseFrom(data);
220 java.nio.ByteBuffer data,
221 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
222 throws com.google.protobuf.InvalidProtocolBufferException {
223 return PARSER.parseFrom(data, extensionRegistry);
226 com.google.protobuf.ByteString data)
227 throws com.google.protobuf.InvalidProtocolBufferException {
228 return PARSER.parseFrom(data);
231 com.google.protobuf.ByteString data,
232 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
233 throws com.google.protobuf.InvalidProtocolBufferException {
234 return PARSER.parseFrom(data, extensionRegistry);
237 throws com.google.protobuf.InvalidProtocolBufferException {
238 return PARSER.parseFrom(data);
242 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
243 throws com.google.protobuf.InvalidProtocolBufferException {
244 return PARSER.parseFrom(data, extensionRegistry);
247 throws java.io.IOException {
248 return com.google.protobuf.GeneratedMessage
249 .parseWithIOException(PARSER, input);
252 java.io.InputStream input,
253 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
254 throws java.io.IOException {
255 return com.google.protobuf.GeneratedMessage
256 .parseWithIOException(PARSER, input, extensionRegistry);
260 throws java.io.IOException {
261 return com.google.protobuf.GeneratedMessage
262 .parseDelimitedWithIOException(PARSER, input);
266 java.io.InputStream input,
267 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268 throws java.io.IOException {
269 return com.google.protobuf.GeneratedMessage
270 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
273 com.google.protobuf.CodedInputStream input)
274 throws java.io.IOException {
275 return com.google.protobuf.GeneratedMessage
276 .parseWithIOException(PARSER, input);
279 com.google.protobuf.CodedInputStream input,
280 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281 throws java.io.IOException {
282 return com.google.protobuf.GeneratedMessage
283 .parseWithIOException(PARSER, input, extensionRegistry);
291 public static Builder newBuilder(com.google.ortools.constraintsolver.RoutingModelParameters prototype) {
296 return this == DEFAULT_INSTANCE
302 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
314 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
317 public static final com.google.protobuf.Descriptors.Descriptor
319 return com.google.ortools.constraintsolver.RoutingParameters.internal_static_operations_research_RoutingModelParameters_descriptor;
323 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
325 return com.google.ortools.constraintsolver.RoutingParameters.internal_static_operations_research_RoutingModelParameters_fieldAccessorTable
326 .ensureFieldAccessorsInitialized(
327 com.google.ortools.constraintsolver.RoutingModelParameters.class, com.google.ortools.constraintsolver.RoutingModelParameters.Builder.class);
332 maybeForceBuilderInitialization();
336 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
338 maybeForceBuilderInitialization();
340 private void maybeForceBuilderInitialization() {
341 if (com.google.protobuf.GeneratedMessage
342 .alwaysUseFieldBuilders) {
343 getSolverParametersFieldBuilder();
350 solverParameters_ =
null;
351 if (solverParametersBuilder_ !=
null) {
352 solverParametersBuilder_.dispose();
353 solverParametersBuilder_ =
null;
355 reduceVehicleCostModel_ =
false;
356 maxCallbackCacheSize_ = 0;
361 public com.google.protobuf.Descriptors.Descriptor
363 return com.google.ortools.constraintsolver.RoutingParameters.internal_static_operations_research_RoutingModelParameters_descriptor;
368 return com.google.ortools.constraintsolver.RoutingModelParameters.getDefaultInstance();
375 throw newUninitializedMessageException(result);
383 if (bitField0_ != 0) { buildPartial0(result); }
388 private void buildPartial0(com.google.ortools.constraintsolver.RoutingModelParameters result) {
389 int from_bitField0_ = bitField0_;
390 int to_bitField0_ = 0;
391 if (((from_bitField0_ & 0x00000001) != 0)) {
392 result.solverParameters_ = solverParametersBuilder_ ==
null
394 : solverParametersBuilder_.build();
395 to_bitField0_ |= 0x00000001;
397 if (((from_bitField0_ & 0x00000002) != 0)) {
398 result.reduceVehicleCostModel_ = reduceVehicleCostModel_;
400 if (((from_bitField0_ & 0x00000004) != 0)) {
401 result.maxCallbackCacheSize_ = maxCallbackCacheSize_;
403 result.bitField0_ |= to_bitField0_;
408 if (other instanceof com.google.ortools.constraintsolver.RoutingModelParameters) {
409 return mergeFrom((com.google.ortools.constraintsolver.RoutingModelParameters)other);
411 super.mergeFrom(other);
416 public Builder mergeFrom(com.google.ortools.constraintsolver.RoutingModelParameters other) {
417 if (other == com.google.ortools.constraintsolver.RoutingModelParameters.getDefaultInstance())
return this;
418 if (other.hasSolverParameters()) {
421 if (other.getReduceVehicleCostModel() !=
false) {
424 if (other.getMaxCallbackCacheSize() != 0) {
427 this.mergeUnknownFields(other.getUnknownFields());
439 com.google.protobuf.CodedInputStream input,
440 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
441 throws java.io.IOException {
442 if (extensionRegistry ==
null) {
443 throw new java.lang.NullPointerException();
446 boolean done =
false;
448 int tag = input.readTag();
455 getSolverParametersFieldBuilder().getBuilder(),
457 bitField0_ |= 0x00000001;
461 reduceVehicleCostModel_ = input.readBool();
462 bitField0_ |= 0x00000002;
466 maxCallbackCacheSize_ = input.readInt32();
467 bitField0_ |= 0x00000004;
471 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
478 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
479 throw e.unwrapIOException();
485 private int bitField0_;
488 private com.google.protobuf.SingleFieldBuilder<
489 com.google.ortools.constraintsolver.ConstraintSolverParameters, com.google.ortools.constraintsolver.ConstraintSolverParameters.Builder, com.google.ortools.constraintsolver.ConstraintSolverParametersOrBuilder> solverParametersBuilder_;
499 return ((bitField0_ & 0x00000001) != 0);
510 if (solverParametersBuilder_ ==
null) {
511 return solverParameters_ ==
null ? com.google.ortools.constraintsolver.ConstraintSolverParameters.getDefaultInstance() : solverParameters_;
513 return solverParametersBuilder_.getMessage();
524 if (solverParametersBuilder_ ==
null) {
526 throw new NullPointerException();
528 solverParameters_ = value;
530 solverParametersBuilder_.setMessage(value);
532 bitField0_ |= 0x00000001;
544 com.google.ortools.constraintsolver.ConstraintSolverParameters.Builder builderForValue) {
545 if (solverParametersBuilder_ ==
null) {
546 solverParameters_ = builderForValue.build();
548 solverParametersBuilder_.setMessage(builderForValue.build());
550 bitField0_ |= 0x00000001;
562 if (solverParametersBuilder_ ==
null) {
563 if (((bitField0_ & 0x00000001) != 0) &&
564 solverParameters_ !=
null &&
565 solverParameters_ != com.google.ortools.constraintsolver.ConstraintSolverParameters.getDefaultInstance()) {
568 solverParameters_ = value;
571 solverParametersBuilder_.mergeFrom(value);
573 if (solverParameters_ !=
null) {
574 bitField0_ |= 0x00000001;
587 bitField0_ = (bitField0_ & ~0x00000001);
588 solverParameters_ =
null;
589 if (solverParametersBuilder_ !=
null) {
590 solverParametersBuilder_.dispose();
591 solverParametersBuilder_ =
null;
604 bitField0_ |= 0x00000001;
606 return getSolverParametersFieldBuilder().getBuilder();
616 if (solverParametersBuilder_ !=
null) {
617 return solverParametersBuilder_.getMessageOrBuilder();
619 return solverParameters_ ==
null ?
620 com.google.ortools.constraintsolver.ConstraintSolverParameters.getDefaultInstance() : solverParameters_;
630 private com.google.protobuf.SingleFieldBuilder<
631 com.google.ortools.constraintsolver.ConstraintSolverParameters, com.google.ortools.constraintsolver.ConstraintSolverParameters.Builder, com.google.ortools.constraintsolver.ConstraintSolverParametersOrBuilder>
632 getSolverParametersFieldBuilder() {
633 if (solverParametersBuilder_ ==
null) {
634 solverParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
635 com.google.ortools.constraintsolver.ConstraintSolverParameters, com.google.ortools.constraintsolver.ConstraintSolverParameters.Builder, com.google.ortools.constraintsolver.ConstraintSolverParametersOrBuilder>(
637 getParentForChildren(),
639 solverParameters_ =
null;
641 return solverParametersBuilder_;
644 private boolean reduceVehicleCostModel_ ;
658 return reduceVehicleCostModel_;
674 reduceVehicleCostModel_ = value;
675 bitField0_ |= 0x00000002;
691 bitField0_ = (bitField0_ & ~0x00000002);
692 reduceVehicleCostModel_ =
false;
697 private int maxCallbackCacheSize_ ;
709 return maxCallbackCacheSize_;
723 maxCallbackCacheSize_ = value;
724 bitField0_ |= 0x00000004;
738 bitField0_ = (bitField0_ & ~0x00000004);
739 maxCallbackCacheSize_ = 0;
750 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.RoutingModelParameters();
754 return DEFAULT_INSTANCE;
761 com.google.protobuf.CodedInputStream input,
762 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
763 throws com.google.protobuf.InvalidProtocolBufferException {
766 builder.mergeFrom(input, extensionRegistry);
767 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
768 throw e.setUnfinishedMessage(builder.buildPartial());
769 }
catch (com.google.protobuf.UninitializedMessageException e) {
770 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
771 }
catch (java.io.IOException e) {
772 throw new com.google.protobuf.InvalidProtocolBufferException(e)
773 .setUnfinishedMessage(builder.buildPartial());
775 return builder.buildPartial();
790 return DEFAULT_INSTANCE;