Public Member Functions | Public Attributes | Static Private Attributes | List of all members
google.protobuf.descriptor.ServiceDescriptor Class Reference
Inheritance diagram for google.protobuf.descriptor.ServiceDescriptor:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None)
 
def __init__ (self, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None, create_key=None)
 
def __new__ (cls, name, full_name, index, methods, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None)
 
def __new__ (cls, name=None, full_name=None, index=None, methods=None, options=None, serialized_options=None, file=None, serialized_start=None, serialized_end=None, create_key=None)
 
def CopyToProto (self, proto)
 
def CopyToProto (self, proto)
 
def FindMethodByName (self, name)
 
def FindMethodByName (self, name)
 
- Public Member Functions inherited from google.protobuf.descriptor.DescriptorBase
def __init__ (self, options, serialized_options, options_class_name)
 
def __init__ (self, options, serialized_options, options_class_name)
 
def GetOptions (self)
 
def GetOptions (self)
 
- Public Member Functions inherited from google.protobuf.descriptor.DescriptorMetaclass
def __instancecheck__ (cls, obj)
 
def __instancecheck__ (cls, obj)
 

Public Attributes

 index
 
 methods
 
 methods_by_name
 
- Public Attributes inherited from google.protobuf.descriptor._NestedDescriptorBase
 containing_type
 
 file
 
 full_name
 
 name
 
- Public Attributes inherited from google.protobuf.descriptor.DescriptorBase
 has_options
 

Static Private Attributes

 _C_DESCRIPTOR_CLASS = _message.ServiceDescriptor
 

Detailed Description

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.
Descriptor for a service.

Attributes:
  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 within the .proto file.
  methods (list[MethodDescriptor]): List of methods provided by this
    service.
  methods_by_name (dict(str, MethodDescriptor)): Same
    :class:`MethodDescriptor` objects as in :attr:`methods_by_name`, but
    indexed by "name" attribute in each :class:`MethodDescriptor`.
  options (descriptor_pb2.ServiceOptions): Service options message or
    None to use default service options.
  file (FileDescriptor): Reference to file info.

Definition at line 749 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def google.protobuf.descriptor.ServiceDescriptor.__init__ (   self,
  options,
  options_class_name,
  name,
  full_name,
  file = None,
  containing_type = None,
  serialized_start = None,
  serialized_end = None,
  serialized_options = None 
)
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.

Reimplemented from google.protobuf.descriptor._NestedDescriptorBase.

Definition at line 776 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

◆ __init__() [2/2]

def google.protobuf.descriptor.ServiceDescriptor.__init__ (   self,
  name,
  full_name,
  index,
  methods,
  options = None,
  serialized_options = None,
  file = None,
  serialized_start = None,
  serialized_end = None,
  create_key = None 
)

Member Function Documentation

◆ __new__() [1/2]

def google.protobuf.descriptor.ServiceDescriptor.__new__ (   cls,
  name,
  full_name,
  index,
  methods,
  options = None,
  serialized_options = None,
  file = None,
  serialized_start = None,
  serialized_end = None 
)

◆ __new__() [2/2]

def google.protobuf.descriptor.ServiceDescriptor.__new__ (   cls,
  name = None,
  full_name = None,
  index = None,
  methods = None,
  options = None,
  serialized_options = None,
  file = None,
  serialized_start = None,
  serialized_end = None,
  create_key = None 
)

◆ CopyToProto() [1/2]

def google.protobuf.descriptor.ServiceDescriptor.CopyToProto (   self,
  proto 
)
Copies this to a descriptor_pb2.ServiceDescriptorProto.

Args:
  proto: An empty descriptor_pb2.ServiceDescriptorProto.

Reimplemented from google.protobuf.descriptor._NestedDescriptorBase.

Definition at line 794 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

◆ CopyToProto() [2/2]

def google.protobuf.descriptor.ServiceDescriptor.CopyToProto (   self,
  proto 
)
Copies this to a descriptor_pb2.ServiceDescriptorProto.

Args:
  proto (descriptor_pb2.ServiceDescriptorProto): An empty descriptor proto.

Reimplemented from google.protobuf.descriptor._NestedDescriptorBase.

Definition at line 858 of file protobuf/python/google/protobuf/descriptor.py.

◆ FindMethodByName() [1/2]

def google.protobuf.descriptor.ServiceDescriptor.FindMethodByName (   self,
  name 
)
Searches for the specified method, and returns its descriptor.

Definition at line 790 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor.py.

◆ FindMethodByName() [2/2]

def google.protobuf.descriptor.ServiceDescriptor.FindMethodByName (   self,
  name 
)
Searches for the specified method, and returns its descriptor.

Args:
  name (str): Name of the method.
Returns:
  MethodDescriptor or None: the descriptor for the requested method, if
  found.

Definition at line 847 of file protobuf/python/google/protobuf/descriptor.py.

Member Data Documentation

◆ _C_DESCRIPTOR_CLASS

google.protobuf.descriptor.ServiceDescriptor._C_DESCRIPTOR_CLASS = _message.ServiceDescriptor
staticprivate

◆ index

google.protobuf.descriptor.ServiceDescriptor.index

◆ methods

google.protobuf.descriptor.ServiceDescriptor.methods

◆ methods_by_name

google.protobuf.descriptor.ServiceDescriptor.methods_by_name

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:24