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

from . import ml_server_pb2 as ml__server__pb2

GRPC_GENERATED_VERSION = '1.67.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in ml_server_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Analyze = channel.unary_unary(
                '/lt_ml_server.ProcessingServer/Analyze',
                request_serializer=ml__server__pb2.AnalyzeRequest.SerializeToString,
                response_deserializer=ml__server__pb2.AnalyzeResponse.FromString,
                _registered_method=True)
        self.Process = channel.unary_unary(
                '/lt_ml_server.ProcessingServer/Process',
                request_serializer=ml__server__pb2.ProcessRequest.SerializeToString,
                response_deserializer=ml__server__pb2.ProcessResponse.FromString,
                _registered_method=True)


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

    def Analyze(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 Process(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_ProcessingServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Analyze': grpc.unary_unary_rpc_method_handler(
                    servicer.Analyze,
                    request_deserializer=ml__server__pb2.AnalyzeRequest.FromString,
                    response_serializer=ml__server__pb2.AnalyzeResponse.SerializeToString,
            ),
            'Process': grpc.unary_unary_rpc_method_handler(
                    servicer.Process,
                    request_deserializer=ml__server__pb2.ProcessRequest.FromString,
                    response_serializer=ml__server__pb2.ProcessResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'lt_ml_server.ProcessingServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('lt_ml_server.ProcessingServer', rpc_method_handlers)


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

    @staticmethod
    def Analyze(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,
            '/lt_ml_server.ProcessingServer/Analyze',
            ml__server__pb2.AnalyzeRequest.SerializeToString,
            ml__server__pb2.AnalyzeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Process(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,
            '/lt_ml_server.ProcessingServer/Process',
            ml__server__pb2.ProcessRequest.SerializeToString,
            ml__server__pb2.ProcessResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Match = channel.unary_unary(
                '/lt_ml_server.MLServer/Match',
                request_serializer=ml__server__pb2.MatchRequest.SerializeToString,
                response_deserializer=ml__server__pb2.MatchResponse.FromString,
                _registered_method=True)
        self.MatchAnalyzed = channel.unary_unary(
                '/lt_ml_server.MLServer/MatchAnalyzed',
                request_serializer=ml__server__pb2.AnalyzedMatchRequest.SerializeToString,
                response_deserializer=ml__server__pb2.MatchResponse.FromString,
                _registered_method=True)


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

    def Match(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 MatchAnalyzed(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_MLServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Match': grpc.unary_unary_rpc_method_handler(
                    servicer.Match,
                    request_deserializer=ml__server__pb2.MatchRequest.FromString,
                    response_serializer=ml__server__pb2.MatchResponse.SerializeToString,
            ),
            'MatchAnalyzed': grpc.unary_unary_rpc_method_handler(
                    servicer.MatchAnalyzed,
                    request_deserializer=ml__server__pb2.AnalyzedMatchRequest.FromString,
                    response_serializer=ml__server__pb2.MatchResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'lt_ml_server.MLServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('lt_ml_server.MLServer', rpc_method_handlers)


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

    @staticmethod
    def Match(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,
            '/lt_ml_server.MLServer/Match',
            ml__server__pb2.MatchRequest.SerializeToString,
            ml__server__pb2.MatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MatchAnalyzed(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,
            '/lt_ml_server.MLServer/MatchAnalyzed',
            ml__server__pb2.AnalyzedMatchRequest.SerializeToString,
            ml__server__pb2.MatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


class PostProcessingServerStub(object):
    """for e.g. resorting suggestions
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Process = channel.unary_unary(
                '/lt_ml_server.PostProcessingServer/Process',
                request_serializer=ml__server__pb2.PostProcessingRequest.SerializeToString,
                response_deserializer=ml__server__pb2.MatchResponse.FromString,
                _registered_method=True)


class PostProcessingServerServicer(object):
    """for e.g. resorting suggestions
    """

    def Process(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_PostProcessingServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Process': grpc.unary_unary_rpc_method_handler(
                    servicer.Process,
                    request_deserializer=ml__server__pb2.PostProcessingRequest.FromString,
                    response_serializer=ml__server__pb2.MatchResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'lt_ml_server.PostProcessingServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('lt_ml_server.PostProcessingServer', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class PostProcessingServer(object):
    """for e.g. resorting suggestions
    """

    @staticmethod
    def Process(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,
            '/lt_ml_server.PostProcessingServer/Process',
            ml__server__pb2.PostProcessingRequest.SerializeToString,
            ml__server__pb2.MatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
