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

import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2
import pysolveengine.svc_jobs_pb2 as svc__jobs__pb2


class JobStub(object):
  """A service for creating new jobs with the solveEngine
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Create = channel.unary_unary(
        '/solver.jobs.Job/Create',
        request_serializer=svc__jobs__pb2.CreateJobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.CreateJobResponse.FromString,
        )
    self.Status = channel.unary_unary(
        '/solver.jobs.Job/Status',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.JobStatus.FromString,
        )
    self.GetJobs = channel.unary_unary(
        '/solver.jobs.Job/GetJobs',
        request_serializer=svc__jobs__pb2.ListRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.JobList.FromString,
        )
    self.Schedule = channel.unary_unary(
        '/solver.jobs.Job/Schedule',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.GetInput = channel.unary_unary(
        '/solver.jobs.Job/GetInput',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.InputResponse.FromString,
        )
    self.GetResults = channel.unary_unary(
        '/solver.jobs.Job/GetResults',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.ResultResponse.FromString,
        )
    self.Stop = channel.unary_unary(
        '/solver.jobs.Job/Stop',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.Delete = channel.unary_unary(
        '/solver.jobs.Job/Delete',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


class JobServicer(object):
  """A service for creating new jobs with the solveEngine
  """

  def Create(self, request, context):
    """Create a new job for solving, it doesn't schedule the job
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Status(self, request, context):
    """View the job status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetJobs(self, request, context):
    """List users' jobs
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Schedule(self, request, context):
    """Schedule a job for solving
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetInput(self, request, context):
    """Get job input files
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetResults(self, request, context):
    """Get job result files
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Stop(self, request, context):
    """Stop a running job
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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


def add_JobServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=svc__jobs__pb2.CreateJobRequest.FromString,
          response_serializer=svc__jobs__pb2.CreateJobResponse.SerializeToString,
      ),
      'Status': grpc.unary_unary_rpc_method_handler(
          servicer.Status,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.JobStatus.SerializeToString,
      ),
      'GetJobs': grpc.unary_unary_rpc_method_handler(
          servicer.GetJobs,
          request_deserializer=svc__jobs__pb2.ListRequest.FromString,
          response_serializer=svc__jobs__pb2.JobList.SerializeToString,
      ),
      'Schedule': grpc.unary_unary_rpc_method_handler(
          servicer.Schedule,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'GetInput': grpc.unary_unary_rpc_method_handler(
          servicer.GetInput,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.InputResponse.SerializeToString,
      ),
      'GetResults': grpc.unary_unary_rpc_method_handler(
          servicer.GetResults,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.ResultResponse.SerializeToString,
      ),
      'Stop': grpc.unary_unary_rpc_method_handler(
          servicer.Stop,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'solver.jobs.Job', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))

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

import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2
import pysolveengine.svc_jobs_pb2 as svc__jobs__pb2


class JobStub(object):
  """A service for creating new jobs with the solveEngine
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Create = channel.unary_unary(
        '/solver.jobs.Job/Create',
        request_serializer=svc__jobs__pb2.CreateJobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.CreateJobResponse.FromString,
        )
    self.Status = channel.unary_unary(
        '/solver.jobs.Job/Status',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.JobStatus.FromString,
        )
    self.GetJobs = channel.unary_unary(
        '/solver.jobs.Job/GetJobs',
        request_serializer=svc__jobs__pb2.ListRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.JobList.FromString,
        )
    self.Schedule = channel.unary_unary(
        '/solver.jobs.Job/Schedule',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.GetInput = channel.unary_unary(
        '/solver.jobs.Job/GetInput',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.InputResponse.FromString,
        )
    self.GetResults = channel.unary_unary(
        '/solver.jobs.Job/GetResults',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=svc__jobs__pb2.ResultResponse.FromString,
        )
    self.Stop = channel.unary_unary(
        '/solver.jobs.Job/Stop',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.Delete = channel.unary_unary(
        '/solver.jobs.Job/Delete',
        request_serializer=svc__jobs__pb2.JobRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


class JobServicer(object):
  """A service for creating new jobs with the solveEngine
  """

  def Create(self, request, context):
    """Create a new job for solving, it doesn't schedule the job
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Status(self, request, context):
    """View the job status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetJobs(self, request, context):
    """List users' jobs
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Schedule(self, request, context):
    """Schedule a job for solving
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetInput(self, request, context):
    """Get job input files
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetResults(self, request, context):
    """Get job result files
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Stop(self, request, context):
    """Stop a running job
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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


def add_JobServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=svc__jobs__pb2.CreateJobRequest.FromString,
          response_serializer=svc__jobs__pb2.CreateJobResponse.SerializeToString,
      ),
      'Status': grpc.unary_unary_rpc_method_handler(
          servicer.Status,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.JobStatus.SerializeToString,
      ),
      'GetJobs': grpc.unary_unary_rpc_method_handler(
          servicer.GetJobs,
          request_deserializer=svc__jobs__pb2.ListRequest.FromString,
          response_serializer=svc__jobs__pb2.JobList.SerializeToString,
      ),
      'Schedule': grpc.unary_unary_rpc_method_handler(
          servicer.Schedule,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'GetInput': grpc.unary_unary_rpc_method_handler(
          servicer.GetInput,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.InputResponse.SerializeToString,
      ),
      'GetResults': grpc.unary_unary_rpc_method_handler(
          servicer.GetResults,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=svc__jobs__pb2.ResultResponse.SerializeToString,
      ),
      'Stop': grpc.unary_unary_rpc_method_handler(
          servicer.Stop,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=svc__jobs__pb2.JobRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'solver.jobs.Job', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! A service for creating new jobs with the solveEngine Constructor.      Args:       channel: A grpc.Channel. A service for creating new jobs with the solveEngine Create a new job for solving, it doesn't schedule the job View the job status List users' jobs Schedule a job for solving Get job input files Get job result files Stop a running job Delete job