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

from grid.protos.grid.v1 import event_service_pb2 as grid_dot_v1_dot_event__service__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetEvents = channel.unary_unary(
        '/grid.v1.EventService/GetEvents',
        request_serializer=grid_dot_v1_dot_event__service__pb2.GetEventsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_event__service__pb2.GetEventsResponse.FromString,
        )
    self.WatchEvents = channel.unary_stream(
        '/grid.v1.EventService/WatchEvents',
        request_serializer=grid_dot_v1_dot_event__service__pb2.WatchEventsRequest.SerializeToString,
        response_deserializer=grid_dot_v1_dot_event__service__pb2.WatchEventsResponse.FromString,
        )


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

  def GetEvents(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 WatchEvents(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_EventServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetEvents': grpc.unary_unary_rpc_method_handler(
          servicer.GetEvents,
          request_deserializer=grid_dot_v1_dot_event__service__pb2.GetEventsRequest.FromString,
          response_serializer=grid_dot_v1_dot_event__service__pb2.GetEventsResponse.SerializeToString,
      ),
      'WatchEvents': grpc.unary_stream_rpc_method_handler(
          servicer.WatchEvents,
          request_deserializer=grid_dot_v1_dot_event__service__pb2.WatchEventsRequest.FromString,
          response_serializer=grid_dot_v1_dot_event__service__pb2.WatchEventsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'grid.v1.EventService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
