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

from . import __GamayunResult_pb2 as GamayunResult__pb2


class ResultStub(object):
    """The result service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ReportResultWithRawStringsOnly = channel.unary_unary(
                '/gamayun.Result/ReportResultWithRawStringsOnly',
                request_serializer=GamayunResult__pb2.JobResultWithRawStringsOnly.SerializeToString,
                response_deserializer=GamayunResult__pb2.EmptyResponse.FromString,
                )
        self.ReportResultWithMapOnly = channel.unary_unary(
                '/gamayun.Result/ReportResultWithMapOnly',
                request_serializer=GamayunResult__pb2.JobResultWithMapOnly.SerializeToString,
                response_deserializer=GamayunResult__pb2.EmptyResponse.FromString,
                )
        self.ReportResultWithMapAndStrings = channel.unary_unary(
                '/gamayun.Result/ReportResultWithMapAndStrings',
                request_serializer=GamayunResult__pb2.JobResultWithMapAndStrings.SerializeToString,
                response_deserializer=GamayunResult__pb2.EmptyResponse.FromString,
                )
        self.ReportError = channel.unary_unary(
                '/gamayun.Result/ReportError',
                request_serializer=GamayunResult__pb2.JobError.SerializeToString,
                response_deserializer=GamayunResult__pb2.EmptyResponse.FromString,
                )


class ResultServicer(object):
    """The result service definition.
    """

    def ReportResultWithRawStringsOnly(self, request, context):
        """Reports the string only result to Gamayun
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReportResultWithMapOnly(self, request, context):
        """Reports the map only result to Gamayun
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReportResultWithMapAndStrings(self, request, context):
        """Reports the result with map and strings to Gamayun
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReportError(self, request, context):
        """Reports an error to Gamayun
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResultServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ReportResultWithRawStringsOnly': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportResultWithRawStringsOnly,
                    request_deserializer=GamayunResult__pb2.JobResultWithRawStringsOnly.FromString,
                    response_serializer=GamayunResult__pb2.EmptyResponse.SerializeToString,
            ),
            'ReportResultWithMapOnly': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportResultWithMapOnly,
                    request_deserializer=GamayunResult__pb2.JobResultWithMapOnly.FromString,
                    response_serializer=GamayunResult__pb2.EmptyResponse.SerializeToString,
            ),
            'ReportResultWithMapAndStrings': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportResultWithMapAndStrings,
                    request_deserializer=GamayunResult__pb2.JobResultWithMapAndStrings.FromString,
                    response_serializer=GamayunResult__pb2.EmptyResponse.SerializeToString,
            ),
            'ReportError': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportError,
                    request_deserializer=GamayunResult__pb2.JobError.FromString,
                    response_serializer=GamayunResult__pb2.EmptyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'gamayun.Result', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Result(object):
    """The result service definition.
    """

    @staticmethod
    def ReportResultWithRawStringsOnly(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, '/gamayun.Result/ReportResultWithRawStringsOnly',
            GamayunResult__pb2.JobResultWithRawStringsOnly.SerializeToString,
            GamayunResult__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportResultWithMapOnly(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, '/gamayun.Result/ReportResultWithMapOnly',
            GamayunResult__pb2.JobResultWithMapOnly.SerializeToString,
            GamayunResult__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportResultWithMapAndStrings(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, '/gamayun.Result/ReportResultWithMapAndStrings',
            GamayunResult__pb2.JobResultWithMapAndStrings.SerializeToString,
            GamayunResult__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportError(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, '/gamayun.Result/ReportError',
            GamayunResult__pb2.JobError.SerializeToString,
            GamayunResult__pb2.EmptyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
