# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import coprocess_object_pb2 as coprocess__object__pb2


class DispatcherStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.Dispatch = channel.unary_unary(
        '/coprocess.Dispatcher/Dispatch',
        request_serializer=coprocess__object__pb2.Object.SerializeToString,
        response_deserializer=coprocess__object__pb2.Object.FromString,
        )
    self.DispatchEvent = channel.unary_unary(
        '/coprocess.Dispatcher/DispatchEvent',
        request_serializer=coprocess__object__pb2.Event.SerializeToString,
        response_deserializer=coprocess__object__pb2.EventReply.FromString,
        )


class DispatcherServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def Dispatch(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DispatchEvent(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_DispatcherServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Dispatch': grpc.unary_unary_rpc_method_handler(
          servicer.Dispatch,
          request_deserializer=coprocess__object__pb2.Object.FromString,
          response_serializer=coprocess__object__pb2.Object.SerializeToString,
      ),
      'DispatchEvent': grpc.unary_unary_rpc_method_handler(
          servicer.DispatchEvent,
          request_deserializer=coprocess__object__pb2.Event.FromString,
          response_serializer=coprocess__object__pb2.EventReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'coprocess.Dispatcher', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
