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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > DescriptorProtos.EnumDescriptorProto.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values |
Iterable<String> The reservedName to add. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRange> |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto> |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public DescriptorProtos.EnumDescriptorProto.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
Descriptors.FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
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 | |
---|---|
Name | Description |
value |
String The reservedName to add. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
ByteString The bytes of the reservedName to add. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
value |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder |
addValue(DescriptorProtos.EnumValueDescriptorProto value)
public DescriptorProtos.EnumDescriptorProto.Builder addValue(DescriptorProtos.EnumValueDescriptorProto value)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
value |
DescriptorProtos.EnumValueDescriptorProto |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
addValue(DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)
public DescriptorProtos.EnumDescriptorProto.Builder addValue(DescriptorProtos.EnumValueDescriptorProto.Builder builderForValue)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
builderForValue |
DescriptorProtos.EnumValueDescriptorProto.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
value |
DescriptorProtos.EnumValueDescriptorProto |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
DescriptorProtos.EnumValueDescriptorProto.Builder |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
addValueBuilder()
public DescriptorProtos.EnumValueDescriptorProto.Builder addValueBuilder()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumValueDescriptorProto.Builder |
addValueBuilder(int index)
public DescriptorProtos.EnumValueDescriptorProto.Builder addValueBuilder(int index)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumValueDescriptorProto.Builder |
build()
public DescriptorProtos.EnumDescriptorProto build()
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto |
buildPartial()
public DescriptorProtos.EnumDescriptorProto buildPartial()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
clearField(Descriptors.FieldDescriptor field)
public DescriptorProtos.EnumDescriptorProto.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
Descriptors.FieldDescriptor |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
clearName()
public DescriptorProtos.EnumDescriptorProto.Builder clearName()
optional string name = 1;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
oneof |
Descriptors.OneofDescriptor |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
clearOptions()
public DescriptorProtos.EnumDescriptorProto.Builder clearOptions()
optional .google.protobuf.EnumOptions options = 3;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
clearValue()
public DescriptorProtos.EnumDescriptorProto.Builder clearValue()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
clone()
public DescriptorProtos.EnumDescriptorProto.Builder clone()
Clones the Builder.
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Descriptors.Descriptor |
getName()
public String getName()
optional string name = 1;
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()
optional string name = 1;
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getOptions()
public DescriptorProtos.EnumOptions getOptions()
optional .google.protobuf.EnumOptions options = 3;
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumOptions |
The options. |
getOptionsBuilder()
public DescriptorProtos.EnumOptions.Builder getOptionsBuilder()
optional .google.protobuf.EnumOptions options = 3;
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumOptions.Builder |
getOptionsOrBuilder()
public DescriptorProtos.EnumOptionsOrBuilder getOptionsOrBuilder()
optional .google.protobuf.EnumOptions options = 3;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int The index of the element to return. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int The index of the value to return. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
List<? extends com.google.protobuf.DescriptorProtos.EnumDescriptorProto.EnumReservedRangeOrBuilder> |
getValue(int index)
public DescriptorProtos.EnumValueDescriptorProto getValue(int index)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumValueDescriptorProto |
getValueBuilder(int index)
public DescriptorProtos.EnumValueDescriptorProto.Builder getValueBuilder(int index)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumValueDescriptorProto.Builder |
getValueBuilderList()
public List<DescriptorProtos.EnumValueDescriptorProto.Builder> getValueBuilderList()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
List<Builder> |
getValueCount()
public int getValueCount()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
int |
getValueList()
public List<DescriptorProtos.EnumValueDescriptorProto> getValueList()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
List<EnumValueDescriptorProto> |
getValueOrBuilder(int index)
public DescriptorProtos.EnumValueDescriptorProtoOrBuilder getValueOrBuilder(int index)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumValueDescriptorProtoOrBuilder |
getValueOrBuilderList()
public List<? extends DescriptorProtos.EnumValueDescriptorProtoOrBuilder> getValueOrBuilderList()
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Returns | |
---|---|
Type | Description |
List<? extends com.google.protobuf.DescriptorProtos.EnumValueDescriptorProtoOrBuilder> |
hasName()
public boolean hasName()
optional string name = 1;
Returns | |
---|---|
Type | Description |
boolean |
Whether the name field is set. |
hasOptions()
public boolean hasOptions()
optional .google.protobuf.EnumOptions options = 3;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
GeneratedMessageV3.FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false otherwise.
Returns | |
---|---|
Type | Description |
boolean |
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 | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(DescriptorProtos.EnumDescriptorProto other)
public DescriptorProtos.EnumDescriptorProto.Builder mergeFrom(DescriptorProtos.EnumDescriptorProto other)
Parameter | |
---|---|
Name | Description |
other |
DescriptorProtos.EnumDescriptorProto |
Returns | |
---|---|
Type | Description |
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
, thenother
'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 | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
mergeOptions(DescriptorProtos.EnumOptions value)
public DescriptorProtos.EnumDescriptorProto.Builder mergeOptions(DescriptorProtos.EnumOptions value)
optional .google.protobuf.EnumOptions options = 3;
Parameter | |
---|---|
Name | Description |
value |
DescriptorProtos.EnumOptions |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
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 | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
removeValue(int index)
public DescriptorProtos.EnumDescriptorProto.Builder removeValue(int index)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public DescriptorProtos.EnumDescriptorProto.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
Descriptors.FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setName(String value)
public DescriptorProtos.EnumDescriptorProto.Builder setName(String value)
optional string name = 1;
Parameter | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public DescriptorProtos.EnumDescriptorProto.Builder setNameBytes(ByteString value)
optional string name = 1;
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
DescriptorProtos.EnumOptions |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setOptions(DescriptorProtos.EnumOptions.Builder builderForValue)
public DescriptorProtos.EnumDescriptorProto.Builder setOptions(DescriptorProtos.EnumOptions.Builder builderForValue)
optional .google.protobuf.EnumOptions options = 3;
Parameter | |
---|---|
Name | Description |
builderForValue |
DescriptorProtos.EnumOptions.Builder |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public DescriptorProtos.EnumDescriptorProto.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
Descriptors.FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
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 | |
---|---|
Name | Description |
index |
int The index to set the value at. |
value |
String The reservedName to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
value |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
DescriptorProtos.EnumDescriptorProto.EnumReservedRange.Builder |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final DescriptorProtos.EnumDescriptorProto.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |
setValue(int index, DescriptorProtos.EnumValueDescriptorProto value)
public DescriptorProtos.EnumDescriptorProto.Builder setValue(int index, DescriptorProtos.EnumValueDescriptorProto value)
repeated .google.protobuf.EnumValueDescriptorProto value = 2;
Parameters | |
---|---|
Name | Description |
index |
int |
value |
DescriptorProtos.EnumValueDescriptorProto |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index |
int |
builderForValue |
DescriptorProtos.EnumValueDescriptorProto.Builder |
Returns | |
---|---|
Type | Description |
DescriptorProtos.EnumDescriptorProto.Builder |