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

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

import google.protobuf.wrappers_pb2
import multiproc.primes_pb2


class PrimesBase(abc.ABC):

    @abc.abstractmethod
    async def Check(self, stream: 'grpclib.server.Stream[multiproc.primes_pb2.Request, multiproc.primes_pb2.Reply]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/primes.Primes/Check': grpclib.const.Handler(
                self.Check,
                grpclib.const.Cardinality.UNARY_UNARY,
                multiproc.primes_pb2.Request,
                multiproc.primes_pb2.Reply,
            ),
        }


class PrimesStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Check = grpclib.client.UnaryUnaryMethod(
            channel,
            '/primes.Primes/Check',
            multiproc.primes_pb2.Request,
            multiproc.primes_pb2.Reply,
        )
