Package google :: Package protobuf :: Module descriptor :: Class OneofDescriptor
[hide private]
[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 [hide private]
a new object with type S, a subtype of T
__new__(cls, name, full_name, index, containing_type, fields, options=None, serialized_options=None) source code
 
__init__(self, name, full_name, index, containing_type, fields, options=None, serialized_options=None)
Arguments are as described in the attribute description above.
source code

Inherited from DescriptorBase: GetOptions

Inherited from DescriptorBase (private): _SetOptions

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

Class Variables [hide private]
  _C_DESCRIPTOR_CLASS = _message.OneofDescriptor
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, name, full_name, index, containing_type, fields, options=None, serialized_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, serialized_options=None)
(Constructor)

source code 

Arguments are as described in the attribute description above.

Overrides: object.__init__