Package google :: Package protobuf :: Module descriptor :: Class EnumValueDescriptor
[frames] | no frames]

Class EnumValueDescriptor

source code

    object --+    
             |    
DescriptorBase --+
                 |
                EnumValueDescriptor

Descriptor for a single value within an enum.

name: (str) Name of this value.
index: (int) Dense, 0-indexed index giving the order that this
  value appears textually within its enum in the .proto file.
number: (int) Actual number assigned to this enum value.
type: (EnumDescriptor) EnumDescriptor to which this value
  belongs.  Set by EnumDescriptor's constructor if we're
  passed into one.
options: (descriptor_pb2.EnumValueOptions) Enum value options message or
  None to use default enum value options options.

Instance Methods
a new object with type S, a subtype of T
__new__(cls, name, index, number, type=None, options=None) source code
 
__init__(self, name, index, number, type=None, options=None)
Arguments are as described in the attribute description above.
source code

Inherited from DescriptorBase: GetOptions

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__new__(cls, name, index, number, type=None, options=None)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, name, index, number, type=None, options=None)
(Constructor)

source code 

Arguments are as described in the attribute description above.

Overrides: object.__init__