# Class Descriptors.EnumValueDescriptor (3.19.4)

    public static final class Descriptors.EnumValueDescriptor extends Descriptors.GenericDescriptor implements Internal.EnumLite

Describes one value within an enum type. Note that multiple defined values may have the same
number. In generated Java code, all values with the same number after the first become aliases
of the first. However, they still have independent EnumValueDescriptors.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [Descriptors.GenericDescriptor](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor) \> Descriptors.EnumValueDescriptor

## Implements

[Internal.EnumLite](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Internal.EnumLite)

## Inherited Members

[Descriptors.GenericDescriptor.getFile()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__) [Descriptors.GenericDescriptor.getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__) [Descriptors.GenericDescriptor.getName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__) [Descriptors.GenericDescriptor.toProto()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Methods

### getFile()

    public Descriptors.FileDescriptor getFile()

Get the FileDescriptor containing this descriptor.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.FileDescriptor` |   |

**Overrides** [Descriptors.GenericDescriptor.getFile()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__)

### getFullName()

    public String getFullName()

Get the value's fully-qualified name.
**See Also:** [Descriptors.Descriptor#getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor#com_google_protobuf_Descriptors_Descriptor_getFullName__)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Descriptors.GenericDescriptor.getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__)

### getIndex()

    public int getIndex()

Get the index of this descriptor within its parent.
**See Also:** [Descriptors.Descriptor#getIndex()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor#com_google_protobuf_Descriptors_Descriptor_getIndex__)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getName()

    public String getName()

Get the value's unqualified name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Descriptors.GenericDescriptor.getName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__)

### getNumber()

    public int getNumber()

Get the value's number.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getOptions()

    public DescriptorProtos.EnumValueOptions getOptions()

Get the `EnumValueOptions`, defined in `descriptor.proto`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DescriptorProtos.EnumValueOptions` |   |

### getType()

    public Descriptors.EnumDescriptor getType()

Get the value's enum type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.EnumDescriptor` |   |

### toProto()

    public DescriptorProtos.EnumValueDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto` |   |

**Overrides** [Descriptors.GenericDescriptor.toProto()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__)

### toString()

    public String toString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)