Class Enum.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
All Implemented Interfaces:
EnumOrBuilder, Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, MessageOrBuilder, Cloneable
Enclosing class:
Enum

public static final class Enum.Builder extends GeneratedMessage.Builder<Enum.Builder> implements EnumOrBuilder
Protobuf type google.protobuf.Enum
  • Method Details Link icon

    • getDescriptor Link icon

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable Link icon

      protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Description copied from class: GeneratedMessage.Builder
      Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
      Specified by:
      internalGetFieldAccessorTable in class GeneratedMessage.Builder<Enum.Builder>
    • clear Link icon

      public Enum.Builder clear()
      Description copied from class: GeneratedMessage.Builder
      Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.
      Specified by:
      clear in interface Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class GeneratedMessage.Builder<Enum.Builder>
    • getDescriptorForType Link icon

      public Descriptors.Descriptor getDescriptorForType()
      Description copied from interface: Message.Builder
      Get the message's type's descriptor. See MessageOrBuilder.getDescriptorForType().
      Specified by:
      getDescriptorForType in interface Message.Builder
      Specified by:
      getDescriptorForType in interface MessageOrBuilder
      Overrides:
      getDescriptorForType in class GeneratedMessage.Builder<Enum.Builder>
    • getDefaultInstanceForType Link icon

      public Enum getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface MessageOrBuilder
    • build Link icon

      public Enum build()
      Specified by:
      build in interface Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial Link icon

      public Enum buildPartial()
      Specified by:
      buildPartial in interface Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom Link icon

      public Enum.Builder mergeFrom(Message other)
      Description copied from interface: Message.Builder
      Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

      Merging occurs as follows. For each field:
      * For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
      * For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
      * For repeated fields, the elements in other are concatenated with the elements in this message.
      * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

      This is equivalent to the Message::MergeFrom method in C++.

      Specified by:
      mergeFrom in interface Message.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<Enum.Builder>
    • mergeFrom Link icon

      public Enum.Builder mergeFrom(Enum other)
    • isInitialized Link icon

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class GeneratedMessage.Builder<Enum.Builder>
    • mergeFrom Link icon

      public Enum.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<Enum.Builder>
      Throws:
      IOException
    • getName Link icon

      public String getName()
      string name = 1 [json_name = "name"];
      Specified by:
      getName in interface EnumOrBuilder
      Returns:
      The name.
    • getNameBytes Link icon

      public com.google.protobuf.ByteString getNameBytes()
      string name = 1 [json_name = "name"];
      Specified by:
      getNameBytes in interface EnumOrBuilder
      Returns:
      The bytes for name.
    • setName Link icon

      public Enum.Builder setName(String value)
      string name = 1 [json_name = "name"];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName Link icon

      public Enum.Builder clearName()
      string name = 1 [json_name = "name"];
      Returns:
      This builder for chaining.
    • setNameBytes Link icon

      public Enum.Builder setNameBytes(com.google.protobuf.ByteString value)
      string name = 1 [json_name = "name"];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getEnumvalueList Link icon

      public List<EnumValue> getEnumvalueList()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
      Specified by:
      getEnumvalueList in interface EnumOrBuilder
    • getEnumvalueCount Link icon

      public int getEnumvalueCount()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
      Specified by:
      getEnumvalueCount in interface EnumOrBuilder
    • getEnumvalue Link icon

      public EnumValue getEnumvalue(int index)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
      Specified by:
      getEnumvalue in interface EnumOrBuilder
    • setEnumvalue Link icon

      public Enum.Builder setEnumvalue(int index, EnumValue value)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • setEnumvalue Link icon

      public Enum.Builder setEnumvalue(int index, EnumValue.Builder builderForValue)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addEnumvalue Link icon

      public Enum.Builder addEnumvalue(EnumValue value)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addEnumvalue Link icon

      public Enum.Builder addEnumvalue(int index, EnumValue value)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addEnumvalue Link icon

      public Enum.Builder addEnumvalue(EnumValue.Builder builderForValue)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addEnumvalue Link icon

      public Enum.Builder addEnumvalue(int index, EnumValue.Builder builderForValue)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addAllEnumvalue Link icon

      public Enum.Builder addAllEnumvalue(Iterable<? extends EnumValue> values)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • clearEnumvalue Link icon

      public Enum.Builder clearEnumvalue()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • removeEnumvalue Link icon

      public Enum.Builder removeEnumvalue(int index)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • getEnumvalueBuilder Link icon

      public EnumValue.Builder getEnumvalueBuilder(int index)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • getEnumvalueOrBuilder Link icon

      public EnumValueOrBuilder getEnumvalueOrBuilder(int index)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
      Specified by:
      getEnumvalueOrBuilder in interface EnumOrBuilder
    • getEnumvalueOrBuilderList Link icon

      public List<? extends EnumValueOrBuilder> getEnumvalueOrBuilderList()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
      Specified by:
      getEnumvalueOrBuilderList in interface EnumOrBuilder
    • addEnumvalueBuilder Link icon

      public EnumValue.Builder addEnumvalueBuilder()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • addEnumvalueBuilder Link icon

      public EnumValue.Builder addEnumvalueBuilder(int index)
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • getEnumvalueBuilderList Link icon

      public List<EnumValue.Builder> getEnumvalueBuilderList()
      repeated .google.protobuf.EnumValue enumvalue = 2 [json_name = "enumvalue"];
    • getOptionsList Link icon

      public List<Option> getOptionsList()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptionsList in interface EnumOrBuilder
    • getOptionsCount Link icon

      public int getOptionsCount()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptionsCount in interface EnumOrBuilder
    • getOptions Link icon

      public Option getOptions(int index)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptions in interface EnumOrBuilder
    • setOptions Link icon

      public Enum.Builder setOptions(int index, Option value)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • setOptions Link icon

      public Enum.Builder setOptions(int index, Option.Builder builderForValue)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addOptions Link icon

      public Enum.Builder addOptions(Option value)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addOptions Link icon

      public Enum.Builder addOptions(int index, Option value)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addOptions Link icon

      public Enum.Builder addOptions(Option.Builder builderForValue)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addOptions Link icon

      public Enum.Builder addOptions(int index, Option.Builder builderForValue)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addAllOptions Link icon

      public Enum.Builder addAllOptions(Iterable<? extends Option> values)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • clearOptions Link icon

      public Enum.Builder clearOptions()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • removeOptions Link icon

      public Enum.Builder removeOptions(int index)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • getOptionsBuilder Link icon

      public Option.Builder getOptionsBuilder(int index)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • getOptionsOrBuilder Link icon

      public OptionOrBuilder getOptionsOrBuilder(int index)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptionsOrBuilder in interface EnumOrBuilder
    • getOptionsOrBuilderList Link icon

      public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
      Specified by:
      getOptionsOrBuilderList in interface EnumOrBuilder
    • addOptionsBuilder Link icon

      public Option.Builder addOptionsBuilder()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • addOptionsBuilder Link icon

      public Option.Builder addOptionsBuilder(int index)
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • getOptionsBuilderList Link icon

      public List<Option.Builder> getOptionsBuilderList()
      repeated .google.protobuf.Option options = 3 [json_name = "options"];
    • hasSourceContext Link icon

      public boolean hasSourceContext()
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
      Specified by:
      hasSourceContext in interface EnumOrBuilder
      Returns:
      Whether the sourceContext field is set.
    • getSourceContext Link icon

      public SourceContext getSourceContext()
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
      Specified by:
      getSourceContext in interface EnumOrBuilder
      Returns:
      The sourceContext.
    • setSourceContext Link icon

      public Enum.Builder setSourceContext(SourceContext value)
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
    • setSourceContext Link icon

      public Enum.Builder setSourceContext(SourceContext.Builder builderForValue)
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
    • mergeSourceContext Link icon

      public Enum.Builder mergeSourceContext(SourceContext value)
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
    • clearSourceContext Link icon

      public Enum.Builder clearSourceContext()
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
    • getSourceContextBuilder Link icon

      public SourceContext.Builder getSourceContextBuilder()
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
    • getSourceContextOrBuilder Link icon

      public SourceContextOrBuilder getSourceContextOrBuilder()
      .google.protobuf.SourceContext source_context = 4 [json_name = "sourceContext"];
      Specified by:
      getSourceContextOrBuilder in interface EnumOrBuilder
    • getSyntaxValue Link icon

      public int getSyntaxValue()
      .google.protobuf.Syntax syntax = 5 [json_name = "syntax"];
      Specified by:
      getSyntaxValue in interface EnumOrBuilder
      Returns:
      The enum numeric value on the wire for syntax.
    • setSyntaxValue Link icon

      public Enum.Builder setSyntaxValue(int value)
      .google.protobuf.Syntax syntax = 5 [json_name = "syntax"];
      Parameters:
      value - The enum numeric value on the wire for syntax to set.
      Returns:
      This builder for chaining.
    • getSyntax Link icon

      public Syntax getSyntax()
      .google.protobuf.Syntax syntax = 5 [json_name = "syntax"];
      Specified by:
      getSyntax in interface EnumOrBuilder
      Returns:
      The syntax.
    • setSyntax Link icon

      public Enum.Builder setSyntax(Syntax value)
      .google.protobuf.Syntax syntax = 5 [json_name = "syntax"];
      Parameters:
      value - The syntax to set.
      Returns:
      This builder for chaining.
    • clearSyntax Link icon

      public Enum.Builder clearSyntax()
      .google.protobuf.Syntax syntax = 5 [json_name = "syntax"];
      Returns:
      This builder for chaining.
    • getEdition Link icon

      public String getEdition()
      string edition = 6 [json_name = "edition"];
      Specified by:
      getEdition in interface EnumOrBuilder
      Returns:
      The edition.
    • getEditionBytes Link icon

      public com.google.protobuf.ByteString getEditionBytes()
      string edition = 6 [json_name = "edition"];
      Specified by:
      getEditionBytes in interface EnumOrBuilder
      Returns:
      The bytes for edition.
    • setEdition Link icon

      public Enum.Builder setEdition(String value)
      string edition = 6 [json_name = "edition"];
      Parameters:
      value - The edition to set.
      Returns:
      This builder for chaining.
    • clearEdition Link icon

      public Enum.Builder clearEdition()
      string edition = 6 [json_name = "edition"];
      Returns:
      This builder for chaining.
    • setEditionBytes Link icon

      public Enum.Builder setEditionBytes(com.google.protobuf.ByteString value)
      string edition = 6 [json_name = "edition"];
      Parameters:
      value - The bytes for edition to set.
      Returns:
      This builder for chaining.