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

Class OneofDescriptor

source code

    object --+    
             |    
DescriptorBase --+
                 |
                OneofDescriptor

Descriptor for a oneof field.

name: (str) Name of the oneof field.
full_name: (str) Full name of the oneof field, including package name.
index: (int) 0-based index giving the order of the oneof field inside
  its containing type.
containing_type: (Descriptor) Descriptor of the protocol message
  type that contains this field.  Set by the Descriptor constructor
  if we're passed into one.
fields: (list of FieldDescriptor) The list of field descriptors this
  oneof can contain.

Instance Methods
a new object with type S, a subtype of T
__new__(cls, name, full_name, index, containing_type, fields, options=None) source code
 
__init__(self, name, full_name, index, containing_type, fields, 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, full_name, index, containing_type, fields, options=None)

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

__init__(self, name, full_name, index, containing_type, fields, options=None)
(Constructor)

source code 

Arguments are as described in the attribute description above.

Overrides: object.__init__