Send feedback
Class EnumValueDescriptor (3.15.8)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.15.8 keyboard_arrow_down
public sealed class EnumValueDescriptor : DescriptorBase, IDescriptor
Descriptor for a single enum value within an enum in a .proto file.
Namespace
Google.Protobuf.Reflection
Assembly
Google.Protobuf.dll
Properties
CustomOptions
public CustomOptions CustomOptions { get; }
The (possibly empty) set of custom options for this enum value.
EnumDescriptor
public EnumDescriptor EnumDescriptor { get; }
Returns the enum descriptor that this value is part of.
Name
public override string Name { get; }
Returns the name of the enum value described by this object.
Property Value Type Description String
Overrides
Number
public int Number { get; }
Returns the number associated with this enum value.
Property Value Type Description Int32
Methods
GetOption<T>(Extension<EnumValueOptions, T>)
public T GetOption<T>(Extension<EnumValueOptions, T> extension)
Gets a single value enum value option for this descriptor
Type Parameter Name Description T
GetOption<T>(RepeatedExtension<EnumValueOptions, T>)
public RepeatedField<T> GetOption<T>(RepeatedExtension<EnumValueOptions, T> extension)
Gets a repeated value enum value option for this descriptor
Type Parameter Name Description T
GetOptions()
public EnumValueOptions GetOptions()
The EnumValueOptions
, defined in descriptor.proto
.
If the options message is not present (i.e. there are no options), null
is returned.
Custom options can be retrieved as extensions of the returned message.
NOTE: A defensive copy is created each time this property is retrieved.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-08-27 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?