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

from capsule8.api.v0 import nyql_service_pb2 as capsule8_dot_api_dot_v0_dot_nyql__service__pb2


class NYQLServiceStub(object):
  """
  Capsule8 NYQL API

  The NYQL API is used by capsulators to convert NYQL queries into other forms.

  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateSubscription = channel.unary_unary(
        '/capsule8.api.v0.NYQLService/CreateSubscription',
        request_serializer=capsule8_dot_api_dot_v0_dot_nyql__service__pb2.CreateSubscriptionRequest.SerializeToString,
        response_deserializer=capsule8_dot_api_dot_v0_dot_nyql__service__pb2.CreateSubscriptionResponse.FromString,
        )


class NYQLServiceServicer(object):
  """
  Capsule8 NYQL API

  The NYQL API is used by capsulators to convert NYQL queries into other forms.

  """

  def CreateSubscription(self, request, context):
    """Publishes messages to a topic
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_NYQLServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateSubscription': grpc.unary_unary_rpc_method_handler(
          servicer.CreateSubscription,
          request_deserializer=capsule8_dot_api_dot_v0_dot_nyql__service__pb2.CreateSubscriptionRequest.FromString,
          response_serializer=capsule8_dot_api_dot_v0_dot_nyql__service__pb2.CreateSubscriptionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'capsule8.api.v0.NYQLService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
