Class Enum.Builder

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
NameDescription
valuesIterable<? extends com.google.protobuf.EnumValue>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.Option>
Returns
TypeDescription
Enum.Builder

addEnumvalue(EnumValue value)

public Enum.Builder addEnumvalue(EnumValue value)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
NameDescription
valueEnumValue
Returns
TypeDescription
Enum.Builder

addEnumvalue(EnumValue.Builder builderForValue)

public Enum.Builder addEnumvalue(EnumValue.Builder builderForValue)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
NameDescription
builderForValueEnumValue.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueEnumValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEnumValue.Builder
Returns
TypeDescription
Enum.Builder

addOptions(Option value)

public Enum.Builder addOptions(Option value)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
valueOption
Returns
TypeDescription
Enum.Builder

addOptions(Option.Builder builderForValue)

public Enum.Builder addOptions(Option.Builder builderForValue)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
builderForValueOption.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueOption
Returns
TypeDescription
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
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
Enum.Builder

clearEnumvalue()

public Enum.Builder clearEnumvalue()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
TypeDescription
Enum.Builder

clearName()

public Enum.Builder clearName()

Enum type name.

string name = 1;

Returns
TypeDescription
Enum.Builder

This builder for chaining.

clearOptions()

public Enum.Builder clearOptions()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
TypeDescription
Enum.Builder

clearSourceContext()

public Enum.Builder clearSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
TypeDescription
Enum.Builder

clearSyntax()

public Enum.Builder clearSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
TypeDescription
Enum.Builder

This builder for chaining.

getEnumvalue(int index)

public EnumValue getEnumvalue(int index)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
EnumValue

getEnumvalueCount()

public int getEnumvalueCount()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
TypeDescription
int

getEnumvalueList()

public List<EnumValue> getEnumvalueList()

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Returns
TypeDescription
List<EnumValue>

getName()

public String getName()

Enum type name.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Enum type name.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOptions(int index)

public Option getOptions(int index)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Option

getOptionsCount()

public int getOptionsCount()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
TypeDescription
int

getOptionsList()

public List<Option> getOptionsList()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
TypeDescription
List<Option>

getSourceContext()

public SourceContext getSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
TypeDescription
SourceContext

getSyntax()

public Syntax getSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
TypeDescription
Syntax

The syntax.

getSyntaxValue()

public int getSyntaxValue()

The source syntax.

.google.protobuf.Syntax syntax = 5;

Returns
TypeDescription
int

The enum numeric value on the wire for syntax.

hasSourceContext()

public boolean hasSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 4;

Returns
TypeDescription
boolean

mergeSourceContext(SourceContext value)

public Enum.Builder mergeSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
Enum.Builder

removeEnumvalue(int index)

public Enum.Builder removeEnumvalue(int index)

Enum value definitions.

repeated .google.protobuf.EnumValue enumvalue = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Enum.Builder

removeOptions(int index)

public Enum.Builder removeOptions(int index)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueEnumValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueEnumValue.Builder
Returns
TypeDescription
Enum.Builder

setName(String value)

public Enum.Builder setName(String value)

Enum type name.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Enum.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Enum.Builder setNameBytes(ByteString value)

Enum type name.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
indexint
valueOption
Returns
TypeDescription
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
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
Enum.Builder

setSourceContext(SourceContext value)

public Enum.Builder setSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
Enum.Builder

setSourceContext(SourceContext.Builder builderForValue)

public Enum.Builder setSourceContext(SourceContext.Builder builderForValue)

The source context.

.google.protobuf.SourceContext source_context = 4;

Parameter
NameDescription
builderForValueSourceContext.Builder
Returns
TypeDescription
Enum.Builder

setSyntax(Syntax value)

public Enum.Builder setSyntax(Syntax value)

The source syntax.

.google.protobuf.Syntax syntax = 5;

Parameter
NameDescription
valueSyntax

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

Returns
TypeDescription
Enum.Builder

This builder for chaining.

setSyntaxValue(int value)

public Enum.Builder setSyntaxValue(int value)

The source syntax.

.google.protobuf.Syntax syntax = 5;

Parameter
NameDescription
valueint

The syntax to set.

Returns
TypeDescription
Enum.Builder

This builder for chaining.