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

import scheduler_pb2 as scheduler__pb2


class SchedulerServiceStub(object):
  """The CronJob Service is a service that triggers a new cronjob for scanning a given storage periodcally 
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ApplyStream = channel.unary_unary(
        '/types.SchedulerService/ApplyStream',
        request_serializer=scheduler__pb2.StreamsJobRequest.SerializeToString,
        response_deserializer=scheduler__pb2.StreamsJobResponse.FromString,
        )
    self.ApplyScan = channel.unary_unary(
        '/types.SchedulerService/ApplyScan',
        request_serializer=scheduler__pb2.ScannerCronJobRequest.SerializeToString,
        response_deserializer=scheduler__pb2.ScannerCronJobResponse.FromString,
        )


class SchedulerServiceServicer(object):
  """The CronJob Service is a service that triggers a new cronjob for scanning a given storage periodcally 
  """

  def ApplyStream(self, request, context):
    """ApplyStream method will trigger a new scanning cron job and will return if it was triggered successfully
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ApplyScan(self, request, context):
    """Apply method will trigger a new scanning cron job and will return if it was triggered successfully
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_SchedulerServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ApplyStream': grpc.unary_unary_rpc_method_handler(
          servicer.ApplyStream,
          request_deserializer=scheduler__pb2.StreamsJobRequest.FromString,
          response_serializer=scheduler__pb2.StreamsJobResponse.SerializeToString,
      ),
      'ApplyScan': grpc.unary_unary_rpc_method_handler(
          servicer.ApplyScan,
          request_deserializer=scheduler__pb2.ScannerCronJobRequest.FromString,
          response_serializer=scheduler__pb2.ScannerCronJobResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'types.SchedulerService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
