Class EnumValue.Builder (3.19.4)

public static final class EnumValue.Builder extends GeneratedMessageLite.Builder<EnumValue,EnumValue.Builder> implements EnumValueOrBuilder

Enum value definition.

Protobuf type google.protobuf.EnumValue

Implements

EnumValueOrBuilder

Methods

addAllOptions(Iterable<? extends Option> values)

public EnumValue.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
EnumValue.Builder

addOptions(Option value)

public EnumValue.Builder addOptions(Option value)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
valueOption
Returns
TypeDescription
EnumValue.Builder

addOptions(Option.Builder builderForValue)

public EnumValue.Builder addOptions(Option.Builder builderForValue)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
builderForValueOption.Builder
Returns
TypeDescription
EnumValue.Builder

addOptions(int index, Option value)

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

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
NameDescription
indexint
valueOption
Returns
TypeDescription
EnumValue.Builder

addOptions(int index, Option.Builder builderForValue)

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

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
EnumValue.Builder

clearName()

public EnumValue.Builder clearName()

Enum value name.

string name = 1;

Returns
TypeDescription
EnumValue.Builder

This builder for chaining.

clearNumber()

public EnumValue.Builder clearNumber()

Enum value number.

int32 number = 2;

Returns
TypeDescription
EnumValue.Builder

This builder for chaining.

clearOptions()

public EnumValue.Builder clearOptions()

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Returns
TypeDescription
EnumValue.Builder

getName()

public String getName()

Enum value name.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Enum value name.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getNumber()

public int getNumber()

Enum value number.

int32 number = 2;

Returns
TypeDescription
int

The number.

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>

removeOptions(int index)

public EnumValue.Builder removeOptions(int index)

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
EnumValue.Builder

setName(String value)

public EnumValue.Builder setName(String value)

Enum value name.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
EnumValue.Builder

This builder for chaining.

setNameBytes(ByteString value)

public EnumValue.Builder setNameBytes(ByteString value)

Enum value name.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
EnumValue.Builder

This builder for chaining.

setNumber(int value)

public EnumValue.Builder setNumber(int value)

Enum value number.

int32 number = 2;

Parameter
NameDescription
valueint

The number to set.

Returns
TypeDescription
EnumValue.Builder

This builder for chaining.

setOptions(int index, Option value)

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

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
NameDescription
indexint
valueOption
Returns
TypeDescription
EnumValue.Builder

setOptions(int index, Option.Builder builderForValue)

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

Protocol buffer options.

repeated .google.protobuf.Option options = 3;

Parameters
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
EnumValue.Builder