Class DescriptorProtos.EnumDescriptorProto.Builder (3.19.4)

public static final class DescriptorProtos.EnumDescriptorProto.Builder extends GeneratedMessageV3.Builder<DescriptorProtos.EnumDescriptorProto.Builder> implements DescriptorProtos.EnumDescriptorProtoOrBuilder

Describes an enum type.

Protobuf type google.protobuf.EnumDescriptorProto

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptors.Descriptor

Methods

addAllReservedName(Iterable<String> values)

public DescriptorProtos.EnumDescriptorProto.Builder addAllReservedName(Iterable<String> values)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameter
NameDescription
valuesIterable<String>

The reservedName to add.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

addAllReservedRange(Iterable<? extends DescriptorProtos.EnumDescriptorProto.EnumReservedRange> values)

public DescriptorProtos.EnumDescriptorProto.Builder addAllReservedRange(Iterable<? extends DescriptorProtos.EnumDescriptorProto.EnumReservedRange> values)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange>
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addAllValue(Iterable<? extends DescriptorProtos.EnumValueDescriptorProto> values)

public DescriptorProtos.EnumDescriptorProto.Builder addAllValue(Iterable<? extends DescriptorProtos.EnumValueDescriptorProto> values)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto>
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.EnumDescriptorProto.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

addReservedName(String value)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedName(String value)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameter
NameDescription
valueString

The reservedName to add.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

addReservedNameBytes(ByteString value)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedNameBytes(ByteString value)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameter
NameDescription
valueByteString

The bytes of the reservedName to add.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

