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

from ifile.rpc import file_pb2 as ifile_dot_rpc_dot_file__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.HeartBeat = channel.unary_unary(
        '/file.IFileClient/HeartBeat',
        request_serializer=ifile_dot_rpc_dot_file__pb2.Beat.SerializeToString,
        response_deserializer=ifile_dot_rpc_dot_file__pb2.BeatResponse.FromString,
        )
    self.GetFile = channel.unary_unary(
        '/file.IFileClient/GetFile',
        request_serializer=ifile_dot_rpc_dot_file__pb2.GetFileRequest.SerializeToString,
        response_deserializer=ifile_dot_rpc_dot_file__pb2.GetFileResponse.FromString,
        )


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

  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 GetFile(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_IFileClientServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'HeartBeat': grpc.unary_unary_rpc_method_handler(
          servicer.HeartBeat,
          request_deserializer=ifile_dot_rpc_dot_file__pb2.Beat.FromString,
          response_serializer=ifile_dot_rpc_dot_file__pb2.BeatResponse.SerializeToString,
      ),
      'GetFile': grpc.unary_unary_rpc_method_handler(
          servicer.GetFile,
          request_deserializer=ifile_dot_rpc_dot_file__pb2.GetFileRequest.FromString,
          response_serializer=ifile_dot_rpc_dot_file__pb2.GetFileResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'file.IFileClient', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
