class_docstr: 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.
code: def __init__(
      self,
      name,
      full_name,
      index,
      methods,
      options=None,
      serialized_options=None,
      file=None,  # pylint: disable=redefined-builtin
      serialized_start=None,
      serialized_end=None,
      create_key=None,
  ):
      if create_key is not _internal_create_key:
          _Deprecated("ServiceDescriptor")
  
      super(ServiceDescriptor, self).__init__(
          options,
          "ServiceOptions",
          name,
          full_name,
          file,
          None,
          serialized_start=serialized_start,
          serialized_end=serialized_end,
          serialized_options=serialized_options,
      )
      self.index = index
      self.methods = methods
      self.methods_by_name = dict((m.name, m) for m in methods)
      # Set the containing service for each method in this service.
      for method in self.methods:
          method.containing_service = self
  
imports: import threading
  import warnings
  from google.protobuf.internal import api_implementation
label_desc: Use image node_id 1 to create a new ServiceDescriptor object from inherited base classes: _NestedDescriptorBase with example: obj = ServiceDescriptor(name, full_name, index, methods, options, serialized_options, file, serialized_start, serialized_end, create_key)