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

from xain.grpc import coordinator_pb2 as xain_dot_grpc_dot_coordinator__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Rendezvous = channel.unary_unary(
        '/xain.protobuf.coordinator.Coordinator/Rendezvous',
        request_serializer=xain_dot_grpc_dot_coordinator__pb2.RendezvousRequest.SerializeToString,
        response_deserializer=xain_dot_grpc_dot_coordinator__pb2.RendezvousReply.FromString,
        )
    self.Heartbeat = channel.unary_unary(
        '/xain.protobuf.coordinator.Coordinator/Heartbeat',
        request_serializer=xain_dot_grpc_dot_coordinator__pb2.HeartbeatRequest.SerializeToString,
        response_deserializer=xain_dot_grpc_dot_coordinator__pb2.HeartbeatReply.FromString,
        )
    self.StartTraining = channel.unary_unary(
        '/xain.protobuf.coordinator.Coordinator/StartTraining',
        request_serializer=xain_dot_grpc_dot_coordinator__pb2.StartTrainingRequest.SerializeToString,
        response_deserializer=xain_dot_grpc_dot_coordinator__pb2.StartTrainingReply.FromString,
        )
    self.EndTraining = channel.unary_unary(
        '/xain.protobuf.coordinator.Coordinator/EndTraining',
        request_serializer=xain_dot_grpc_dot_coordinator__pb2.EndTrainingRequest.SerializeToString,
        response_deserializer=xain_dot_grpc_dot_coordinator__pb2.EndTrainingReply.FromString,
        )


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

  def Rendezvous(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 Heartbeat(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 StartTraining(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 EndTraining(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_CoordinatorServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Rendezvous': grpc.unary_unary_rpc_method_handler(
          servicer.Rendezvous,
          request_deserializer=xain_dot_grpc_dot_coordinator__pb2.RendezvousRequest.FromString,
          response_serializer=xain_dot_grpc_dot_coordinator__pb2.RendezvousReply.SerializeToString,
      ),
      'Heartbeat': grpc.unary_unary_rpc_method_handler(
          servicer.Heartbeat,
          request_deserializer=xain_dot_grpc_dot_coordinator__pb2.HeartbeatRequest.FromString,
          response_serializer=xain_dot_grpc_dot_coordinator__pb2.HeartbeatReply.SerializeToString,
      ),
      'StartTraining': grpc.unary_unary_rpc_method_handler(
          servicer.StartTraining,
          request_deserializer=xain_dot_grpc_dot_coordinator__pb2.StartTrainingRequest.FromString,
          response_serializer=xain_dot_grpc_dot_coordinator__pb2.StartTrainingReply.SerializeToString,
      ),
      'EndTraining': grpc.unary_unary_rpc_method_handler(
          servicer.EndTraining,
          request_deserializer=xain_dot_grpc_dot_coordinator__pb2.EndTrainingRequest.FromString,
          response_serializer=xain_dot_grpc_dot_coordinator__pb2.EndTrainingReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'xain.protobuf.coordinator.Coordinator', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
