# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import JobService_pb2 as JobService__pb2


class JobServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.ScheduleJobsCypher = channel.unary_unary(
                '/xgtproto.JobService/ScheduleJobsCypher',
                request_serializer=JobService__pb2.ScheduleJobsCypherRequest.SerializeToString,
                response_deserializer=JobService__pb2.ScheduleJobsCypherResponse.FromString,
                _registered_method=True)
        self.CancelJobs = channel.unary_unary(
                '/xgtproto.JobService/CancelJobs',
                request_serializer=JobService__pb2.CancelJobsRequest.SerializeToString,
                response_deserializer=JobService__pb2.CancelJobsResponse.FromString,
                _registered_method=True)
        self.GetJobs = channel.unary_stream(
                '/xgtproto.JobService/GetJobs',
                request_serializer=JobService__pb2.GetJobsRequest.SerializeToString,
                response_deserializer=JobService__pb2.GetJobsResponse.FromString,
                _registered_method=True)
        self.WaitJobs = channel.unary_unary(
                '/xgtproto.JobService/WaitJobs',
                request_serializer=JobService__pb2.WaitJobsRequest.SerializeToString,
                response_deserializer=JobService__pb2.WaitJobsResponse.FromString,
                _registered_method=True)
        self.CompileQuery = channel.unary_unary(
                '/xgtproto.JobService/CompileQuery',
                request_serializer=JobService__pb2.CompileQueryRequest.SerializeToString,
                response_deserializer=JobService__pb2.CompileQueryResponse.FromString,
                _registered_method=True)


class JobServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def ScheduleJobsCypher(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelJobs(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetJobs(self, request, context):
        """Get status of one or more jobs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WaitJobs(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CompileQuery(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_JobServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ScheduleJobsCypher': grpc.unary_unary_rpc_method_handler(
                    servicer.ScheduleJobsCypher,
                    request_deserializer=JobService__pb2.ScheduleJobsCypherRequest.FromString,
                    response_serializer=JobService__pb2.ScheduleJobsCypherResponse.SerializeToString,
            ),
            'CancelJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelJobs,
                    request_deserializer=JobService__pb2.CancelJobsRequest.FromString,
                    response_serializer=JobService__pb2.CancelJobsResponse.SerializeToString,
            ),
            'GetJobs': grpc.unary_stream_rpc_method_handler(
                    servicer.GetJobs,
                    request_deserializer=JobService__pb2.GetJobsRequest.FromString,
                    response_serializer=JobService__pb2.GetJobsResponse.SerializeToString,
            ),
            'WaitJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.WaitJobs,
                    request_deserializer=JobService__pb2.WaitJobsRequest.FromString,
                    response_serializer=JobService__pb2.WaitJobsResponse.SerializeToString,
            ),
            'CompileQuery': grpc.unary_unary_rpc_method_handler(
                    servicer.CompileQuery,
                    request_deserializer=JobService__pb2.CompileQueryRequest.FromString,
                    response_serializer=JobService__pb2.CompileQueryResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'xgtproto.JobService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('xgtproto.JobService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class JobService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def ScheduleJobsCypher(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/xgtproto.JobService/ScheduleJobsCypher',
            JobService__pb2.ScheduleJobsCypherRequest.SerializeToString,
            JobService__pb2.ScheduleJobsCypherResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelJobs(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/xgtproto.JobService/CancelJobs',
            JobService__pb2.CancelJobsRequest.SerializeToString,
            JobService__pb2.CancelJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetJobs(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(
            request,
            target,
            '/xgtproto.JobService/GetJobs',
            JobService__pb2.GetJobsRequest.SerializeToString,
            JobService__pb2.GetJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WaitJobs(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/xgtproto.JobService/WaitJobs',
            JobService__pb2.WaitJobsRequest.SerializeToString,
            JobService__pb2.WaitJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CompileQuery(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/xgtproto.JobService/CompileQuery',
            JobService__pb2.CompileQueryRequest.SerializeToString,
            JobService__pb2.CompileQueryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
