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

import book_pb2 as book__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.SubmitBook = channel.unary_unary(
        '/RelevantBooks/SubmitBook',
        request_serializer=book__pb2.Book.SerializeToString,
        response_deserializer=book__pb2.BookResponse.FromString,
        )
    self.GetBooks = channel.unary_unary(
        '/RelevantBooks/GetBooks',
        request_serializer=book__pb2.BookQuery.SerializeToString,
        response_deserializer=book__pb2.BooksResponse.FromString,
        )
    self.RemoveBook = channel.unary_unary(
        '/RelevantBooks/RemoveBook',
        request_serializer=book__pb2.Book.SerializeToString,
        response_deserializer=book__pb2.BookResponse.FromString,
        )


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

  def SubmitBook(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 GetBooks(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 RemoveBook(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_RelevantBooksServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SubmitBook': grpc.unary_unary_rpc_method_handler(
          servicer.SubmitBook,
          request_deserializer=book__pb2.Book.FromString,
          response_serializer=book__pb2.BookResponse.SerializeToString,
      ),
      'GetBooks': grpc.unary_unary_rpc_method_handler(
          servicer.GetBooks,
          request_deserializer=book__pb2.BookQuery.FromString,
          response_serializer=book__pb2.BooksResponse.SerializeToString,
      ),
      'RemoveBook': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveBook,
          request_deserializer=book__pb2.Book.FromString,
          response_serializer=book__pb2.BookResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'RelevantBooks', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
