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

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

from cakes.proto import cakes_pb2


class CAKESBase(abc.ABC):

    @abc.abstractmethod
    async def ClientPubkey(self, stream: 'grpclib.server.Stream[cakes_pb2.ECDHKey, cakes_pb2.Ack]') -> None:
        pass

    @abc.abstractmethod
    async def ServerPubkey(self, stream: 'grpclib.server.Stream[cakes_pb2.Ack, cakes_pb2.ECDHKey]') -> None:
        pass

    @abc.abstractmethod
    async def IssueCertificate(self, stream: 'grpclib.server.Stream[cakes_pb2.IssueCertificateRequest, cakes_pb2.IssueCertificateReply]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/CAKES.CAKES/ClientPubkey': grpclib.const.Handler(
                self.ClientPubkey,
                grpclib.const.Cardinality.UNARY_UNARY,
                cakes_pb2.ECDHKey,
                cakes_pb2.Ack,
            ),
            '/CAKES.CAKES/ServerPubkey': grpclib.const.Handler(
                self.ServerPubkey,
                grpclib.const.Cardinality.UNARY_UNARY,
                cakes_pb2.Ack,
                cakes_pb2.ECDHKey,
            ),
            '/CAKES.CAKES/IssueCertificate': grpclib.const.Handler(
                self.IssueCertificate,
                grpclib.const.Cardinality.UNARY_UNARY,
                cakes_pb2.IssueCertificateRequest,
                cakes_pb2.IssueCertificateReply,
            ),
        }


class CAKESStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.ClientPubkey = grpclib.client.UnaryUnaryMethod(
            channel,
            '/CAKES.CAKES/ClientPubkey',
            cakes_pb2.ECDHKey,
            cakes_pb2.Ack,
        )
        self.ServerPubkey = grpclib.client.UnaryUnaryMethod(
            channel,
            '/CAKES.CAKES/ServerPubkey',
            cakes_pb2.Ack,
            cakes_pb2.ECDHKey,
        )
        self.IssueCertificate = grpclib.client.UnaryUnaryMethod(
            channel,
            '/CAKES.CAKES/IssueCertificate',
            cakes_pb2.IssueCertificateRequest,
            cakes_pb2.IssueCertificateReply,
        )
