Class MPModelProto.Annotation.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<MPModelProto.Annotation.Builder>
com.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
com.google.ortools.linearsolver.MPModelProto.Annotation.Builder
- All Implemented Interfaces:
MPModelProto.AnnotationOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
MPModelProto.Annotation
public static final class MPModelProto.Annotation.Builder
extends com.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
implements MPModelProto.AnnotationOrBuilder
Annotations can be freely added by users who want to attach arbitrary payload to the model's variables or constraints.Protobuf type
operations_research.MPModelProto.Annotation-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The payload is a (key, value) string pair.optional string payload_value = 5;If both `target_index` and `target_name` are set, they must point to the same entity.Alternate to index.optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe payload is a (key, value) string pair.com.google.protobuf.ByteStringThe payload is a (key, value) string pair.optional string payload_value = 5;com.google.protobuf.ByteStringoptional string payload_value = 5;intIf both `target_index` and `target_name` are set, they must point to the same entity.Alternate to index.com.google.protobuf.ByteStringAlternate to index.optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;booleanThe payload is a (key, value) string pair.booleanoptional string payload_value = 5;booleanIf both `target_index` and `target_name` are set, they must point to the same entity.booleanAlternate to index.booleanoptional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(MPModelProto.Annotation other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setPayloadKey(String value) The payload is a (key, value) string pair.setPayloadKeyBytes(com.google.protobuf.ByteString value) The payload is a (key, value) string pair.setPayloadValue(String value) optional string payload_value = 5;setPayloadValueBytes(com.google.protobuf.ByteString value) optional string payload_value = 5;setTargetIndex(int value) If both `target_index` and `target_name` are set, they must point to the same entity.setTargetName(String value) Alternate to index.setTargetNameBytes(com.google.protobuf.ByteString value) Alternate to index.optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPModelProto.Annotation.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MPModelProto.Annotation.Builder>
-
mergeFrom
public MPModelProto.Annotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPModelProto.Annotation.Builder>- Throws:
IOException
-
hasTargetType
public boolean hasTargetType()optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;- Specified by:
hasTargetTypein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- Whether the targetType field is set.
-
getTargetType
optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;- Specified by:
getTargetTypein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The targetType.
-
setTargetType
optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;- Parameters:
value- The targetType to set.- Returns:
- This builder for chaining.
-
clearTargetType
optional .operations_research.MPModelProto.Annotation.TargetType target_type = 1;- Returns:
- This builder for chaining.
-
hasTargetIndex
public boolean hasTargetIndex()If both `target_index` and `target_name` are set, they must point to the same entity.
optional int32 target_index = 2;- Specified by:
hasTargetIndexin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- Whether the targetIndex field is set.
-
getTargetIndex
public int getTargetIndex()If both `target_index` and `target_name` are set, they must point to the same entity.
optional int32 target_index = 2;- Specified by:
getTargetIndexin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The targetIndex.
-
setTargetIndex
If both `target_index` and `target_name` are set, they must point to the same entity.
optional int32 target_index = 2;- Parameters:
value- The targetIndex to set.- Returns:
- This builder for chaining.
-
clearTargetIndex
If both `target_index` and `target_name` are set, they must point to the same entity.
optional int32 target_index = 2;- Returns:
- This builder for chaining.
-
hasTargetName
public boolean hasTargetName()Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Specified by:
hasTargetNamein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- Whether the targetName field is set.
-
getTargetName
Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Specified by:
getTargetNamein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The targetName.
-
getTargetNameBytes
public com.google.protobuf.ByteString getTargetNameBytes()Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Specified by:
getTargetNameBytesin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The bytes for targetName.
-
setTargetName
Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Parameters:
value- The targetName to set.- Returns:
- This builder for chaining.
-
clearTargetName
Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Returns:
- This builder for chaining.
-
setTargetNameBytes
Alternate to index. Assumes uniqueness.
optional string target_name = 3;- Parameters:
value- The bytes for targetName to set.- Returns:
- This builder for chaining.
-
hasPayloadKey
public boolean hasPayloadKey()The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Specified by:
hasPayloadKeyin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- Whether the payloadKey field is set.
-
getPayloadKey
The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Specified by:
getPayloadKeyin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The payloadKey.
-
getPayloadKeyBytes
public com.google.protobuf.ByteString getPayloadKeyBytes()The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Specified by:
getPayloadKeyBytesin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The bytes for payloadKey.
-
setPayloadKey
The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Parameters:
value- The payloadKey to set.- Returns:
- This builder for chaining.
-
clearPayloadKey
The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Returns:
- This builder for chaining.
-
setPayloadKeyBytes
The payload is a (key, value) string pair. Depending on the use cases, one of the two may be omitted.
optional string payload_key = 4;- Parameters:
value- The bytes for payloadKey to set.- Returns:
- This builder for chaining.
-
hasPayloadValue
public boolean hasPayloadValue()optional string payload_value = 5;- Specified by:
hasPayloadValuein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- Whether the payloadValue field is set.
-
getPayloadValue
optional string payload_value = 5;- Specified by:
getPayloadValuein interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The payloadValue.
-
getPayloadValueBytes
public com.google.protobuf.ByteString getPayloadValueBytes()optional string payload_value = 5;- Specified by:
getPayloadValueBytesin interfaceMPModelProto.AnnotationOrBuilder- Returns:
- The bytes for payloadValue.
-
setPayloadValue
optional string payload_value = 5;- Parameters:
value- The payloadValue to set.- Returns:
- This builder for chaining.
-
clearPayloadValue
optional string payload_value = 5;- Returns:
- This builder for chaining.
-
setPayloadValueBytes
optional string payload_value = 5;- Parameters:
value- The bytes for payloadValue to set.- Returns:
- This builder for chaining.
-