Package google :: Package protobuf :: Module descriptor :: Class _NestedDescriptorBase
[hide private]
[frames] | no frames]

Class _NestedDescriptorBase

source code

    object --+    
             |    
DescriptorBase --+
                 |
                _NestedDescriptorBase
Known Subclasses:

Common class for descriptors that can be nested.

Instance Methods [hide private]
 
__init__(self, options, options_class_name, name, full_name, file, containing_type, serialized_start=None, serialized_end=None, serialized_options=None)
Constructor.
source code
 
CopyToProto(self, proto)
Copies this to the matching proto in descriptor_pb2.
source code

Inherited from DescriptorBase: GetOptions

Inherited from DescriptorBase (private): _SetOptions

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

Class Variables [hide private]

Inherited from DescriptorBase (private): _C_DESCRIPTOR_CLASS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, options, options_class_name, name, full_name, file, containing_type, serialized_start=None, serialized_end=None, serialized_options=None)
(Constructor)

source code 
Constructor.

Args:
  options: Protocol message options or None
    to use default message options.
  options_class_name: (str) The class name of the above options.

  name: (str) Name of this protocol message type.
  full_name: (str) Fully-qualified name of this protocol message type,
    which will include protocol "package" name and the name of any
    enclosing types.
  file: (FileDescriptor) Reference to file info.
  containing_type: if provided, this is a nested descriptor, with this
    descriptor as parent, otherwise None.
  serialized_start: The start index (inclusive) in block in the
    file.serialized_pb that describes this descriptor.
  serialized_end: The end index (exclusive) in block in the
    file.serialized_pb that describes this descriptor.
  serialized_options: Protocol message serilized options or None.

Overrides: object.__init__

CopyToProto(self, proto)

source code 
Copies this to the matching proto in descriptor_pb2.

Args:
  proto: An empty proto instance from descriptor_pb2.

Raises:
  Error: If self couldnt be serialized, due to to few constructor arguments.