addReservedRange(DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedRange(DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
valueDescriptorProtos.EnumDescriptorProto.EnumReservedRange
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addReservedRange(DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedRange(DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
builderForValueDescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameters
NameDescription
indexint
valueDescriptorProtos.EnumDescriptorProto.EnumReservedRange
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder addReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addReservedRangeBuilder()

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder addReservedRangeBuilder()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

addReservedRangeBuilder(int index)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder addReservedRangeBuilder(int index)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

addValue(DescriptorProtos.EnumValueDescriptorProto value)

public DescriptorProtos.EnumDescriptorProto.Builder addValue(DescriptorProtos.EnumValueDescriptorProto value)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
valueDescriptorProtos.EnumValueDescriptorProto
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addValue(DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder addValue(DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
builderForValueDescriptorProtos.EnumValueDescriptorProto.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addValue(int index, DescriptorProtos.EnumValueDescriptorProto value)

public DescriptorProtos.EnumDescriptorProto.Builder addValue(int index, DescriptorProtos.EnumValueDescriptorProto value)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameters
NameDescription
indexint
valueDescriptorProtos.EnumValueDescriptorProto
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addValue(int index, DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder addValue(int index, DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.EnumValueDescriptorProto.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

addValueBuilder()

public DescriptorProtos.EnumValueDescriptorProto.Builder addValueBuilder()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProto.Builder

addValueBuilder(int index)

public DescriptorProtos.EnumValueDescriptorProto.Builder addValueBuilder(int index)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProto.Builder

build()

public DescriptorProtos.EnumDescriptorProto build()
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto

buildPartial()

public DescriptorProtos.EnumDescriptorProto buildPartial()
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto

clear()

public DescriptorProtos.EnumDescriptorProto.Builder clear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public DescriptorProtos.EnumDescriptorProto.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

clearName()

public DescriptorProtos.EnumDescriptorProto.Builder clearName()

optional string name = 1;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DescriptorProtos.EnumDescriptorProto.Builder clearOneof(Descriptors.OneofDescriptor oneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

clearOptions()

public DescriptorProtos.EnumDescriptorProto.Builder clearOptions()

optional .google.protobuf.EnumOptions options = 3;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

clearReservedName()

public DescriptorProtos.EnumDescriptorProto.Builder clearReservedName()

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

clearReservedRange()

public DescriptorProtos.EnumDescriptorProto.Builder clearReservedRange()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

clearValue()

public DescriptorProtos.EnumDescriptorProto.Builder clearValue()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

clone()

public DescriptorProtos.EnumDescriptorProto.Builder clone()

Clones the Builder.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

getDefaultInstanceForType()

public DescriptorProtos.EnumDescriptorProto getDefaultInstanceForType()

Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
Descriptors.Descriptor
Overrides

getName()

public String getName()

optional string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

optional string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getOptions()

public DescriptorProtos.EnumOptions getOptions()

optional .google.protobuf.EnumOptions options = 3;

Returns
TypeDescription
DescriptorProtos.EnumOptions

The options.

getOptionsBuilder()

public DescriptorProtos.EnumOptions.Builder getOptionsBuilder()

optional .google.protobuf.EnumOptions options = 3;

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

getOptionsOrBuilder()

public DescriptorProtos.EnumOptionsOrBuilder getOptionsOrBuilder()

optional .google.protobuf.EnumOptions options = 3;

Returns
TypeDescription
DescriptorProtos.EnumOptionsOrBuilder

getReservedName(int index)

public String getReservedName(int index)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The reservedName at the given index.

getReservedNameBytes(int index)

public ByteString getReservedNameBytes(int index)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the reservedName at the given index.

getReservedNameCount()

public int getReservedNameCount()

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Returns
TypeDescription
int

The count of reservedName.

getReservedNameList()

public ProtocolStringList getReservedNameList()

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the reservedName.

getReservedRange(int index)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange getReservedRange(int index)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.EnumReservedRange

getReservedRangeBuilder(int index)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder getReservedRangeBuilder(int index)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder

getReservedRangeBuilderList()

public List<DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder> getReservedRangeBuilderList()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
List<Builder>

getReservedRangeCount()

public int getReservedRangeCount()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
int

getReservedRangeList()

public List<DescriptorProtos.EnumDescriptorProto.EnumReservedRange> getReservedRangeList()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
List<EnumReservedRange>

getReservedRangeOrBuilder(int index)

public DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder getReservedRangeOrBuilder(int index)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder

getReservedRangeOrBuilderList()

public List<? extends DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder> getReservedRangeOrBuilderList()

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Returns
TypeDescription
List<? extends com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder>

getValue(int index)

public DescriptorProtos.EnumValueDescriptorProto getValue(int index)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProto

getValueBuilder(int index)

public DescriptorProtos.EnumValueDescriptorProto.Builder getValueBuilder(int index)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProto.Builder

getValueBuilderList()

public List<DescriptorProtos.EnumValueDescriptorProto.Builder> getValueBuilderList()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
List<Builder>

getValueCount()

public int getValueCount()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
int

getValueList()

public List<DescriptorProtos.EnumValueDescriptorProto> getValueList()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
List<EnumValueDescriptorProto>

getValueOrBuilder(int index)

public DescriptorProtos.EnumValueDescriptorProtoOrBuilder getValueOrBuilder(int index)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProtoOrBuilder

getValueOrBuilderList()

public List<? extends DescriptorProtos.EnumValueDescriptorProtoOrBuilder> getValueOrBuilderList()

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Returns
TypeDescription
List<? extends com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder>

hasName()

public boolean hasName()

optional string name = 1;

Returns
TypeDescription
boolean

Whether the name field is set.

hasOptions()

public boolean hasOptions()

optional .google.protobuf.EnumOptions options = 3;

Returns
TypeDescription
boolean

Whether the options field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

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.

Returns
TypeDescription
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DescriptorProtos.EnumDescriptorProto.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in extensionRegistry. Extensions not in the registry will be treated as unknown fields.

Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(DescriptorProtos.EnumDescriptorProto other)

public DescriptorProtos.EnumDescriptorProto.Builder mergeFrom(DescriptorProtos.EnumDescriptorProto other)
Parameter
NameDescription
otherDescriptorProtos.EnumDescriptorProto
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

mergeFrom(Message other)

public DescriptorProtos.EnumDescriptorProto.Builder mergeFrom(Message other)

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++.

Parameter
NameDescription
otherMessage
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

mergeOptions(DescriptorProtos.EnumOptions value)

public DescriptorProtos.EnumDescriptorProto.Builder mergeOptions(DescriptorProtos.EnumOptions value)

optional .google.protobuf.EnumOptions options = 3;

Parameter
NameDescription
valueDescriptorProtos.EnumOptions
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.EnumDescriptorProto.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

removeReservedRange(int index)

public DescriptorProtos.EnumDescriptorProto.Builder removeReservedRange(int index)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

removeValue(int index)

public DescriptorProtos.EnumDescriptorProto.Builder removeValue(int index)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.EnumDescriptorProto.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

setName(String value)

public DescriptorProtos.EnumDescriptorProto.Builder setName(String value)

optional string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DescriptorProtos.EnumDescriptorProto.Builder setNameBytes(ByteString value)

optional string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

setOptions(DescriptorProtos.EnumOptions value)

public DescriptorProtos.EnumDescriptorProto.Builder setOptions(DescriptorProtos.EnumOptions value)

optional .google.protobuf.EnumOptions options = 3;

Parameter
NameDescription
valueDescriptorProtos.EnumOptions
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setOptions(DescriptorProtos.EnumOptions.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder setOptions(DescriptorProtos.EnumOptions.Builder builderForValue)

optional .google.protobuf.EnumOptions options = 3;

Parameter
NameDescription
builderForValueDescriptorProtos.EnumOptions.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DescriptorProtos.EnumDescriptorProto.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

setReservedName(int index, String value)

public DescriptorProtos.EnumDescriptorProto.Builder setReservedName(int index, String value)

Reserved enum value names, which may not be reused. A given name may only be reserved once.

repeated string reserved_name = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The reservedName to set.

Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

This builder for chaining.

setReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

public DescriptorProtos.EnumDescriptorProto.Builder setReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange value)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameters
NameDescription
indexint
valueDescriptorProtos.EnumDescriptorProto.EnumReservedRange
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder setReservedRange(int index, DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder builderForValue)

Range of reserved numeric values. Reserved numeric values may not be used by enum values in the same enum declaration. Reserved ranges may not overlap.

repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.EnumDescriptorProto.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder
Overrides

setValue(int index, DescriptorProtos.EnumValueDescriptorProto value)

public DescriptorProtos.EnumDescriptorProto.Builder setValue(int index, DescriptorProtos.EnumValueDescriptorProto value)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameters
NameDescription
indexint
valueDescriptorProtos.EnumValueDescriptorProto
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder

setValue(int index, DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

public DescriptorProtos.EnumDescriptorProto.Builder setValue(int index, DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)

repeated .google.protobuf.EnumValueDescriptorProto value = 2;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.EnumValueDescriptorProto.Builder
Returns
TypeDescription
DescriptorProtos.EnumDescriptorProto.Builder