Class 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 type com.daml.ledger.api.v1.Optional
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
      • getDefaultInstanceForType

        public ValueOuterClass.Optional getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public ValueOuterClass.Optional build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public ValueOuterClass.Optional buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setField

        public ValueOuterClass.Optional.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.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 interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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 interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.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 interface ValueOuterClass.OptionalOrBuilder
        Returns:
        Whether the value field is set.
      • getValueBuilder

        public ValueOuterClass.Value.Builder getValueBuilder()
         optional
         
        .com.daml.ledger.api.v1.Value value = 1 [json_name = "value"];
      • setUnknownFields

        public final ValueOuterClass.Optional.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>
      • mergeUnknownFields

        public final ValueOuterClass.Optional.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ValueOuterClass.Optional.Builder>