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

from hypernets.dispatchers.process.grpc.proto import proc_pb2 as hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.run = channel.stream_stream(
        '/hypernets.dispatchers.process.grpc.proto.ProcessBroker/run',
        request_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.ProcessRequest.SerializeToString,
        response_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.FromString,
        )
    self.download = channel.unary_stream(
        '/hypernets.dispatchers.process.grpc.proto.ProcessBroker/download',
        request_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DownloadRequest.SerializeToString,
        response_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.FromString,
        )


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

  def run(self, request_iterator, 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 download(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_ProcessBrokerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'run': grpc.stream_stream_rpc_method_handler(
          servicer.run,
          request_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.ProcessRequest.FromString,
          response_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.SerializeToString,
      ),
      'download': grpc.unary_stream_rpc_method_handler(
          servicer.download,
          request_deserializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DownloadRequest.FromString,
          response_serializer=hypernets_dot_dispatchers_dot_process_dot_grpc_dot_proto_dot_proc__pb2.DataChunk.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'hypernets.dispatchers.process.grpc.proto.ProcessBroker', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
