Package com.daml.ledger.api.v1
Class ValueOuterClass.Optional.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
- com.daml.ledger.api.v1.ValueOuterClass.Optional.Builder
-
- All Implemented Interfaces:
ValueOuterClass.OptionalOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.Cloneable
- Enclosing class:
- ValueOuterClass.Optional
public static final class ValueOuterClass.Optional.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder> implements ValueOuterClass.OptionalOrBuilder
Corresponds to Java's Optional type, Scala's Option, and Haskell's Maybe. The reason why we need to wrap this in an additional ``message`` is that we need to be able to encode the ``None`` case in the ``Value`` oneof.
Protobuf typecom.daml.ledger.api.v1.Optional
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
clear
public ValueOuterClass.Optional.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
getDefaultInstanceForType
public ValueOuterClass.Optional getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ValueOuterClass.Optional build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ValueOuterClass.Optional buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ValueOuterClass.Optional.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
setField
public ValueOuterClass.Optional.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
clearField
public ValueOuterClass.Optional.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
clearOneof
public ValueOuterClass.Optional.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
setRepeatedField
public ValueOuterClass.Optional.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
addRepeatedField
public ValueOuterClass.Optional.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
mergeFrom
public ValueOuterClass.Optional.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ValueOuterClass.Optional.Builder>
-
mergeFrom
public ValueOuterClass.Optional.Builder mergeFrom(ValueOuterClass.Optional other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
mergeFrom
public ValueOuterClass.Optional.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ValueOuterClass.Optional.Builder>
- Throws:
java.io.IOException
-
hasValue
public boolean hasValue()
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
- Specified by:
hasValue
in interfaceValueOuterClass.OptionalOrBuilder
- Returns:
- Whether the value field is set.
-
getValue
public ValueOuterClass.Value getValue()
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
- Specified by:
getValue
in interfaceValueOuterClass.OptionalOrBuilder
- Returns:
- The value.
-
setValue
public ValueOuterClass.Optional.Builder setValue(ValueOuterClass.Value value)
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
-
setValue
public ValueOuterClass.Optional.Builder setValue(ValueOuterClass.Value.Builder builderForValue)
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
-
mergeValue
public ValueOuterClass.Optional.Builder mergeValue(ValueOuterClass.Value value)
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
-
clearValue
public ValueOuterClass.Optional.Builder clearValue()
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
-
getValueBuilder
public ValueOuterClass.Value.Builder getValueBuilder()
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
-
getValueOrBuilder
public ValueOuterClass.ValueOrBuilder getValueOrBuilder()
optional
.com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
- Specified by:
getValueOrBuilder
in interfaceValueOuterClass.OptionalOrBuilder
-
setUnknownFields
public final ValueOuterClass.Optional.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
mergeUnknownFields
public final ValueOuterClass.Optional.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
-
-