Class Enum.Builder (3.19.4)

public static final class Enum.Builder extends GeneratedMessageLite.Builder<Enum,Enum.Builder> implements EnumOrBuilder

Enum type definition.

Protobuf type google.protobuf.Enum

Implements

EnumOrBuilder

Methods

addAllEnumvalue(Iterable<? extends EnumValue> values)

public Enum.Builder addAllEnumvalue(Iterable<? extends EnumValue> values)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.EnumValue>
Returns
Type Description
Enum.Builder

addAllOptions(Iterable<? extends Option> values)

public Enum.Builder addAllOptions(Iterable<? extends Option> values)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.Option>
Returns
Type Description
Enum.Builder

addEnumvalue(EnumValue value)

public Enum.Builder addEnumvalue(EnumValue value)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
Name Description
value EnumValue
Returns
Type Description
Enum.Builder

addEnumvalue(EnumValue.Builder builderForValue)

public Enum.Builder addEnumvalue(EnumValue.Builder builderForValue)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
Name Description
builderForValue EnumValue.Builder
Returns
Type Description
Enum.Builder

addEnumvalue(int index, EnumValue value)

public Enum.Builder addEnumvalue(int index, EnumValue value)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameters
Name Description
index int
value EnumValue
Returns
Type Description
Enum.Builder

addEnumvalue(int index, EnumValue.Builder builderForValue)

public Enum.Builder addEnumvalue(int index, EnumValue.Builder builderForValue)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameters
Name Description
index int
builderForValue EnumValue.Builder
Returns
Type Description
Enum.Builder

addOptions(Option value)

public Enum.Builder addOptions(Option value)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
Name Description
value Option
Returns
Type Description
Enum.Builder

addOptions(Option.Builder builderForValue)

public Enum.Builder addOptions(Option.Builder builderForValue)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
Name Description
builderForValue Option.Builder
Returns
Type Description
Enum.Builder

addOptions(int index, Option value)

public Enum.Builder addOptions(int index, Option value)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
Name Description
index int
value Option
Returns
Type Description
Enum.Builder

addOptions(int index, Option.Builder builderForValue)

public Enum.Builder addOptions(int index, Option.Builder builderForValue)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
Name Description
index int
builderForValue Option.Builder
Returns
Type Description
Enum.Builder

clearEnumvalue()

public Enum.Builder clearEnumvalue()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
Type Description
Enum.Builder

clearName()

public Enum.Builder clearName()

Enum type name.

string name = 1;

Returns
Type Description
Enum.Builder

This builder for chaining.

clearOptions()

public Enum.Builder clearOptions()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
Type Description
Enum.Builder

clearSourceContext()

public Enum.Builder clearSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
Type Description
Enum.Builder

clearSyntax()

public Enum.Builder clearSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
Type Description
Enum.Builder

This builder for chaining.

getEnumvalue(int index)

public EnumValue getEnumvalue(int index)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
Name Description
index int
Returns
Type Description
EnumValue

getEnumvalueCount()

public int getEnumvalueCount()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
Type Description
int

getEnumvalueList()

public List<EnumValue> getEnumvalueList()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
Type Description
List<EnumValue>

getName()

public String getName()

Enum type name.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Enum type name.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getOptions(int index)

public Option getOptions(int index)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
Name Description
index int
Returns
Type Description
Option

getOptionsCount()

public int getOptionsCount()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
Type Description
int

getOptionsList()

public List<Option> getOptionsList()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
Type Description
List<Option>

getSourceContext()

public SourceContext getSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
Type Description
SourceContext

getSyntax()

public Syntax getSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
Type Description
Syntax

The syntax.

getSyntaxValue()

public int getSyntaxValue()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
Type Description
int

The enum numeric value on the wire for syntax.

hasSourceContext()

public boolean hasSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
Type Description
boolean

mergeSourceContext(SourceContext value)

public Enum.Builder mergeSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
Name Description
value SourceContext
Returns
Type Description
Enum.Builder

removeEnumvalue(int index)

public Enum.Builder removeEnumvalue(int index)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
Name Description
index int
Returns
Type Description
Enum.Builder

removeOptions(int index)

public Enum.Builder removeOptions(int index)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
Name Description
index int
Returns
Type Description
Enum.Builder

setEnumvalue(int index, EnumValue value)

public Enum.Builder setEnumvalue(int index, EnumValue value)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameters
Name Description
index int
value EnumValue
Returns
Type Description
Enum.Builder

setEnumvalue(int index, EnumValue.Builder builderForValue)

public Enum.Builder setEnumvalue(int index, EnumValue.Builder builderForValue)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameters
Name Description
index int
builderForValue EnumValue.Builder
Returns
Type Description
Enum.Builder

setName(String value)

public Enum.Builder setName(String value)

Enum type name.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Enum.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Enum.Builder setNameBytes(ByteString value)

Enum type name.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Enum.Builder

This builder for chaining.

setOptions(int index, Option value)

public Enum.Builder setOptions(int index, Option value)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
Name Description
index int
value Option
Returns
Type Description
Enum.Builder

setOptions(int index, Option.Builder builderForValue)

public Enum.Builder setOptions(int index, Option.Builder builderForValue)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
Name Description
index int
builderForValue Option.Builder
Returns
Type Description
Enum.Builder

setSourceContext(SourceContext value)

public Enum.Builder setSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
Name Description
value SourceContext
Returns
Type Description
Enum.Builder

setSourceContext(SourceContext.Builder builderForValue)

public Enum.Builder setSourceContext(SourceContext.Builder builderForValue)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
Name Description
builderForValue SourceContext.Builder
Returns
Type Description
Enum.Builder

setSyntax(Syntax value)

public Enum.Builder setSyntax(Syntax value)

The source syntax.

.google.protobuf.Syntax syntax = 5;

Parameter
Name Description
value Syntax

The enum numeric value on the wire for syntax to set.

Returns
Type Description
Enum.Builder

This builder for chaining.

setSyntaxValue(int value)

public Enum.Builder setSyntaxValue(int value)

The source syntax.

.google.protobuf.Syntax syntax = 5;

Parameter
Name Description
value int

The syntax to set.

Returns
Type Description
Enum.Builder

This builder for chaining.