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

Class ServiceDescriptor

source code

       object --+        
                |        
   DescriptorBase --+    
                    |    
_NestedDescriptorBase --+
                        |
                       ServiceDescriptor

Descriptor for a service.

name: (str) Name of the service.
full_name: (str) Full name of the service, including package name.
index: (int) 0-indexed index giving the order that this services
  definition appears withing the .proto file.
methods: (list of MethodDescriptor) List of methods provided by this
  service.
methods_by_name: (dict str -> MethodDescriptor) Same MethodDescriptor
  objects as in |methods_by_name|, but indexed by "name" attribute in each
  MethodDescriptor.
options: (descriptor_pb2.ServiceOptions) Service options message or
  None to use default service options.
file: (FileDescriptor) Reference to file info.

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None) source code
 
__init__(self, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None)
Constructor.
source code
 
FindMethodByName(self, name)
Searches for the specified method, and returns its descriptor.
source code
 
CopyToProto(self, proto)
Copies this to a descriptor_pb2.ServiceDescriptorProto.
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.ServiceDescriptor
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=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, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=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__
(inherited documentation)

CopyToProto(self, proto)

source code 
Copies this to a descriptor_pb2.ServiceDescriptorProto.

Args:
  proto: An empty descriptor_pb2.ServiceDescriptorProto.

Overrides: _NestedDescriptorBase.CopyToProto