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

import api_pb2 as api__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.push = channel.unary_unary(
        '/HistoryService/push',
        request_serializer=api__pb2.HistoryRequest.SerializeToString,
        response_deserializer=api__pb2.BaseResponse.FromString,
        )
    self.pull = channel.unary_unary(
        '/HistoryService/pull',
        request_serializer=api__pb2.HistoriesRequest.SerializeToString,
        response_deserializer=api__pb2.ListHistories.FromString,
        )


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

  def push(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 pull(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_HistoryServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'push': grpc.unary_unary_rpc_method_handler(
          servicer.push,
          request_deserializer=api__pb2.HistoryRequest.FromString,
          response_serializer=api__pb2.BaseResponse.SerializeToString,
      ),
      'pull': grpc.unary_unary_rpc_method_handler(
          servicer.pull,
          request_deserializer=api__pb2.HistoriesRequest.FromString,
          response_serializer=api__pb2.ListHistories.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'HistoryService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
