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

from grakn_protocol.protobuf import database_pb2 as protobuf_dot_database__pb2
from grakn_protocol.protobuf import session_pb2 as protobuf_dot_session__pb2
from grakn_protocol.protobuf import transaction_pb2 as protobuf_dot_transaction__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.database_contains = channel.unary_unary(
        '/grakn.protocol.Grakn/database_contains',
        request_serializer=protobuf_dot_database__pb2.Database.Contains.Req.SerializeToString,
        response_deserializer=protobuf_dot_database__pb2.Database.Contains.Res.FromString,
        )
    self.database_create = channel.unary_unary(
        '/grakn.protocol.Grakn/database_create',
        request_serializer=protobuf_dot_database__pb2.Database.Create.Req.SerializeToString,
        response_deserializer=protobuf_dot_database__pb2.Database.Create.Res.FromString,
        )
    self.database_all = channel.unary_unary(
        '/grakn.protocol.Grakn/database_all',
        request_serializer=protobuf_dot_database__pb2.Database.All.Req.SerializeToString,
        response_deserializer=protobuf_dot_database__pb2.Database.All.Res.FromString,
        )
    self.database_delete = channel.unary_unary(
        '/grakn.protocol.Grakn/database_delete',
        request_serializer=protobuf_dot_database__pb2.Database.Delete.Req.SerializeToString,
        response_deserializer=protobuf_dot_database__pb2.Database.Delete.Res.FromString,
        )
    self.session_open = channel.unary_unary(
        '/grakn.protocol.Grakn/session_open',
        request_serializer=protobuf_dot_session__pb2.Session.Open.Req.SerializeToString,
        response_deserializer=protobuf_dot_session__pb2.Session.Open.Res.FromString,
        )
    self.session_close = channel.unary_unary(
        '/grakn.protocol.Grakn/session_close',
        request_serializer=protobuf_dot_session__pb2.Session.Close.Req.SerializeToString,
        response_deserializer=protobuf_dot_session__pb2.Session.Close.Res.FromString,
        )
    self.session_pulse = channel.unary_unary(
        '/grakn.protocol.Grakn/session_pulse',
        request_serializer=protobuf_dot_session__pb2.Session.Pulse.Req.SerializeToString,
        response_deserializer=protobuf_dot_session__pb2.Session.Pulse.Res.FromString,
        )
    self.transaction = channel.stream_stream(
        '/grakn.protocol.Grakn/transaction',
        request_serializer=protobuf_dot_transaction__pb2.Transaction.Req.SerializeToString,
        response_deserializer=protobuf_dot_transaction__pb2.Transaction.Res.FromString,
        )


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

  def database_contains(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 database_create(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 database_all(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 database_delete(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 session_open(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 session_close(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 session_pulse(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 transaction(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 add_GraknServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'database_contains': grpc.unary_unary_rpc_method_handler(
          servicer.database_contains,
          request_deserializer=protobuf_dot_database__pb2.Database.Contains.Req.FromString,
          response_serializer=protobuf_dot_database__pb2.Database.Contains.Res.SerializeToString,
      ),
      'database_create': grpc.unary_unary_rpc_method_handler(
          servicer.database_create,
          request_deserializer=protobuf_dot_database__pb2.Database.Create.Req.FromString,
          response_serializer=protobuf_dot_database__pb2.Database.Create.Res.SerializeToString,
      ),
      'database_all': grpc.unary_unary_rpc_method_handler(
          servicer.database_all,
          request_deserializer=protobuf_dot_database__pb2.Database.All.Req.FromString,
          response_serializer=protobuf_dot_database__pb2.Database.All.Res.SerializeToString,
      ),
      'database_delete': grpc.unary_unary_rpc_method_handler(
          servicer.database_delete,
          request_deserializer=protobuf_dot_database__pb2.Database.Delete.Req.FromString,
          response_serializer=protobuf_dot_database__pb2.Database.Delete.Res.SerializeToString,
      ),
      'session_open': grpc.unary_unary_rpc_method_handler(
          servicer.session_open,
          request_deserializer=protobuf_dot_session__pb2.Session.Open.Req.FromString,
          response_serializer=protobuf_dot_session__pb2.Session.Open.Res.SerializeToString,
      ),
      'session_close': grpc.unary_unary_rpc_method_handler(
          servicer.session_close,
          request_deserializer=protobuf_dot_session__pb2.Session.Close.Req.FromString,
          response_serializer=protobuf_dot_session__pb2.Session.Close.Res.SerializeToString,
      ),
      'session_pulse': grpc.unary_unary_rpc_method_handler(
          servicer.session_pulse,
          request_deserializer=protobuf_dot_session__pb2.Session.Pulse.Req.FromString,
          response_serializer=protobuf_dot_session__pb2.Session.Pulse.Res.SerializeToString,
      ),
      'transaction': grpc.stream_stream_rpc_method_handler(
          servicer.transaction,
          request_deserializer=protobuf_dot_transaction__pb2.Transaction.Req.FromString,
          response_serializer=protobuf_dot_transaction__pb2.Transaction.Res.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grakn.protocol.Grakn', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
