# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: model_svc.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

import model_svc_pb2


class ModelServerBase(abc.ABC):

    @abc.abstractmethod
    async def predict(self, stream: 'grpclib.server.Stream[model_svc_pb2.GrpcPredictRequest, model_svc_pb2.GrpcPredictResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/model_svc.ModelServer/predict': grpclib.const.Handler(
                self.predict,
                grpclib.const.Cardinality.UNARY_UNARY,
                model_svc_pb2.GrpcPredictRequest,
                model_svc_pb2.GrpcPredictResponse,
            ),
        }


class ModelServerStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.predict = grpclib.client.UnaryUnaryMethod(
            channel,
            '/model_svc.ModelServer/predict',
            model_svc_pb2.GrpcPredictRequest,
            model_svc_pb2.GrpcPredictResponse,
        )
