Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPModelDeltaProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
15public final class MPModelDeltaProto extends
16 com.google.protobuf.GeneratedMessage implements
17 // @@protoc_insertion_point(message_implements:operations_research.MPModelDeltaProto)
19private static final long serialVersionUID = 0L;
20 static {
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
23 /* major= */ 4,
24 /* minor= */ 26,
25 /* patch= */ 1,
26 /* suffix= */ "",
27 MPModelDeltaProto.class.getName());
28 }
29 // Use MPModelDeltaProto.newBuilder() to construct.
30 private MPModelDeltaProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
31 super(builder);
32 }
33 private MPModelDeltaProto() {
34 baselineModelFilePath_ = "";
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_descriptor;
40 }
41
42 @SuppressWarnings({"rawtypes"})
43 @java.lang.Override
44 protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
45 int number) {
46 switch (number) {
47 case 2:
48 return internalGetVariableOverrides();
49 case 3:
50 return internalGetConstraintOverrides();
51 default:
52 throw new RuntimeException(
53 "Invalid map field number: " + number);
54 }
55 }
56 @java.lang.Override
57 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
59 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_fieldAccessorTable
60 .ensureFieldAccessorsInitialized(
61 com.google.ortools.linearsolver.MPModelDeltaProto.class, com.google.ortools.linearsolver.MPModelDeltaProto.Builder.class);
62 }
63
64 private int bitField0_;
65 public static final int BASELINE_MODEL_FILE_PATH_FIELD_NUMBER = 1;
66 @SuppressWarnings("serial")
67 private volatile java.lang.Object baselineModelFilePath_ = "";
72 @java.lang.Override
73 public boolean hasBaselineModelFilePath() {
74 return ((bitField0_ & 0x00000001) != 0);
75 }
80 @java.lang.Override
81 public java.lang.String getBaselineModelFilePath() {
82 java.lang.Object ref = baselineModelFilePath_;
83 if (ref instanceof java.lang.String) {
84 return (java.lang.String) ref;
85 } else {
86 com.google.protobuf.ByteString bs =
87 (com.google.protobuf.ByteString) ref;
88 java.lang.String s = bs.toStringUtf8();
89 if (bs.isValidUtf8()) {
90 baselineModelFilePath_ = s;
91 }
92 return s;
93 }
94 }
99 @java.lang.Override
100 public com.google.protobuf.ByteString
102 java.lang.Object ref = baselineModelFilePath_;
103 if (ref instanceof java.lang.String) {
104 com.google.protobuf.ByteString b =
105 com.google.protobuf.ByteString.copyFromUtf8(
106 (java.lang.String) ref);
107 baselineModelFilePath_ = b;
108 return b;
109 } else {
110 return (com.google.protobuf.ByteString) ref;
111 }
112 }
113
114 public static final int VARIABLE_OVERRIDES_FIELD_NUMBER = 2;
115 private static final class VariableOverridesDefaultEntryHolder {
116 static final com.google.protobuf.MapEntry<
117 java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> defaultEntry =
118 com.google.protobuf.MapEntry
119 .<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto>newDefaultInstance(
120 com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_VariableOverridesEntry_descriptor,
121 com.google.protobuf.WireFormat.FieldType.INT32,
122 0,
123 com.google.protobuf.WireFormat.FieldType.MESSAGE,
124 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
125 }
126 @SuppressWarnings("serial")
127 private com.google.protobuf.MapField<
128 java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> variableOverrides_;
129 private com.google.protobuf.MapField<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto>
130 internalGetVariableOverrides() {
131 if (variableOverrides_ == null) {
132 return com.google.protobuf.MapField.emptyMapField(
133 VariableOverridesDefaultEntryHolder.defaultEntry);
134 }
135 return variableOverrides_;
136 }
138 return internalGetVariableOverrides().getMap().size();
139 }
153 @java.lang.Override
155 int key) {
156
157 return internalGetVariableOverrides().getMap().containsKey(key);
158 }
162 @java.lang.Override
163 @java.lang.Deprecated
164 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverrides() {
166 }
180 @java.lang.Override
181 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverridesMap() {
182 return internalGetVariableOverrides().getMap();
183 }
197 @java.lang.Override
198 public /* nullable */
200 int key,
201 /* nullable */
202com.google.ortools.linearsolver.MPVariableProto defaultValue) {
203
204 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> map =
205 internalGetVariableOverrides().getMap();
206 return map.containsKey(key) ? map.get(key) : defaultValue;
207 }
221 @java.lang.Override
223 int key) {
224
225 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> map =
226 internalGetVariableOverrides().getMap();
227 if (!map.containsKey(key)) {
228 throw new java.lang.IllegalArgumentException();
229 }
230 return map.get(key);
231 }
232
233 public static final int CONSTRAINT_OVERRIDES_FIELD_NUMBER = 3;
234 private static final class ConstraintOverridesDefaultEntryHolder {
235 static final com.google.protobuf.MapEntry<
236 java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> defaultEntry =
237 com.google.protobuf.MapEntry
238 .<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto>newDefaultInstance(
239 com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_ConstraintOverridesEntry_descriptor,
240 com.google.protobuf.WireFormat.FieldType.INT32,
241 0,
242 com.google.protobuf.WireFormat.FieldType.MESSAGE,
243 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
244 }
245 @SuppressWarnings("serial")
246 private com.google.protobuf.MapField<
247 java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> constraintOverrides_;
248 private com.google.protobuf.MapField<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto>
249 internalGetConstraintOverrides() {
250 if (constraintOverrides_ == null) {
251 return com.google.protobuf.MapField.emptyMapField(
252 ConstraintOverridesDefaultEntryHolder.defaultEntry);
253 }
254 return constraintOverrides_;
255 }
257 return internalGetConstraintOverrides().getMap().size();
258 }
272 @java.lang.Override
274 int key) {
275
276 return internalGetConstraintOverrides().getMap().containsKey(key);
277 }
281 @java.lang.Override
282 @java.lang.Deprecated
283 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverrides() {
285 }
299 @java.lang.Override
300 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverridesMap() {
301 return internalGetConstraintOverrides().getMap();
302 }
316 @java.lang.Override
317 public /* nullable */
319 int key,
320 /* nullable */
321com.google.ortools.linearsolver.MPConstraintProto defaultValue) {
322
323 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> map =
324 internalGetConstraintOverrides().getMap();
325 return map.containsKey(key) ? map.get(key) : defaultValue;
326 }
340 @java.lang.Override
342 int key) {
343
344 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> map =
345 internalGetConstraintOverrides().getMap();
346 if (!map.containsKey(key)) {
347 throw new java.lang.IllegalArgumentException();
348 }
349 return map.get(key);
350 }
351
352 private byte memoizedIsInitialized = -1;
353 @java.lang.Override
354 public final boolean isInitialized() {
355 byte isInitialized = memoizedIsInitialized;
356 if (isInitialized == 1) return true;
357 if (isInitialized == 0) return false;
358
359 memoizedIsInitialized = 1;
360 return true;
361 }
362
363 @java.lang.Override
364 public void writeTo(com.google.protobuf.CodedOutputStream output)
365 throws java.io.IOException {
366 if (((bitField0_ & 0x00000001) != 0)) {
367 com.google.protobuf.GeneratedMessage.writeString(output, 1, baselineModelFilePath_);
368 }
369 com.google.protobuf.GeneratedMessage
370 .serializeIntegerMapTo(
371 output,
372 internalGetVariableOverrides(),
373 VariableOverridesDefaultEntryHolder.defaultEntry,
374 2);
375 com.google.protobuf.GeneratedMessage
376 .serializeIntegerMapTo(
377 output,
378 internalGetConstraintOverrides(),
379 ConstraintOverridesDefaultEntryHolder.defaultEntry,
380 3);
381 getUnknownFields().writeTo(output);
382 }
383
384 @java.lang.Override
385 public int getSerializedSize() {
386 int size = memoizedSize;
387 if (size != -1) return size;
388
389 size = 0;
390 if (((bitField0_ & 0x00000001) != 0)) {
391 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, baselineModelFilePath_);
392 }
393 for (java.util.Map.Entry<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> entry
394 : internalGetVariableOverrides().getMap().entrySet()) {
395 com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto>
396 variableOverrides__ = VariableOverridesDefaultEntryHolder.defaultEntry.newBuilderForType()
397 .setKey(entry.getKey())
398 .setValue(entry.getValue())
399 .build();
400 size += com.google.protobuf.CodedOutputStream
401 .computeMessageSize(2, variableOverrides__);
402 }
403 for (java.util.Map.Entry<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> entry
404 : internalGetConstraintOverrides().getMap().entrySet()) {
405 com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto>
406 constraintOverrides__ = ConstraintOverridesDefaultEntryHolder.defaultEntry.newBuilderForType()
407 .setKey(entry.getKey())
408 .setValue(entry.getValue())
409 .build();
410 size += com.google.protobuf.CodedOutputStream
411 .computeMessageSize(3, constraintOverrides__);
412 }
413 size += getUnknownFields().getSerializedSize();
414 memoizedSize = size;
415 return size;
416 }
417
418 @java.lang.Override
419 public boolean equals(final java.lang.Object obj) {
420 if (obj == this) {
421 return true;
422 }
423 if (!(obj instanceof com.google.ortools.linearsolver.MPModelDeltaProto)) {
424 return super.equals(obj);
425 }
426 com.google.ortools.linearsolver.MPModelDeltaProto other = (com.google.ortools.linearsolver.MPModelDeltaProto) obj;
427
428 if (hasBaselineModelFilePath() != other.hasBaselineModelFilePath()) return false;
431 .equals(other.getBaselineModelFilePath())) return false;
432 }
433 if (!internalGetVariableOverrides().equals(
434 other.internalGetVariableOverrides())) return false;
435 if (!internalGetConstraintOverrides().equals(
436 other.internalGetConstraintOverrides())) return false;
437 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
438 return true;
439 }
440
441 @java.lang.Override
442 public int hashCode() {
443 if (memoizedHashCode != 0) {
444 return memoizedHashCode;
445 }
446 int hash = 41;
447 hash = (19 * hash) + getDescriptor().hashCode();
449 hash = (37 * hash) + BASELINE_MODEL_FILE_PATH_FIELD_NUMBER;
450 hash = (53 * hash) + getBaselineModelFilePath().hashCode();
451 }
452 if (!internalGetVariableOverrides().getMap().isEmpty()) {
453 hash = (37 * hash) + VARIABLE_OVERRIDES_FIELD_NUMBER;
454 hash = (53 * hash) + internalGetVariableOverrides().hashCode();
455 }
456 if (!internalGetConstraintOverrides().getMap().isEmpty()) {
457 hash = (37 * hash) + CONSTRAINT_OVERRIDES_FIELD_NUMBER;
458 hash = (53 * hash) + internalGetConstraintOverrides().hashCode();
459 }
460 hash = (29 * hash) + getUnknownFields().hashCode();
461 memoizedHashCode = hash;
462 return hash;
463 }
464
466 java.nio.ByteBuffer data)
467 throws com.google.protobuf.InvalidProtocolBufferException {
468 return PARSER.parseFrom(data);
469 }
471 java.nio.ByteBuffer data,
472 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
473 throws com.google.protobuf.InvalidProtocolBufferException {
474 return PARSER.parseFrom(data, extensionRegistry);
475 }
477 com.google.protobuf.ByteString data)
478 throws com.google.protobuf.InvalidProtocolBufferException {
479 return PARSER.parseFrom(data);
480 }
482 com.google.protobuf.ByteString data,
483 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
484 throws com.google.protobuf.InvalidProtocolBufferException {
485 return PARSER.parseFrom(data, extensionRegistry);
486 }
488 throws com.google.protobuf.InvalidProtocolBufferException {
489 return PARSER.parseFrom(data);
490 }
492 byte[] data,
493 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494 throws com.google.protobuf.InvalidProtocolBufferException {
495 return PARSER.parseFrom(data, extensionRegistry);
496 }
497 public static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(java.io.InputStream input)
498 throws java.io.IOException {
499 return com.google.protobuf.GeneratedMessage
500 .parseWithIOException(PARSER, input);
501 }
503 java.io.InputStream input,
504 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
505 throws java.io.IOException {
506 return com.google.protobuf.GeneratedMessage
507 .parseWithIOException(PARSER, input, extensionRegistry);
508 }
509
511 throws java.io.IOException {
512 return com.google.protobuf.GeneratedMessage
513 .parseDelimitedWithIOException(PARSER, input);
514 }
515
517 java.io.InputStream input,
518 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
519 throws java.io.IOException {
520 return com.google.protobuf.GeneratedMessage
521 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
522 }
524 com.google.protobuf.CodedInputStream input)
525 throws java.io.IOException {
526 return com.google.protobuf.GeneratedMessage
527 .parseWithIOException(PARSER, input);
528 }
530 com.google.protobuf.CodedInputStream input,
531 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
532 throws java.io.IOException {
533 return com.google.protobuf.GeneratedMessage
534 .parseWithIOException(PARSER, input, extensionRegistry);
535 }
536
537 @java.lang.Override
538 public Builder newBuilderForType() { return newBuilder(); }
539 public static Builder newBuilder() {
540 return DEFAULT_INSTANCE.toBuilder();
541 }
542 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelDeltaProto prototype) {
543 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
544 }
545 @java.lang.Override
547 return this == DEFAULT_INSTANCE
548 ? new Builder() : new Builder().mergeFrom(this);
549 }
550
551 @java.lang.Override
553 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
554 Builder builder = new Builder(parent);
555 return builder;
556 }
565 public static final class Builder extends
566 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
567 // @@protoc_insertion_point(builder_implements:operations_research.MPModelDeltaProto)
568 com.google.ortools.linearsolver.MPModelDeltaProtoOrBuilder {
569 public static final com.google.protobuf.Descriptors.Descriptor
571 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_descriptor;
572 }
573
574 @SuppressWarnings({"rawtypes"})
575 protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
576 int number) {
577 switch (number) {
578 case 2:
579 return internalGetVariableOverrides();
580 case 3:
581 return internalGetConstraintOverrides();
582 default:
583 throw new RuntimeException(
584 "Invalid map field number: " + number);
585 }
586 }
587 @SuppressWarnings({"rawtypes"})
588 protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
589 int number) {
590 switch (number) {
591 case 2:
592 return internalGetMutableVariableOverrides();
593 case 3:
594 return internalGetMutableConstraintOverrides();
595 default:
596 throw new RuntimeException(
597 "Invalid map field number: " + number);
598 }
599 }
600 @java.lang.Override
601 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
603 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_fieldAccessorTable
604 .ensureFieldAccessorsInitialized(
605 com.google.ortools.linearsolver.MPModelDeltaProto.class, com.google.ortools.linearsolver.MPModelDeltaProto.Builder.class);
606 }
607
608 // Construct using com.google.ortools.linearsolver.MPModelDeltaProto.newBuilder()
609 private Builder() {
610
611 }
612
613 private Builder(
614 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
615 super(parent);
616
617 }
618 @java.lang.Override
619 public Builder clear() {
620 super.clear();
621 bitField0_ = 0;
622 baselineModelFilePath_ = "";
623 internalGetMutableVariableOverrides().clear();
624 internalGetMutableConstraintOverrides().clear();
625 return this;
626 }
627
628 @java.lang.Override
629 public com.google.protobuf.Descriptors.Descriptor
631 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelDeltaProto_descriptor;
632 }
633
634 @java.lang.Override
636 return com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance();
637 }
638
639 @java.lang.Override
642 if (!result.isInitialized()) {
643 throw newUninitializedMessageException(result);
644 }
645 return result;
646 }
647
648 @java.lang.Override
650 com.google.ortools.linearsolver.MPModelDeltaProto result = new com.google.ortools.linearsolver.MPModelDeltaProto(this);
651 if (bitField0_ != 0) { buildPartial0(result); }
652 onBuilt();
653 return result;
654 }
655
656 private void buildPartial0(com.google.ortools.linearsolver.MPModelDeltaProto result) {
657 int from_bitField0_ = bitField0_;
658 int to_bitField0_ = 0;
659 if (((from_bitField0_ & 0x00000001) != 0)) {
660 result.baselineModelFilePath_ = baselineModelFilePath_;
661 to_bitField0_ |= 0x00000001;
662 }
663 if (((from_bitField0_ & 0x00000002) != 0)) {
664 result.variableOverrides_ = internalGetVariableOverrides().build(VariableOverridesDefaultEntryHolder.defaultEntry);
665 }
666 if (((from_bitField0_ & 0x00000004) != 0)) {
667 result.constraintOverrides_ = internalGetConstraintOverrides().build(ConstraintOverridesDefaultEntryHolder.defaultEntry);
668 }
669 result.bitField0_ |= to_bitField0_;
670 }
671
672 @java.lang.Override
673 public Builder mergeFrom(com.google.protobuf.Message other) {
674 if (other instanceof com.google.ortools.linearsolver.MPModelDeltaProto) {
675 return mergeFrom((com.google.ortools.linearsolver.MPModelDeltaProto)other);
676 } else {
677 super.mergeFrom(other);
678 return this;
679 }
680 }
681
682 public Builder mergeFrom(com.google.ortools.linearsolver.MPModelDeltaProto other) {
683 if (other == com.google.ortools.linearsolver.MPModelDeltaProto.getDefaultInstance()) return this;
684 if (other.hasBaselineModelFilePath()) {
685 baselineModelFilePath_ = other.baselineModelFilePath_;
686 bitField0_ |= 0x00000001;
687 onChanged();
688 }
689 internalGetMutableVariableOverrides().mergeFrom(
690 other.internalGetVariableOverrides());
691 bitField0_ |= 0x00000002;
692 internalGetMutableConstraintOverrides().mergeFrom(
693 other.internalGetConstraintOverrides());
694 bitField0_ |= 0x00000004;
695 this.mergeUnknownFields(other.getUnknownFields());
696 onChanged();
697 return this;
698 }
699
700 @java.lang.Override
701 public final boolean isInitialized() {
702 return true;
703 }
704
705 @java.lang.Override
707 com.google.protobuf.CodedInputStream input,
708 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
709 throws java.io.IOException {
710 if (extensionRegistry == null) {
711 throw new java.lang.NullPointerException();
712 }
713 try {
714 boolean done = false;
715 while (!done) {
716 int tag = input.readTag();
717 switch (tag) {
718 case 0:
719 done = true;
720 break;
721 case 10: {
722 baselineModelFilePath_ = input.readBytes();
723 bitField0_ |= 0x00000001;
724 break;
725 } // case 10
726 case 18: {
727 com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto>
728 variableOverrides__ = input.readMessage(
729 VariableOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
730 internalGetMutableVariableOverrides().ensureBuilderMap().put(
731 variableOverrides__.getKey(), variableOverrides__.getValue());
732 bitField0_ |= 0x00000002;
733 break;
734 } // case 18
735 case 26: {
736 com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto>
737 constraintOverrides__ = input.readMessage(
738 ConstraintOverridesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
739 internalGetMutableConstraintOverrides().ensureBuilderMap().put(
740 constraintOverrides__.getKey(), constraintOverrides__.getValue());
741 bitField0_ |= 0x00000004;
742 break;
743 } // case 26
744 default: {
745 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
746 done = true; // was an endgroup tag
747 }
748 break;
749 } // default:
750 } // switch (tag)
751 } // while (!done)
752 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
753 throw e.unwrapIOException();
754 } finally {
755 onChanged();
756 } // finally
757 return this;
758 }
759 private int bitField0_;
760
761 private java.lang.Object baselineModelFilePath_ = "";
766 public boolean hasBaselineModelFilePath() {
767 return ((bitField0_ & 0x00000001) != 0);
768 }
773 public java.lang.String getBaselineModelFilePath() {
774 java.lang.Object ref = baselineModelFilePath_;
775 if (!(ref instanceof java.lang.String)) {
776 com.google.protobuf.ByteString bs =
777 (com.google.protobuf.ByteString) ref;
778 java.lang.String s = bs.toStringUtf8();
779 if (bs.isValidUtf8()) {
780 baselineModelFilePath_ = s;
781 }
782 return s;
783 } else {
784 return (java.lang.String) ref;
785 }
786 }
791 public com.google.protobuf.ByteString
793 java.lang.Object ref = baselineModelFilePath_;
794 if (ref instanceof String) {
795 com.google.protobuf.ByteString b =
796 com.google.protobuf.ByteString.copyFromUtf8(
797 (java.lang.String) ref);
798 baselineModelFilePath_ = b;
799 return b;
800 } else {
801 return (com.google.protobuf.ByteString) ref;
802 }
803 }
810 java.lang.String value) {
811 if (value == null) { throw new NullPointerException(); }
812 baselineModelFilePath_ = value;
813 bitField0_ |= 0x00000001;
814 onChanged();
815 return this;
816 }
822 baselineModelFilePath_ = getDefaultInstance().getBaselineModelFilePath();
823 bitField0_ = (bitField0_ & ~0x00000001);
824 onChanged();
825 return this;
826 }
833 com.google.protobuf.ByteString value) {
834 if (value == null) { throw new NullPointerException(); }
835 baselineModelFilePath_ = value;
836 bitField0_ |= 0x00000001;
837 onChanged();
838 return this;
839 }
840
841 private static final class VariableOverridesConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder, com.google.ortools.linearsolver.MPVariableProto> {
842 @java.lang.Override
843 public com.google.ortools.linearsolver.MPVariableProto build(com.google.ortools.linearsolver.MPVariableProtoOrBuilder val) {
844 if (val instanceof com.google.ortools.linearsolver.MPVariableProto) { return (com.google.ortools.linearsolver.MPVariableProto) val; }
845 return ((com.google.ortools.linearsolver.MPVariableProto.Builder) val).build();
846 }
847
848 @java.lang.Override
849 public com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> defaultEntry() {
850 return VariableOverridesDefaultEntryHolder.defaultEntry;
851 }
852 };
853 private static final VariableOverridesConverter variableOverridesConverter = new VariableOverridesConverter();
854
855 private com.google.protobuf.MapFieldBuilder<
856 java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder, com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder> variableOverrides_;
857 private com.google.protobuf.MapFieldBuilder<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder, com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder>
858 internalGetVariableOverrides() {
859 if (variableOverrides_ == null) {
860 return new com.google.protobuf.MapFieldBuilder<>(variableOverridesConverter);
861 }
862 return variableOverrides_;
863 }
864 private com.google.protobuf.MapFieldBuilder<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder, com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder>
865 internalGetMutableVariableOverrides() {
866 if (variableOverrides_ == null) {
867 variableOverrides_ = new com.google.protobuf.MapFieldBuilder<>(variableOverridesConverter);
868 }
869 bitField0_ |= 0x00000002;
870 onChanged();
871 return variableOverrides_;
872 }
874 return internalGetVariableOverrides().ensureBuilderMap().size();
875 }
889 @java.lang.Override
891 int key) {
892
893 return internalGetVariableOverrides().ensureBuilderMap().containsKey(key);
894 }
898 @java.lang.Override
899 @java.lang.Deprecated
900 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverrides() {
902 }
916 @java.lang.Override
917 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> getVariableOverridesMap() {
918 return internalGetVariableOverrides().getImmutableMap();
919 }
933 @java.lang.Override
934 public /* nullable */
936 int key,
937 /* nullable */
938com.google.ortools.linearsolver.MPVariableProto defaultValue) {
939
940 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> map = internalGetMutableVariableOverrides().ensureBuilderMap();
941 return map.containsKey(key) ? variableOverridesConverter.build(map.get(key)) : defaultValue;
942 }
956 @java.lang.Override
958 int key) {
959
960 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> map = internalGetMutableVariableOverrides().ensureBuilderMap();
961 if (!map.containsKey(key)) {
962 throw new java.lang.IllegalArgumentException();
963 }
964 return variableOverridesConverter.build(map.get(key));
965 }
967 bitField0_ = (bitField0_ & ~0x00000002);
968 internalGetMutableVariableOverrides().clear();
969 return this;
970 }
985 int key) {
986
987 internalGetMutableVariableOverrides().ensureBuilderMap()
988 .remove(key);
989 return this;
990 }
994 @java.lang.Deprecated
995 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto>
997 bitField0_ |= 0x00000002;
998 return internalGetMutableVariableOverrides().ensureMessageMap();
999 }
1014 int key,
1015 com.google.ortools.linearsolver.MPVariableProto value) {
1016
1017 if (value == null) { throw new NullPointerException("map value"); }
1018 internalGetMutableVariableOverrides().ensureBuilderMap()
1019 .put(key, value);
1020 bitField0_ |= 0x00000002;
1021 return this;
1022 }
1037 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> values) {
1038 for (java.util.Map.Entry<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto> e : values.entrySet()) {
1039 if (e.getKey() == null || e.getValue() == null) {
1040 throw new NullPointerException();
1041 }
1042 }
1043 internalGetMutableVariableOverrides().ensureBuilderMap()
1044 .putAll(values);
1045 bitField0_ |= 0x00000002;
1046 return this;
1047 }
1062 int key) {
1063 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> builderMap = internalGetMutableVariableOverrides().ensureBuilderMap();
1065 if (entry == null) {
1066 entry = com.google.ortools.linearsolver.MPVariableProto.newBuilder();
1067 builderMap.put(key, entry);
1068 }
1069 if (entry instanceof com.google.ortools.linearsolver.MPVariableProto) {
1070 entry = ((com.google.ortools.linearsolver.MPVariableProto) entry).toBuilder();
1071 builderMap.put(key, entry);
1072 }
1073 return (com.google.ortools.linearsolver.MPVariableProto.Builder) entry;
1074 }
1075
1076 private static final class ConstraintOverridesConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder, com.google.ortools.linearsolver.MPConstraintProto> {
1077 @java.lang.Override
1078 public com.google.ortools.linearsolver.MPConstraintProto build(com.google.ortools.linearsolver.MPConstraintProtoOrBuilder val) {
1079 if (val instanceof com.google.ortools.linearsolver.MPConstraintProto) { return (com.google.ortools.linearsolver.MPConstraintProto) val; }
1080 return ((com.google.ortools.linearsolver.MPConstraintProto.Builder) val).build();
1081 }
1082
1083 @java.lang.Override
1084 public com.google.protobuf.MapEntry<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> defaultEntry() {
1085 return ConstraintOverridesDefaultEntryHolder.defaultEntry;
1086 }
1087 };
1088 private static final ConstraintOverridesConverter constraintOverridesConverter = new ConstraintOverridesConverter();
1089
1090 private com.google.protobuf.MapFieldBuilder<
1091 java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder, com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder> constraintOverrides_;
1092 private com.google.protobuf.MapFieldBuilder<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder, com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder>
1093 internalGetConstraintOverrides() {
1094 if (constraintOverrides_ == null) {
1095 return new com.google.protobuf.MapFieldBuilder<>(constraintOverridesConverter);
1096 }
1097 return constraintOverrides_;
1098 }
1099 private com.google.protobuf.MapFieldBuilder<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder, com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder>
1100 internalGetMutableConstraintOverrides() {
1101 if (constraintOverrides_ == null) {
1102 constraintOverrides_ = new com.google.protobuf.MapFieldBuilder<>(constraintOverridesConverter);
1103 }
1104 bitField0_ |= 0x00000004;
1105 onChanged();
1106 return constraintOverrides_;
1107 }
1109 return internalGetConstraintOverrides().ensureBuilderMap().size();
1110 }
1124 @java.lang.Override
1126 int key) {
1127
1128 return internalGetConstraintOverrides().ensureBuilderMap().containsKey(key);
1129 }
1133 @java.lang.Override
1134 @java.lang.Deprecated
1135 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverrides() {
1137 }
1151 @java.lang.Override
1152 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> getConstraintOverridesMap() {
1153 return internalGetConstraintOverrides().getImmutableMap();
1154 }
1168 @java.lang.Override
1169 public /* nullable */
1171 int key,
1172 /* nullable */
1173com.google.ortools.linearsolver.MPConstraintProto defaultValue) {
1174
1175 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> map = internalGetMutableConstraintOverrides().ensureBuilderMap();
1176 return map.containsKey(key) ? constraintOverridesConverter.build(map.get(key)) : defaultValue;
1177 }
1191 @java.lang.Override
1193 int key) {
1194
1195 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> map = internalGetMutableConstraintOverrides().ensureBuilderMap();
1196 if (!map.containsKey(key)) {
1197 throw new java.lang.IllegalArgumentException();
1198 }
1199 return constraintOverridesConverter.build(map.get(key));
1200 }
1202 bitField0_ = (bitField0_ & ~0x00000004);
1203 internalGetMutableConstraintOverrides().clear();
1204 return this;
1205 }
1220 int key) {
1221
1222 internalGetMutableConstraintOverrides().ensureBuilderMap()
1223 .remove(key);
1224 return this;
1225 }
1229 @java.lang.Deprecated
1230 public java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto>
1232 bitField0_ |= 0x00000004;
1233 return internalGetMutableConstraintOverrides().ensureMessageMap();
1234 }
1249 int key,
1250 com.google.ortools.linearsolver.MPConstraintProto value) {
1251
1252 if (value == null) { throw new NullPointerException("map value"); }
1253 internalGetMutableConstraintOverrides().ensureBuilderMap()
1254 .put(key, value);
1255 bitField0_ |= 0x00000004;
1256 return this;
1257 }
1272 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> values) {
1273 for (java.util.Map.Entry<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto> e : values.entrySet()) {
1274 if (e.getKey() == null || e.getValue() == null) {
1275 throw new NullPointerException();
1276 }
1277 }
1278 internalGetMutableConstraintOverrides().ensureBuilderMap()
1279 .putAll(values);
1280 bitField0_ |= 0x00000004;
1281 return this;
1282 }
1297 int key) {
1298 java.util.Map<java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> builderMap = internalGetMutableConstraintOverrides().ensureBuilderMap();
1300 if (entry == null) {
1301 entry = com.google.ortools.linearsolver.MPConstraintProto.newBuilder();
1302 builderMap.put(key, entry);
1303 }
1304 if (entry instanceof com.google.ortools.linearsolver.MPConstraintProto) {
1305 entry = ((com.google.ortools.linearsolver.MPConstraintProto) entry).toBuilder();
1306 builderMap.put(key, entry);
1307 }
1308 return (com.google.ortools.linearsolver.MPConstraintProto.Builder) entry;
1309 }
1310
1311 // @@protoc_insertion_point(builder_scope:operations_research.MPModelDeltaProto)
1312 }
1313
1314 // @@protoc_insertion_point(class_scope:operations_research.MPModelDeltaProto)
1315 private static final com.google.ortools.linearsolver.MPModelDeltaProto DEFAULT_INSTANCE;
1316 static {
1317 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPModelDeltaProto();
1318 }
1319
1321 return DEFAULT_INSTANCE;
1322 }
1323
1324 private static final com.google.protobuf.Parser<MPModelDeltaProto>
1325 PARSER = new com.google.protobuf.AbstractParser<MPModelDeltaProto>() {
1326 @java.lang.Override
1327 public MPModelDeltaProto parsePartialFrom(
1328 com.google.protobuf.CodedInputStream input,
1329 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1330 throws com.google.protobuf.InvalidProtocolBufferException {
1331 Builder builder = newBuilder();
1332 try {
1333 builder.mergeFrom(input, extensionRegistry);
1334 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1335 throw e.setUnfinishedMessage(builder.buildPartial());
1336 } catch (com.google.protobuf.UninitializedMessageException e) {
1337 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1338 } catch (java.io.IOException e) {
1339 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1340 .setUnfinishedMessage(builder.buildPartial());
1341 }
1342 return builder.buildPartial();
1343 }
1344 };
1345
1346 public static com.google.protobuf.Parser<MPModelDeltaProto> parser() {
1347 return PARSER;
1348 }
1349
1350 @java.lang.Override
1351 public com.google.protobuf.Parser<MPModelDeltaProto> getParserForType() {
1352 return PARSER;
1353 }
1354
1355 @java.lang.Override
1359
1360}
1361
com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrThrow(int key)
com.google.ortools.linearsolver.MPModelDeltaProto build()
com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Builder putConstraintOverrides(int key, com.google.ortools.linearsolver.MPConstraintProto value)
com.google.ortools.linearsolver.MPConstraintProto.Builder putConstraintOverridesBuilderIfAbsent(int key)
com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrDefault(int key, com.google.ortools.linearsolver.MPVariableProto defaultValue)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > getConstraintOverridesMap()
com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > getConstraintOverrides()
com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrThrow(int key)
Builder mergeFrom(com.google.ortools.linearsolver.MPModelDeltaProto other)
Builder putAllVariableOverrides(java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > values)
Builder putAllConstraintOverrides(java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > values)
com.google.ortools.linearsolver.MPModelDeltaProto buildPartial()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > getVariableOverrides()
com.google.ortools.linearsolver.MPVariableProto.Builder putVariableOverridesBuilderIfAbsent(int key)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > getVariableOverridesMap()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > getMutableConstraintOverrides()
Builder setBaselineModelFilePathBytes(com.google.protobuf.ByteString value)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > getMutableVariableOverrides()
Builder mergeFrom(com.google.protobuf.Message other)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPModelDeltaProto getDefaultInstanceForType()
com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrDefault(int key, com.google.ortools.linearsolver.MPConstraintProto defaultValue)
Builder putVariableOverrides(int key, com.google.ortools.linearsolver.MPVariableProto value)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(java.nio.ByteBuffer data)
com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > getVariableOverridesMap()
com.google.protobuf.Parser< MPModelDeltaProto > getParserForType()
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(byte[] data)
com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrDefault(int key, com.google.ortools.linearsolver.MPConstraintProto defaultValue)
static Builder newBuilder(com.google.ortools.linearsolver.MPModelDeltaProto prototype)
static com.google.protobuf.Parser< MPModelDeltaProto > parser()
com.google.ortools.linearsolver.MPConstraintProto getConstraintOverridesOrThrow(int key)
com.google.ortools.linearsolver.MPModelDeltaProto getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > getConstraintOverridesMap()
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPConstraintProto > getConstraintOverrides()
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(com.google.protobuf.ByteString data)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPModelDeltaProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelDeltaProto getDefaultInstance()
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(java.io.InputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.ByteString getBaselineModelFilePathBytes()
static com.google.ortools.linearsolver.MPModelDeltaProto parseDelimitedFrom(java.io.InputStream input)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.linearsolver.MPModelDeltaProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrDefault(int key, com.google.ortools.linearsolver.MPVariableProto defaultValue)
com.google.ortools.linearsolver.MPVariableProto getVariableOverridesOrThrow(int key)
java.util.Map< java.lang.Integer, com.google.ortools.linearsolver.MPVariableProto > getVariableOverrides()