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

from xfacter import xfacter_pb2 as xfacter_dot_xfacter__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.HasCache = channel.unary_unary(
        '/xfacter.XFacter/HasCache',
        request_serializer=xfacter_dot_xfacter__pb2.RequestHasCache.SerializeToString,
        response_deserializer=xfacter_dot_xfacter__pb2.ResponseHasCache.FromString,
        )
    self.GetMethod = channel.unary_unary(
        '/xfacter.XFacter/GetMethod',
        request_serializer=xfacter_dot_xfacter__pb2.RequestMethod.SerializeToString,
        response_deserializer=xfacter_dot_xfacter__pb2.ResponseMethod.FromString,
        )


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

  def HasCache(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 GetMethod(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_XFacterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'HasCache': grpc.unary_unary_rpc_method_handler(
          servicer.HasCache,
          request_deserializer=xfacter_dot_xfacter__pb2.RequestHasCache.FromString,
          response_serializer=xfacter_dot_xfacter__pb2.ResponseHasCache.SerializeToString,
      ),
      'GetMethod': grpc.unary_unary_rpc_method_handler(
          servicer.GetMethod,
          request_deserializer=xfacter_dot_xfacter__pb2.RequestMethod.FromString,
          response_serializer=xfacter_dot_xfacter__pb2.ResponseMethod.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'xfacter.XFacter', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
