All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.linearsolver.MPGeneralConstraintProto Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: ortools/linear_solver/linear_solver.proto

package com.google.ortools.linearsolver;

/**
 * 
 * General constraints. See each individual proto type for more information.
 * 
* * Protobuf type {@code operations_research.MPGeneralConstraintProto} */ public final class MPGeneralConstraintProto extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:operations_research.MPGeneralConstraintProto) MPGeneralConstraintProtoOrBuilder { private static final long serialVersionUID = 0L; // Use MPGeneralConstraintProto.newBuilder() to construct. private MPGeneralConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MPGeneralConstraintProto() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MPGeneralConstraintProto(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MPGeneralConstraintProto( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; name_ = bs; break; } case 18: { com.google.ortools.linearsolver.MPIndicatorConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 2) { subBuilder = ((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPIndicatorConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 2; break; } case 26: { com.google.ortools.linearsolver.MPSosConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 3) { subBuilder = ((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPSosConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 3; break; } case 34: { com.google.ortools.linearsolver.MPQuadraticConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 4) { subBuilder = ((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPQuadraticConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 4; break; } case 42: { com.google.ortools.linearsolver.MPAbsConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 5) { subBuilder = ((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPAbsConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 5; break; } case 50: { com.google.ortools.linearsolver.MPArrayConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 6) { subBuilder = ((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPArrayConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 6; break; } case 58: { com.google.ortools.linearsolver.MPArrayConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 7) { subBuilder = ((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPArrayConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 7; break; } case 66: { com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 8) { subBuilder = ((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 8; break; } case 74: { com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder subBuilder = null; if (generalConstraintCase_ == 9) { subBuilder = ((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_).toBuilder(); } generalConstraint_ = input.readMessage(com.google.ortools.linearsolver.MPArrayWithConstantConstraint.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); generalConstraint_ = subBuilder.buildPartial(); } generalConstraintCase_ = 9; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class); } private int bitField0_; private int generalConstraintCase_ = 0; private java.lang.Object generalConstraint_; public enum GeneralConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { INDICATOR_CONSTRAINT(2), SOS_CONSTRAINT(3), QUADRATIC_CONSTRAINT(4), ABS_CONSTRAINT(5), AND_CONSTRAINT(6), OR_CONSTRAINT(7), MIN_CONSTRAINT(8), MAX_CONSTRAINT(9), GENERALCONSTRAINT_NOT_SET(0); private final int value; private GeneralConstraintCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static GeneralConstraintCase valueOf(int value) { return forNumber(value); } public static GeneralConstraintCase forNumber(int value) { switch (value) { case 2: return INDICATOR_CONSTRAINT; case 3: return SOS_CONSTRAINT; case 4: return QUADRATIC_CONSTRAINT; case 5: return ABS_CONSTRAINT; case 6: return AND_CONSTRAINT; case 7: return OR_CONSTRAINT; case 8: return MIN_CONSTRAINT; case 9: return MAX_CONSTRAINT; case 0: return GENERALCONSTRAINT_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public GeneralConstraintCase getGeneralConstraintCase() { return GeneralConstraintCase.forNumber( generalConstraintCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
   * The name of the constraint.
   * 
* * optional string name = 1 [default = ""]; * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The name of the constraint.
   * 
* * optional string name = 1 [default = ""]; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; } return s; } } /** *
   * The name of the constraint.
   * 
* * optional string name = 1 [default = ""]; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INDICATOR_CONSTRAINT_FIELD_NUMBER = 2; /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; * @return Whether the indicatorConstraint field is set. */ @java.lang.Override public boolean hasIndicatorConstraint() { return generalConstraintCase_ == 2; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; * @return The indicatorConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint() { if (generalConstraintCase_ == 2) { return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ @java.lang.Override public com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder() { if (generalConstraintCase_ == 2) { return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } public static final int SOS_CONSTRAINT_FIELD_NUMBER = 3; /** * .operations_research.MPSosConstraint sos_constraint = 3; * @return Whether the sosConstraint field is set. */ @java.lang.Override public boolean hasSosConstraint() { return generalConstraintCase_ == 3; } /** * .operations_research.MPSosConstraint sos_constraint = 3; * @return The sosConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPSosConstraint getSosConstraint() { if (generalConstraintCase_ == 3) { return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ @java.lang.Override public com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder() { if (generalConstraintCase_ == 3) { return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } public static final int QUADRATIC_CONSTRAINT_FIELD_NUMBER = 4; /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; * @return Whether the quadraticConstraint field is set. */ @java.lang.Override public boolean hasQuadraticConstraint() { return generalConstraintCase_ == 4; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; * @return The quadraticConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint() { if (generalConstraintCase_ == 4) { return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ @java.lang.Override public com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder() { if (generalConstraintCase_ == 4) { return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } public static final int ABS_CONSTRAINT_FIELD_NUMBER = 5; /** * .operations_research.MPAbsConstraint abs_constraint = 5; * @return Whether the absConstraint field is set. */ @java.lang.Override public boolean hasAbsConstraint() { return generalConstraintCase_ == 5; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; * @return The absConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint() { if (generalConstraintCase_ == 5) { return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ @java.lang.Override public com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder() { if (generalConstraintCase_ == 5) { return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } public static final int AND_CONSTRAINT_FIELD_NUMBER = 6; /** *
   * All variables in "and" constraints must be Boolean.
   * resultant_var = and(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint and_constraint = 6; * @return Whether the andConstraint field is set. */ @java.lang.Override public boolean hasAndConstraint() { return generalConstraintCase_ == 6; } /** *
   * All variables in "and" constraints must be Boolean.
   * resultant_var = and(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint and_constraint = 6; * @return The andConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint() { if (generalConstraintCase_ == 6) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } /** *
   * All variables in "and" constraints must be Boolean.
   * resultant_var = and(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder() { if (generalConstraintCase_ == 6) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } public static final int OR_CONSTRAINT_FIELD_NUMBER = 7; /** *
   * All variables in "or" constraints must be Boolean.
   * resultant_var = or(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint or_constraint = 7; * @return Whether the orConstraint field is set. */ @java.lang.Override public boolean hasOrConstraint() { return generalConstraintCase_ == 7; } /** *
   * All variables in "or" constraints must be Boolean.
   * resultant_var = or(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint or_constraint = 7; * @return The orConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint() { if (generalConstraintCase_ == 7) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } /** *
   * All variables in "or" constraints must be Boolean.
   * resultant_var = or(var_1, var_2... var_n)
   * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder() { if (generalConstraintCase_ == 7) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } public static final int MIN_CONSTRAINT_FIELD_NUMBER = 8; /** *
   * resultant_var = min(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; * @return Whether the minConstraint field is set. */ @java.lang.Override public boolean hasMinConstraint() { return generalConstraintCase_ == 8; } /** *
   * resultant_var = min(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; * @return The minConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint() { if (generalConstraintCase_ == 8) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } /** *
   * resultant_var = min(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder() { if (generalConstraintCase_ == 8) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } public static final int MAX_CONSTRAINT_FIELD_NUMBER = 9; /** *
   * resultant_var = max(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; * @return Whether the maxConstraint field is set. */ @java.lang.Override public boolean hasMaxConstraint() { return generalConstraintCase_ == 9; } /** *
   * resultant_var = max(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; * @return The maxConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint() { if (generalConstraintCase_ == 9) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } /** *
   * resultant_var = max(var_1, var_2, ..., constant)
   * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder() { if (generalConstraintCase_ == 9) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (generalConstraintCase_ == 2) { output.writeMessage(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_); } if (generalConstraintCase_ == 3) { output.writeMessage(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_); } if (generalConstraintCase_ == 4) { output.writeMessage(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_); } if (generalConstraintCase_ == 5) { output.writeMessage(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_); } if (generalConstraintCase_ == 6) { output.writeMessage(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); } if (generalConstraintCase_ == 7) { output.writeMessage(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); } if (generalConstraintCase_ == 8) { output.writeMessage(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); } if (generalConstraintCase_ == 9) { output.writeMessage(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (generalConstraintCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_); } if (generalConstraintCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_); } if (generalConstraintCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_); } if (generalConstraintCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_); } if (generalConstraintCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); } if (generalConstraintCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_); } if (generalConstraintCase_ == 8) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); } if (generalConstraintCase_ == 9) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto)) { return super.equals(obj); } com.google.ortools.linearsolver.MPGeneralConstraintProto other = (com.google.ortools.linearsolver.MPGeneralConstraintProto) obj; if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() .equals(other.getName())) return false; } if (!getGeneralConstraintCase().equals(other.getGeneralConstraintCase())) return false; switch (generalConstraintCase_) { case 2: if (!getIndicatorConstraint() .equals(other.getIndicatorConstraint())) return false; break; case 3: if (!getSosConstraint() .equals(other.getSosConstraint())) return false; break; case 4: if (!getQuadraticConstraint() .equals(other.getQuadraticConstraint())) return false; break; case 5: if (!getAbsConstraint() .equals(other.getAbsConstraint())) return false; break; case 6: if (!getAndConstraint() .equals(other.getAndConstraint())) return false; break; case 7: if (!getOrConstraint() .equals(other.getOrConstraint())) return false; break; case 8: if (!getMinConstraint() .equals(other.getMinConstraint())) return false; break; case 9: if (!getMaxConstraint() .equals(other.getMaxConstraint())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } switch (generalConstraintCase_) { case 2: hash = (37 * hash) + INDICATOR_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getIndicatorConstraint().hashCode(); break; case 3: hash = (37 * hash) + SOS_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getSosConstraint().hashCode(); break; case 4: hash = (37 * hash) + QUADRATIC_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getQuadraticConstraint().hashCode(); break; case 5: hash = (37 * hash) + ABS_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getAbsConstraint().hashCode(); break; case 6: hash = (37 * hash) + AND_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getAndConstraint().hashCode(); break; case 7: hash = (37 * hash) + OR_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getOrConstraint().hashCode(); break; case 8: hash = (37 * hash) + MIN_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getMinConstraint().hashCode(); break; case 9: hash = (37 * hash) + MAX_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getMaxConstraint().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.ortools.linearsolver.MPGeneralConstraintProto prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * General constraints. See each individual proto type for more information.
   * 
* * Protobuf type {@code operations_research.MPGeneralConstraintProto} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:operations_research.MPGeneralConstraintProto) com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.ortools.linearsolver.MPGeneralConstraintProto.class, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder.class); } // Construct using com.google.ortools.linearsolver.MPGeneralConstraintProto.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; bitField0_ = (bitField0_ & ~0x00000001); generalConstraintCase_ = 0; generalConstraint_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPGeneralConstraintProto_descriptor; } @java.lang.Override public com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType() { return com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance(); } @java.lang.Override public com.google.ortools.linearsolver.MPGeneralConstraintProto build() { com.google.ortools.linearsolver.MPGeneralConstraintProto result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.ortools.linearsolver.MPGeneralConstraintProto buildPartial() { com.google.ortools.linearsolver.MPGeneralConstraintProto result = new com.google.ortools.linearsolver.MPGeneralConstraintProto(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (generalConstraintCase_ == 2) { if (indicatorConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = indicatorConstraintBuilder_.build(); } } if (generalConstraintCase_ == 3) { if (sosConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = sosConstraintBuilder_.build(); } } if (generalConstraintCase_ == 4) { if (quadraticConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = quadraticConstraintBuilder_.build(); } } if (generalConstraintCase_ == 5) { if (absConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = absConstraintBuilder_.build(); } } if (generalConstraintCase_ == 6) { if (andConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = andConstraintBuilder_.build(); } } if (generalConstraintCase_ == 7) { if (orConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = orConstraintBuilder_.build(); } } if (generalConstraintCase_ == 8) { if (minConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = minConstraintBuilder_.build(); } } if (generalConstraintCase_ == 9) { if (maxConstraintBuilder_ == null) { result.generalConstraint_ = generalConstraint_; } else { result.generalConstraint_ = maxConstraintBuilder_.build(); } } result.bitField0_ = to_bitField0_; result.generalConstraintCase_ = generalConstraintCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.ortools.linearsolver.MPGeneralConstraintProto) { return mergeFrom((com.google.ortools.linearsolver.MPGeneralConstraintProto)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.ortools.linearsolver.MPGeneralConstraintProto other) { if (other == com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } switch (other.getGeneralConstraintCase()) { case INDICATOR_CONSTRAINT: { mergeIndicatorConstraint(other.getIndicatorConstraint()); break; } case SOS_CONSTRAINT: { mergeSosConstraint(other.getSosConstraint()); break; } case QUADRATIC_CONSTRAINT: { mergeQuadraticConstraint(other.getQuadraticConstraint()); break; } case ABS_CONSTRAINT: { mergeAbsConstraint(other.getAbsConstraint()); break; } case AND_CONSTRAINT: { mergeAndConstraint(other.getAndConstraint()); break; } case OR_CONSTRAINT: { mergeOrConstraint(other.getOrConstraint()); break; } case MIN_CONSTRAINT: { mergeMinConstraint(other.getMinConstraint()); break; } case MAX_CONSTRAINT: { mergeMaxConstraint(other.getMaxConstraint()); break; } case GENERALCONSTRAINT_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.ortools.linearsolver.MPGeneralConstraintProto parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.ortools.linearsolver.MPGeneralConstraintProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int generalConstraintCase_ = 0; private java.lang.Object generalConstraint_; public GeneralConstraintCase getGeneralConstraintCase() { return GeneralConstraintCase.forNumber( generalConstraintCase_); } public Builder clearGeneralConstraint() { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @return This builder for chaining. */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000001); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * The name of the constraint.
     * 
* * optional string name = 1 [default = ""]; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder> indicatorConstraintBuilder_; /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; * @return Whether the indicatorConstraint field is set. */ @java.lang.Override public boolean hasIndicatorConstraint() { return generalConstraintCase_ == 2; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; * @return The indicatorConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPIndicatorConstraint getIndicatorConstraint() { if (indicatorConstraintBuilder_ == null) { if (generalConstraintCase_ == 2) { return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 2) { return indicatorConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ public Builder setIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value) { if (indicatorConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { indicatorConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 2; return this; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ public Builder setIndicatorConstraint( com.google.ortools.linearsolver.MPIndicatorConstraint.Builder builderForValue) { if (indicatorConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { indicatorConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 2; return this; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ public Builder mergeIndicatorConstraint(com.google.ortools.linearsolver.MPIndicatorConstraint value) { if (indicatorConstraintBuilder_ == null) { if (generalConstraintCase_ == 2 && generalConstraint_ != com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.newBuilder((com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 2) { indicatorConstraintBuilder_.mergeFrom(value); } indicatorConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 2; return this; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ public Builder clearIndicatorConstraint() { if (indicatorConstraintBuilder_ == null) { if (generalConstraintCase_ == 2) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 2) { generalConstraintCase_ = 0; generalConstraint_ = null; } indicatorConstraintBuilder_.clear(); } return this; } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ public com.google.ortools.linearsolver.MPIndicatorConstraint.Builder getIndicatorConstraintBuilder() { return getIndicatorConstraintFieldBuilder().getBuilder(); } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ @java.lang.Override public com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder getIndicatorConstraintOrBuilder() { if ((generalConstraintCase_ == 2) && (indicatorConstraintBuilder_ != null)) { return indicatorConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 2) { return (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } } /** * .operations_research.MPIndicatorConstraint indicator_constraint = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder> getIndicatorConstraintFieldBuilder() { if (indicatorConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 2)) { generalConstraint_ = com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance(); } indicatorConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPIndicatorConstraint, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder, com.google.ortools.linearsolver.MPIndicatorConstraintOrBuilder>( (com.google.ortools.linearsolver.MPIndicatorConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 2; onChanged();; return indicatorConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder> sosConstraintBuilder_; /** * .operations_research.MPSosConstraint sos_constraint = 3; * @return Whether the sosConstraint field is set. */ @java.lang.Override public boolean hasSosConstraint() { return generalConstraintCase_ == 3; } /** * .operations_research.MPSosConstraint sos_constraint = 3; * @return The sosConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPSosConstraint getSosConstraint() { if (sosConstraintBuilder_ == null) { if (generalConstraintCase_ == 3) { return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 3) { return sosConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ public Builder setSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value) { if (sosConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { sosConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 3; return this; } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ public Builder setSosConstraint( com.google.ortools.linearsolver.MPSosConstraint.Builder builderForValue) { if (sosConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { sosConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 3; return this; } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ public Builder mergeSosConstraint(com.google.ortools.linearsolver.MPSosConstraint value) { if (sosConstraintBuilder_ == null) { if (generalConstraintCase_ == 3 && generalConstraint_ != com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.newBuilder((com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 3) { sosConstraintBuilder_.mergeFrom(value); } sosConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 3; return this; } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ public Builder clearSosConstraint() { if (sosConstraintBuilder_ == null) { if (generalConstraintCase_ == 3) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 3) { generalConstraintCase_ = 0; generalConstraint_ = null; } sosConstraintBuilder_.clear(); } return this; } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ public com.google.ortools.linearsolver.MPSosConstraint.Builder getSosConstraintBuilder() { return getSosConstraintFieldBuilder().getBuilder(); } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ @java.lang.Override public com.google.ortools.linearsolver.MPSosConstraintOrBuilder getSosConstraintOrBuilder() { if ((generalConstraintCase_ == 3) && (sosConstraintBuilder_ != null)) { return sosConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 3) { return (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } } /** * .operations_research.MPSosConstraint sos_constraint = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder> getSosConstraintFieldBuilder() { if (sosConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 3)) { generalConstraint_ = com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstance(); } sosConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPSosConstraint, com.google.ortools.linearsolver.MPSosConstraint.Builder, com.google.ortools.linearsolver.MPSosConstraintOrBuilder>( (com.google.ortools.linearsolver.MPSosConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 3; onChanged();; return sosConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder> quadraticConstraintBuilder_; /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; * @return Whether the quadraticConstraint field is set. */ @java.lang.Override public boolean hasQuadraticConstraint() { return generalConstraintCase_ == 4; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; * @return The quadraticConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPQuadraticConstraint getQuadraticConstraint() { if (quadraticConstraintBuilder_ == null) { if (generalConstraintCase_ == 4) { return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 4) { return quadraticConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ public Builder setQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value) { if (quadraticConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { quadraticConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 4; return this; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ public Builder setQuadraticConstraint( com.google.ortools.linearsolver.MPQuadraticConstraint.Builder builderForValue) { if (quadraticConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { quadraticConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 4; return this; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ public Builder mergeQuadraticConstraint(com.google.ortools.linearsolver.MPQuadraticConstraint value) { if (quadraticConstraintBuilder_ == null) { if (generalConstraintCase_ == 4 && generalConstraint_ != com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.newBuilder((com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 4) { quadraticConstraintBuilder_.mergeFrom(value); } quadraticConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 4; return this; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ public Builder clearQuadraticConstraint() { if (quadraticConstraintBuilder_ == null) { if (generalConstraintCase_ == 4) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 4) { generalConstraintCase_ = 0; generalConstraint_ = null; } quadraticConstraintBuilder_.clear(); } return this; } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ public com.google.ortools.linearsolver.MPQuadraticConstraint.Builder getQuadraticConstraintBuilder() { return getQuadraticConstraintFieldBuilder().getBuilder(); } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ @java.lang.Override public com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder getQuadraticConstraintOrBuilder() { if ((generalConstraintCase_ == 4) && (quadraticConstraintBuilder_ != null)) { return quadraticConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 4) { return (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } } /** * .operations_research.MPQuadraticConstraint quadratic_constraint = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder> getQuadraticConstraintFieldBuilder() { if (quadraticConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 4)) { generalConstraint_ = com.google.ortools.linearsolver.MPQuadraticConstraint.getDefaultInstance(); } quadraticConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPQuadraticConstraint, com.google.ortools.linearsolver.MPQuadraticConstraint.Builder, com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder>( (com.google.ortools.linearsolver.MPQuadraticConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 4; onChanged();; return quadraticConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder> absConstraintBuilder_; /** * .operations_research.MPAbsConstraint abs_constraint = 5; * @return Whether the absConstraint field is set. */ @java.lang.Override public boolean hasAbsConstraint() { return generalConstraintCase_ == 5; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; * @return The absConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPAbsConstraint getAbsConstraint() { if (absConstraintBuilder_ == null) { if (generalConstraintCase_ == 5) { return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 5) { return absConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ public Builder setAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value) { if (absConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { absConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 5; return this; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ public Builder setAbsConstraint( com.google.ortools.linearsolver.MPAbsConstraint.Builder builderForValue) { if (absConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { absConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 5; return this; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ public Builder mergeAbsConstraint(com.google.ortools.linearsolver.MPAbsConstraint value) { if (absConstraintBuilder_ == null) { if (generalConstraintCase_ == 5 && generalConstraint_ != com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.newBuilder((com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 5) { absConstraintBuilder_.mergeFrom(value); } absConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 5; return this; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ public Builder clearAbsConstraint() { if (absConstraintBuilder_ == null) { if (generalConstraintCase_ == 5) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 5) { generalConstraintCase_ = 0; generalConstraint_ = null; } absConstraintBuilder_.clear(); } return this; } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ public com.google.ortools.linearsolver.MPAbsConstraint.Builder getAbsConstraintBuilder() { return getAbsConstraintFieldBuilder().getBuilder(); } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ @java.lang.Override public com.google.ortools.linearsolver.MPAbsConstraintOrBuilder getAbsConstraintOrBuilder() { if ((generalConstraintCase_ == 5) && (absConstraintBuilder_ != null)) { return absConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 5) { return (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } } /** * .operations_research.MPAbsConstraint abs_constraint = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder> getAbsConstraintFieldBuilder() { if (absConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 5)) { generalConstraint_ = com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance(); } absConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPAbsConstraint, com.google.ortools.linearsolver.MPAbsConstraint.Builder, com.google.ortools.linearsolver.MPAbsConstraintOrBuilder>( (com.google.ortools.linearsolver.MPAbsConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 5; onChanged();; return absConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> andConstraintBuilder_; /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; * @return Whether the andConstraint field is set. */ @java.lang.Override public boolean hasAndConstraint() { return generalConstraintCase_ == 6; } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; * @return The andConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraint getAndConstraint() { if (andConstraintBuilder_ == null) { if (generalConstraintCase_ == 6) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 6) { return andConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ public Builder setAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) { if (andConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { andConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 6; return this; } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ public Builder setAndConstraint( com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) { if (andConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { andConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 6; return this; } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ public Builder mergeAndConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) { if (andConstraintBuilder_ == null) { if (generalConstraintCase_ == 6 && generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 6) { andConstraintBuilder_.mergeFrom(value); } andConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 6; return this; } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ public Builder clearAndConstraint() { if (andConstraintBuilder_ == null) { if (generalConstraintCase_ == 6) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 6) { generalConstraintCase_ = 0; generalConstraint_ = null; } andConstraintBuilder_.clear(); } return this; } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ public com.google.ortools.linearsolver.MPArrayConstraint.Builder getAndConstraintBuilder() { return getAndConstraintFieldBuilder().getBuilder(); } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getAndConstraintOrBuilder() { if ((generalConstraintCase_ == 6) && (andConstraintBuilder_ != null)) { return andConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 6) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } } /** *
     * All variables in "and" constraints must be Boolean.
     * resultant_var = and(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint and_constraint = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> getAndConstraintFieldBuilder() { if (andConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 6)) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } andConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>( (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 6; onChanged();; return andConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> orConstraintBuilder_; /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; * @return Whether the orConstraint field is set. */ @java.lang.Override public boolean hasOrConstraint() { return generalConstraintCase_ == 7; } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; * @return The orConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraint getOrConstraint() { if (orConstraintBuilder_ == null) { if (generalConstraintCase_ == 7) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 7) { return orConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ public Builder setOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) { if (orConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { orConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 7; return this; } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ public Builder setOrConstraint( com.google.ortools.linearsolver.MPArrayConstraint.Builder builderForValue) { if (orConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { orConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 7; return this; } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ public Builder mergeOrConstraint(com.google.ortools.linearsolver.MPArrayConstraint value) { if (orConstraintBuilder_ == null) { if (generalConstraintCase_ == 7 && generalConstraint_ != com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 7) { orConstraintBuilder_.mergeFrom(value); } orConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 7; return this; } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ public Builder clearOrConstraint() { if (orConstraintBuilder_ == null) { if (generalConstraintCase_ == 7) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 7) { generalConstraintCase_ = 0; generalConstraint_ = null; } orConstraintBuilder_.clear(); } return this; } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ public com.google.ortools.linearsolver.MPArrayConstraint.Builder getOrConstraintBuilder() { return getOrConstraintFieldBuilder().getBuilder(); } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayConstraintOrBuilder getOrConstraintOrBuilder() { if ((generalConstraintCase_ == 7) && (orConstraintBuilder_ != null)) { return orConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 7) { return (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } } /** *
     * All variables in "or" constraints must be Boolean.
     * resultant_var = or(var_1, var_2... var_n)
     * 
* * .operations_research.MPArrayConstraint or_constraint = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder> getOrConstraintFieldBuilder() { if (orConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 7)) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayConstraint.getDefaultInstance(); } orConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayConstraint, com.google.ortools.linearsolver.MPArrayConstraint.Builder, com.google.ortools.linearsolver.MPArrayConstraintOrBuilder>( (com.google.ortools.linearsolver.MPArrayConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 7; onChanged();; return orConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> minConstraintBuilder_; /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; * @return Whether the minConstraint field is set. */ @java.lang.Override public boolean hasMinConstraint() { return generalConstraintCase_ == 8; } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; * @return The minConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMinConstraint() { if (minConstraintBuilder_ == null) { if (generalConstraintCase_ == 8) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 8) { return minConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ public Builder setMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) { if (minConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { minConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 8; return this; } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ public Builder setMinConstraint( com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) { if (minConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { minConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 8; return this; } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ public Builder mergeMinConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) { if (minConstraintBuilder_ == null) { if (generalConstraintCase_ == 8 && generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 8) { minConstraintBuilder_.mergeFrom(value); } minConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 8; return this; } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ public Builder clearMinConstraint() { if (minConstraintBuilder_ == null) { if (generalConstraintCase_ == 8) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 8) { generalConstraintCase_ = 0; generalConstraint_ = null; } minConstraintBuilder_.clear(); } return this; } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ public com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMinConstraintBuilder() { return getMinConstraintFieldBuilder().getBuilder(); } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMinConstraintOrBuilder() { if ((generalConstraintCase_ == 8) && (minConstraintBuilder_ != null)) { return minConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 8) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } } /** *
     * resultant_var = min(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint min_constraint = 8; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> getMinConstraintFieldBuilder() { if (minConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 8)) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } minConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>( (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 8; onChanged();; return minConstraintBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> maxConstraintBuilder_; /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; * @return Whether the maxConstraint field is set. */ @java.lang.Override public boolean hasMaxConstraint() { return generalConstraintCase_ == 9; } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; * @return The maxConstraint. */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraint getMaxConstraint() { if (maxConstraintBuilder_ == null) { if (generalConstraintCase_ == 9) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } else { if (generalConstraintCase_ == 9) { return maxConstraintBuilder_.getMessage(); } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ public Builder setMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) { if (maxConstraintBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generalConstraint_ = value; onChanged(); } else { maxConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 9; return this; } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ public Builder setMaxConstraint( com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder builderForValue) { if (maxConstraintBuilder_ == null) { generalConstraint_ = builderForValue.build(); onChanged(); } else { maxConstraintBuilder_.setMessage(builderForValue.build()); } generalConstraintCase_ = 9; return this; } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ public Builder mergeMaxConstraint(com.google.ortools.linearsolver.MPArrayWithConstantConstraint value) { if (maxConstraintBuilder_ == null) { if (generalConstraintCase_ == 9 && generalConstraint_ != com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance()) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.newBuilder((com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_) .mergeFrom(value).buildPartial(); } else { generalConstraint_ = value; } onChanged(); } else { if (generalConstraintCase_ == 9) { maxConstraintBuilder_.mergeFrom(value); } maxConstraintBuilder_.setMessage(value); } generalConstraintCase_ = 9; return this; } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ public Builder clearMaxConstraint() { if (maxConstraintBuilder_ == null) { if (generalConstraintCase_ == 9) { generalConstraintCase_ = 0; generalConstraint_ = null; onChanged(); } } else { if (generalConstraintCase_ == 9) { generalConstraintCase_ = 0; generalConstraint_ = null; } maxConstraintBuilder_.clear(); } return this; } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ public com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder getMaxConstraintBuilder() { return getMaxConstraintFieldBuilder().getBuilder(); } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ @java.lang.Override public com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder getMaxConstraintOrBuilder() { if ((generalConstraintCase_ == 9) && (maxConstraintBuilder_ != null)) { return maxConstraintBuilder_.getMessageOrBuilder(); } else { if (generalConstraintCase_ == 9) { return (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_; } return com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } } /** *
     * resultant_var = max(var_1, var_2, ..., constant)
     * 
* * .operations_research.MPArrayWithConstantConstraint max_constraint = 9; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder> getMaxConstraintFieldBuilder() { if (maxConstraintBuilder_ == null) { if (!(generalConstraintCase_ == 9)) { generalConstraint_ = com.google.ortools.linearsolver.MPArrayWithConstantConstraint.getDefaultInstance(); } maxConstraintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.ortools.linearsolver.MPArrayWithConstantConstraint, com.google.ortools.linearsolver.MPArrayWithConstantConstraint.Builder, com.google.ortools.linearsolver.MPArrayWithConstantConstraintOrBuilder>( (com.google.ortools.linearsolver.MPArrayWithConstantConstraint) generalConstraint_, getParentForChildren(), isClean()); generalConstraint_ = null; } generalConstraintCase_ = 9; onChanged();; return maxConstraintBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:operations_research.MPGeneralConstraintProto) } // @@protoc_insertion_point(class_scope:operations_research.MPGeneralConstraintProto) private static final com.google.ortools.linearsolver.MPGeneralConstraintProto DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPGeneralConstraintProto(); } public static com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MPGeneralConstraintProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MPGeneralConstraintProto(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.ortools.linearsolver.MPGeneralConstraintProto getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy