parameters: (self, cls)
docstring: Constructs the service class.
  
      Args:
        cls: The class that will be constructed.
docstring_summary: Constructs the service class.
docstring_tokens: Constructs the service class .
function: def BuildService(self, cls):
      """Constructs the service class.
  
      Args:
        cls: The class that will be constructed.
      """
  
      # CallMethod needs to operate with an instance of the Service class. This
      # internal wrapper function exists only to be able to pass the service
      # instance to the method that does the real CallMethod work.
      def _WrapCallMethod(srvc, method_descriptor,
                          rpc_controller, request, callback):
        return self._CallMethod(srvc, method_descriptor,
                         rpc_controller, request, callback)
      self.cls = cls
      cls.CallMethod = _WrapCallMethod
      cls.GetDescriptor = staticmethod(lambda: self.descriptor)
      cls.GetDescriptor.__doc__ = "Returns the service descriptor."
      cls.GetRequestClass = self._GetRequestClass
      cls.GetResponseClass = self._GetResponseClass
      for method in self.descriptor.methods:
        setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
function_tokens: def BuildService ( self , cls ) : # CallMethod needs to operate with an instance of the Service class. This # internal wrapper function exists only to be able to pass the service # instance to the method that does the real CallMethod work. def _WrapCallMethod ( srvc , method_descriptor , rpc_controller , request , callback ) : return self . _CallMethod ( srvc , method_descriptor , rpc_controller , request , callback ) self . cls = cls cls . CallMethod = _WrapCallMethod cls . GetDescriptor = staticmethod ( lambda : self . descriptor ) cls . GetDescriptor . __doc__ = "Returns the service descriptor." cls . GetRequestClass = self . _GetRequestClass cls . GetResponseClass = self . _GetResponseClass for method in self . descriptor . methods : setattr ( cls , method . name , self . _GenerateNonImplementedMethod ( method ) )