<reponame>zxia-wish/eventmaster<filename>plugin_scripts/eventmaster_pb2_grpc.py
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import eventmaster_pb2 as eventmaster__pb2


class EventMasterStub(object):

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

    Args:
      channel: A grpc.Channel.
    """
    self.AddEvent = channel.unary_unary(
        '/eventmaster.EventMaster/AddEvent',
        request_serializer=eventmaster__pb2.Event.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.GetEvents = channel.unary_stream(
        '/eventmaster.EventMaster/GetEvents',
        request_serializer=eventmaster__pb2.Query.SerializeToString,
        response_deserializer=eventmaster__pb2.Event.FromString,
        )
    self.GetEventById = channel.unary_unary(
        '/eventmaster.EventMaster/GetEventById',
        request_serializer=eventmaster__pb2.EventId.SerializeToString,
        response_deserializer=eventmaster__pb2.Event.FromString,
        )
    self.GetEventIds = channel.unary_stream(
        '/eventmaster.EventMaster/GetEventIds',
        request_serializer=eventmaster__pb2.TimeQuery.SerializeToString,
        response_deserializer=eventmaster__pb2.EventId.FromString,
        )
    self.AddTopic = channel.unary_unary(
        '/eventmaster.EventMaster/AddTopic',
        request_serializer=eventmaster__pb2.Topic.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.UpdateTopic = channel.unary_unary(
        '/eventmaster.EventMaster/UpdateTopic',
        request_serializer=eventmaster__pb2.UpdateTopicRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.DeleteTopic = channel.unary_unary(
        '/eventmaster.EventMaster/DeleteTopic',
        request_serializer=eventmaster__pb2.DeleteTopicRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.GetTopics = channel.unary_unary(
        '/eventmaster.EventMaster/GetTopics',
        request_serializer=eventmaster__pb2.EmptyRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.TopicResult.FromString,
        )
    self.AddDc = channel.unary_unary(
        '/eventmaster.EventMaster/AddDc',
        request_serializer=eventmaster__pb2.Dc.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.UpdateDc = channel.unary_unary(
        '/eventmaster.EventMaster/UpdateDc',
        request_serializer=eventmaster__pb2.UpdateDcRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.WriteResponse.FromString,
        )
    self.GetDcs = channel.unary_unary(
        '/eventmaster.EventMaster/GetDcs',
        request_serializer=eventmaster__pb2.EmptyRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.DcResult.FromString,
        )
    self.Healthcheck = channel.unary_unary(
        '/eventmaster.EventMaster/Healthcheck',
        request_serializer=eventmaster__pb2.HealthcheckRequest.SerializeToString,
        response_deserializer=eventmaster__pb2.HealthcheckResponse.FromString,
        )


class EventMasterServicer(object):

  def AddEvent(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetEvents(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetEventById(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetEventIds(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AddTopic(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateTopic(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteTopic(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetTopics(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AddDc(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateDc(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetDcs(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Healthcheck(self, request, context):
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_EventMasterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AddEvent': grpc.unary_unary_rpc_method_handler(
          servicer.AddEvent,
          request_deserializer=eventmaster__pb2.Event.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'GetEvents': grpc.unary_stream_rpc_method_handler(
          servicer.GetEvents,
          request_deserializer=eventmaster__pb2.Query.FromString,
          response_serializer=eventmaster__pb2.Event.SerializeToString,
      ),
      'GetEventById': grpc.unary_unary_rpc_method_handler(
          servicer.GetEventById,
          request_deserializer=eventmaster__pb2.EventId.FromString,
          response_serializer=eventmaster__pb2.Event.SerializeToString,
      ),
      'GetEventIds': grpc.unary_stream_rpc_method_handler(
          servicer.GetEventIds,
          request_deserializer=eventmaster__pb2.TimeQuery.FromString,
          response_serializer=eventmaster__pb2.EventId.SerializeToString,
      ),
      'AddTopic': grpc.unary_unary_rpc_method_handler(
          servicer.AddTopic,
          request_deserializer=eventmaster__pb2.Topic.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'UpdateTopic': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateTopic,
          request_deserializer=eventmaster__pb2.UpdateTopicRequest.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'DeleteTopic': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteTopic,
          request_deserializer=eventmaster__pb2.DeleteTopicRequest.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'GetTopics': grpc.unary_unary_rpc_method_handler(
          servicer.GetTopics,
          request_deserializer=eventmaster__pb2.EmptyRequest.FromString,
          response_serializer=eventmaster__pb2.TopicResult.SerializeToString,
      ),
      'AddDc': grpc.unary_unary_rpc_method_handler(
          servicer.AddDc,
          request_deserializer=eventmaster__pb2.Dc.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'UpdateDc': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateDc,
          request_deserializer=eventmaster__pb2.UpdateDcRequest.FromString,
          response_serializer=eventmaster__pb2.WriteResponse.SerializeToString,
      ),
      'GetDcs': grpc.unary_unary_rpc_method_handler(
          servicer.GetDcs,
          request_deserializer=eventmaster__pb2.EmptyRequest.FromString,
          response_serializer=eventmaster__pb2.DcResult.SerializeToString,
      ),
      'Healthcheck': grpc.unary_unary_rpc_method_handler(
          servicer.Healthcheck,
          request_deserializer=eventmaster__pb2.HealthcheckRequest.FromString,
          response_serializer=eventmaster__pb2.HealthcheckResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'eventmaster.EventMaster', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
