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

import outputs_pb2 as outputs__pb2


class serviceStub(object):
  """This service defines the RPC methods
  to `request` a stream of output `response`s.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.sub = channel.stream_stream(
        '/falco.outputs.service/sub',
        request_serializer=outputs__pb2.request.SerializeToString,
        response_deserializer=outputs__pb2.response.FromString,
        )
    self.get = channel.unary_stream(
        '/falco.outputs.service/get',
        request_serializer=outputs__pb2.request.SerializeToString,
        response_deserializer=outputs__pb2.response.FromString,
        )


class serviceServicer(object):
  """This service defines the RPC methods
  to `request` a stream of output `response`s.
  """

  def sub(self, request_iterator, context):
    """Subscribe to a stream of Falco outputs by sending a stream of requests.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def get(self, request, context):
    """Get all the Falco outputs present in the system up to this call.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_serviceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'sub': grpc.stream_stream_rpc_method_handler(
          servicer.sub,
          request_deserializer=outputs__pb2.request.FromString,
          response_serializer=outputs__pb2.response.SerializeToString,
      ),
      'get': grpc.unary_stream_rpc_method_handler(
          servicer.get,
          request_deserializer=outputs__pb2.request.FromString,
          response_serializer=outputs__pb2.response.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'falco.outputs.service', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
