Package com.google.protobuf
Class Enum.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite.Builder<Enum,Enum.Builder>
-
- com.google.protobuf.Enum.Builder
-
- All Implemented Interfaces:
EnumOrBuilder,MessageLite.Builder,MessageLiteOrBuilder,Cloneable
- Enclosing class:
- Enum
public static final class Enum.Builder extends GeneratedMessageLite.Builder<Enum,Enum.Builder> implements EnumOrBuilder
Enum type definition.
Protobuf typegoogle.protobuf.Enum
-
-
Field Summary
-
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enum.BuilderaddAllEnumvalue(Iterable<? extends EnumValue> values)Enum value definitions.Enum.BuilderaddAllOptions(Iterable<? extends Option> values)Protocol buffer options.Enum.BuilderaddEnumvalue(int index, EnumValue value)Enum value definitions.Enum.BuilderaddEnumvalue(int index, EnumValue.Builder builderForValue)Enum value definitions.Enum.BuilderaddEnumvalue(EnumValue value)Enum value definitions.Enum.BuilderaddEnumvalue(EnumValue.Builder builderForValue)Enum value definitions.Enum.BuilderaddOptions(int index, Option value)Protocol buffer options.Enum.BuilderaddOptions(int index, Option.Builder builderForValue)Protocol buffer options.Enum.BuilderaddOptions(Option value)Protocol buffer options.Enum.BuilderaddOptions(Option.Builder builderForValue)Protocol buffer options.Enum.BuilderclearEnumvalue()Enum value definitions.Enum.BuilderclearName()Enum type name.Enum.BuilderclearOptions()Protocol buffer options.Enum.BuilderclearSourceContext()The source context.Enum.BuilderclearSyntax()The source syntax.EnumValuegetEnumvalue(int index)Enum value definitions.intgetEnumvalueCount()Enum value definitions.List<EnumValue>getEnumvalueList()Enum value definitions.StringgetName()Enum type name.ByteStringgetNameBytes()Enum type name.OptiongetOptions(int index)Protocol buffer options.intgetOptionsCount()Protocol buffer options.List<Option>getOptionsList()Protocol buffer options.SourceContextgetSourceContext()The source context.SyntaxgetSyntax()The source syntax.intgetSyntaxValue()The source syntax.booleanhasSourceContext()The source context.Enum.BuildermergeSourceContext(SourceContext value)The source context.Enum.BuilderremoveEnumvalue(int index)Enum value definitions.Enum.BuilderremoveOptions(int index)Protocol buffer options.Enum.BuildersetEnumvalue(int index, EnumValue value)Enum value definitions.Enum.BuildersetEnumvalue(int index, EnumValue.Builder builderForValue)Enum value definitions.Enum.BuildersetName(String value)Enum type name.Enum.BuildersetNameBytes(ByteString value)Enum type name.Enum.BuildersetOptions(int index, Option value)Protocol buffer options.Enum.BuildersetOptions(int index, Option.Builder builderForValue)Protocol buffer options.Enum.BuildersetSourceContext(SourceContext value)The source context.Enum.BuildersetSourceContext(SourceContext.Builder builderForValue)The source context.Enum.BuildersetSyntax(Syntax value)The source syntax.Enum.BuildersetSyntaxValue(int value)The source syntax.-
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
-
-
-
Method Detail
-
getName
public String getName()
Enum type name.
string name = 1;- Specified by:
getNamein interfaceEnumOrBuilder- Returns:
- The name.
-
getNameBytes
public ByteString getNameBytes()
Enum type name.
string name = 1;- Specified by:
getNameBytesin interfaceEnumOrBuilder- Returns:
- The bytes for name.
-
setName
public Enum.Builder setName(String value)
Enum type name.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Enum.Builder clearName()
Enum type name.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
public Enum.Builder setNameBytes(ByteString value)
Enum type name.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getEnumvalueList
public List<EnumValue> getEnumvalueList()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;- Specified by:
getEnumvalueListin interfaceEnumOrBuilder
-
getEnumvalueCount
public int getEnumvalueCount()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;- Specified by:
getEnumvalueCountin interfaceEnumOrBuilder
-
getEnumvalue
public EnumValue getEnumvalue(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;- Specified by:
getEnumvaluein interfaceEnumOrBuilder
-
setEnumvalue
public Enum.Builder setEnumvalue(int index, EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
setEnumvalue
public Enum.Builder setEnumvalue(int index, EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
public Enum.Builder addEnumvalue(EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
public Enum.Builder addEnumvalue(int index, EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
public Enum.Builder addEnumvalue(EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
public Enum.Builder addEnumvalue(int index, EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addAllEnumvalue
public Enum.Builder addAllEnumvalue(Iterable<? extends EnumValue> values)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
clearEnumvalue
public Enum.Builder clearEnumvalue()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
removeEnumvalue
public Enum.Builder removeEnumvalue(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
getOptionsList
public List<Option> getOptionsList()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsListin interfaceEnumOrBuilder
-
getOptionsCount
public int getOptionsCount()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsCountin interfaceEnumOrBuilder
-
getOptions
public Option getOptions(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsin interfaceEnumOrBuilder
-
setOptions
public Enum.Builder setOptions(int index, Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
setOptions
public Enum.Builder setOptions(int index, Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
public Enum.Builder addOptions(Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
public Enum.Builder addOptions(int index, Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
public Enum.Builder addOptions(Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
public Enum.Builder addOptions(int index, Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addAllOptions
public Enum.Builder addAllOptions(Iterable<? extends Option> values)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
clearOptions
public Enum.Builder clearOptions()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
removeOptions
public Enum.Builder removeOptions(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
hasSourceContext
public boolean hasSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;- Specified by:
hasSourceContextin interfaceEnumOrBuilder- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
public SourceContext getSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;- Specified by:
getSourceContextin interfaceEnumOrBuilder- Returns:
- The sourceContext.
-
setSourceContext
public Enum.Builder setSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 4;
-
setSourceContext
public Enum.Builder setSourceContext(SourceContext.Builder builderForValue)
The source context.
.google.protobuf.SourceContext source_context = 4;
-
mergeSourceContext
public Enum.Builder mergeSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 4;
-
clearSourceContext
public Enum.Builder clearSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;
-
getSyntaxValue
public int getSyntaxValue()
The source syntax.
.google.protobuf.Syntax syntax = 5;- Specified by:
getSyntaxValuein interfaceEnumOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
setSyntaxValue
public Enum.Builder setSyntaxValue(int value)
The source syntax.
.google.protobuf.Syntax syntax = 5;- Parameters:
value- The syntax to set.- Returns:
- This builder for chaining.
-
getSyntax
public Syntax getSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 5;- Specified by:
getSyntaxin interfaceEnumOrBuilder- Returns:
- The syntax.
-
setSyntax
public Enum.Builder setSyntax(Syntax value)
The source syntax.
.google.protobuf.Syntax syntax = 5;- Parameters:
value- The enum numeric value on the wire for syntax to set.- Returns:
- This builder for chaining.
-
clearSyntax
public Enum.Builder clearSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 5;- Returns:
- This builder for chaining.
-
-