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

from . import end_user_pb2 as end__user__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AcceptJob = channel.unary_unary(
                '/chiral_end_user.ChiralEndUser/AcceptJob',
                request_serializer=end__user__pb2.RequestAcceptJob.SerializeToString,
                response_deserializer=end__user__pb2.ReplyAcceptJob.FromString,
                )
        self.JobStatus = channel.unary_unary(
                '/chiral_end_user.ChiralEndUser/JobStatus',
                request_serializer=end__user__pb2.RequestJobStatus.SerializeToString,
                response_deserializer=end__user__pb2.ReplyJobStatus.FromString,
                )
        self.JobResult = channel.unary_unary(
                '/chiral_end_user.ChiralEndUser/JobResult',
                request_serializer=end__user__pb2.RequestJobResult.SerializeToString,
                response_deserializer=end__user__pb2.ReplyJobResult.FromString,
                )


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

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

    def JobStatus(self, request, context):
        """report job status with job ids given 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def JobResult(self, request, context):
        """send result of a given job 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ChiralEndUserServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AcceptJob': grpc.unary_unary_rpc_method_handler(
                    servicer.AcceptJob,
                    request_deserializer=end__user__pb2.RequestAcceptJob.FromString,
                    response_serializer=end__user__pb2.ReplyAcceptJob.SerializeToString,
            ),
            'JobStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.JobStatus,
                    request_deserializer=end__user__pb2.RequestJobStatus.FromString,
                    response_serializer=end__user__pb2.ReplyJobStatus.SerializeToString,
            ),
            'JobResult': grpc.unary_unary_rpc_method_handler(
                    servicer.JobResult,
                    request_deserializer=end__user__pb2.RequestJobResult.FromString,
                    response_serializer=end__user__pb2.ReplyJobResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'chiral_end_user.ChiralEndUser', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AcceptJob(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, '/chiral_end_user.ChiralEndUser/AcceptJob',
            end__user__pb2.RequestAcceptJob.SerializeToString,
            end__user__pb2.ReplyAcceptJob.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JobStatus(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, '/chiral_end_user.ChiralEndUser/JobStatus',
            end__user__pb2.RequestJobStatus.SerializeToString,
            end__user__pb2.ReplyJobStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JobResult(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, '/chiral_end_user.ChiralEndUser/JobResult',
            end__user__pb2.RequestJobResult.SerializeToString,
            end__user__pb2.ReplyJobResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
