Class DescriptorProtos.EnumOptions.Builder (3.19.4)

public static final class DescriptorProtos.EnumOptions.Builder extends GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.EnumOptions,DescriptorProtos.EnumOptions.Builder> implements DescriptorProtos.EnumOptionsOrBuilder

Protobuf type google.protobuf.EnumOptions

Static Methods

getDescriptor()

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

Methods

<Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,List<Type>> extension, Type value)

public DescriptorProtos.EnumOptions.Builder <Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,List<Type>> extension, Type value)

Append a value to a repeated extension.

Parameters
NameDescription
extensionGeneratedExtension<EnumOptions,List<Type>>
valueType
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

<Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,?> extension)

public DescriptorProtos.EnumOptions.Builder <Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,?> extension)

Clear an extension.

Parameter
NameDescription
extensionGeneratedExtension<EnumOptions,?>
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,Type> extension, Type value)

public DescriptorProtos.EnumOptions.Builder <Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,Type> extension, Type value)

Set the value of an extension.

Parameters
NameDescription
extensionGeneratedExtension<EnumOptions,Type>
valueType
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,List<Type>> extension, int index, Type value)

public DescriptorProtos.EnumOptions.Builder <Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.EnumOptions,List<Type>> extension, int index, Type value)

Set the value of one element of a repeated extension.

Parameters
NameDescription
extensionGeneratedExtension<EnumOptions,List<Type>>
indexint
valueType
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)

public DescriptorProtos.EnumOptions.Builder addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.UninterpretedOption>
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addUninterpretedOption(DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.EnumOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

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

addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.EnumOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

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

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.EnumOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.EnumOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.Builder
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

addUninterpretedOptionBuilder()

public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addUninterpretedOptionBuilder(int index)

public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder(int index)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

build()

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

buildPartial()

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

clear()

public DescriptorProtos.EnumOptions.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.EnumOptions.Builder
Overrides

clearAllowAlias()

public DescriptorProtos.EnumOptions.Builder clearAllowAlias()

Set this option to true to allow mapping different tag names to the same value.

optional bool allow_alias = 2;

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

This builder for chaining.

clearDeprecated()

public DescriptorProtos.EnumOptions.Builder clearDeprecated()

Is this enum deprecated? Depending on the target platform, this can emit Deprecated annotations for the enum, or it will be completely ignored; in the very least, this is a formalization for deprecating enums.

optional bool deprecated = 3 [default = false];

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

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

clearUninterpretedOption()

public DescriptorProtos.EnumOptions.Builder clearUninterpretedOption()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

clone()

public DescriptorProtos.EnumOptions.Builder clone()

Clones the Builder.

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

getAllowAlias()

public boolean getAllowAlias()

Set this option to true to allow mapping different tag names to the same value.

optional bool allow_alias = 2;

Returns
TypeDescription
boolean

The allowAlias.

getDefaultInstanceForType()

public DescriptorProtos.EnumOptions 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.EnumOptions

getDeprecated()

public boolean getDeprecated()

Is this enum deprecated? Depending on the target platform, this can emit Deprecated annotations for the enum, or it will be completely ignored; in the very least, this is a formalization for deprecating enums.

optional bool deprecated = 3 [default = false];

Returns
TypeDescription
boolean

The deprecated.

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

getUninterpretedOption(int index)

public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption

getUninterpretedOptionBuilder(int index)

public DescriptorProtos.UninterpretedOption.Builder getUninterpretedOptionBuilder(int index)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

getUninterpretedOptionBuilderList()

public List<DescriptorProtos.UninterpretedOption.Builder> getUninterpretedOptionBuilderList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<Builder>

getUninterpretedOptionCount()

public int getUninterpretedOptionCount()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
int

getUninterpretedOptionList()

public List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<UninterpretedOption>

getUninterpretedOptionOrBuilder(int index)

public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOptionOrBuilder

getUninterpretedOptionOrBuilderList()

public List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

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

hasAllowAlias()

public boolean hasAllowAlias()

Set this option to true to allow mapping different tag names to the same value.

optional bool allow_alias = 2;

Returns
TypeDescription
boolean

Whether the allowAlias field is set.

hasDeprecated()

public boolean hasDeprecated()

Is this enum deprecated? Depending on the target platform, this can emit Deprecated annotations for the enum, or it will be completely ignored; in the very least, this is a formalization for deprecating enums.

optional bool deprecated = 3 [default = false];

Returns
TypeDescription
boolean

Whether the deprecated 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.EnumOptions.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.EnumOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(DescriptorProtos.EnumOptions other)

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

mergeFrom(Message other)

public DescriptorProtos.EnumOptions.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.EnumOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder
Overrides

removeUninterpretedOption(int index)

public DescriptorProtos.EnumOptions.Builder removeUninterpretedOption(int index)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

setAllowAlias(boolean value)

public DescriptorProtos.EnumOptions.Builder setAllowAlias(boolean value)

Set this option to true to allow mapping different tag names to the same value.

optional bool allow_alias = 2;

Parameter
NameDescription
valueboolean

The allowAlias to set.

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

This builder for chaining.

setDeprecated(boolean value)

public DescriptorProtos.EnumOptions.Builder setDeprecated(boolean value)

Is this enum deprecated? Depending on the target platform, this can emit Deprecated annotations for the enum, or it will be completely ignored; in the very least, this is a formalization for deprecating enums.

optional bool deprecated = 3 [default = false];

Parameter
NameDescription
valueboolean

The deprecated to set.

Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.EnumOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.EnumOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.Builder
Returns
TypeDescription
DescriptorProtos.EnumOptions.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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