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

import kv_pb2 as kv__pb2


class KVStub(object):

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/proto.KV/Get',
        request_serializer=kv__pb2.GetRequest.SerializeToString,
        response_deserializer=kv__pb2.GetResponse.FromString,
        )
    self.Put = channel.unary_unary(
        '/proto.KV/Put',
        request_serializer=kv__pb2.PutRequest.SerializeToString,
        response_deserializer=kv__pb2.Empty.FromString,
        )


class KVServicer(object):

  def Get(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Put(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_KVServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=kv__pb2.GetRequest.FromString,
          response_serializer=kv__pb2.GetResponse.SerializeToString,
      ),
      'Put': grpc.unary_unary_rpc_method_handler(
          servicer.Put,
          request_deserializer=kv__pb2.PutRequest.FromString,
          response_serializer=kv__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'proto.KV', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
