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

import sys
import os
sys.path.append(os.path.dirname(__file__))
import AnsaGRPC_pb2 as AnsaGRPC__pb2


class LassoAnsaDriverStub(object):
  """Service driver to run ansa functions remotely
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.RunAnsaFunction = channel.unary_unary(
        '/lasso.LassoAnsaDriver/RunAnsaFunction',
        request_serializer=AnsaGRPC__pb2.AnsaFunction.SerializeToString,
        response_deserializer=AnsaGRPC__pb2.PickledObject.FromString,
        )
    self.Shutdown = channel.unary_unary(
        '/lasso.LassoAnsaDriver/Shutdown',
        request_serializer=AnsaGRPC__pb2.Empty.SerializeToString,
        response_deserializer=AnsaGRPC__pb2.Empty.FromString,
        )


class LassoAnsaDriverServicer(object):
  """Service driver to run ansa functions remotely
  """

  def RunAnsaFunction(self, request, context):
    """runs arbitrary ansa functions
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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


def add_LassoAnsaDriverServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'RunAnsaFunction': grpc.unary_unary_rpc_method_handler(
          servicer.RunAnsaFunction,
          request_deserializer=AnsaGRPC__pb2.AnsaFunction.FromString,
          response_serializer=AnsaGRPC__pb2.PickledObject.SerializeToString,
      ),
      'Shutdown': grpc.unary_unary_rpc_method_handler(
          servicer.Shutdown,
          request_deserializer=AnsaGRPC__pb2.Empty.FromString,
          response_serializer=AnsaGRPC__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'lasso.LassoAnsaDriver', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
