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

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

from . import afslet_pb2


class AfsletBase(abc.ABC):

    @abc.abstractmethod
    async def Execute(self, stream: 'grpclib.server.Stream[afslet_pb2.ExecuteRequest, afslet_pb2.ExecuteResponse]') -> None:
        pass

    @abc.abstractmethod
    async def GetRuntimeStatus(self, stream: 'grpclib.server.Stream[afslet_pb2.GetRuntimeStatusRequest, afslet_pb2.GetRuntimeStatusResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/afsletpb.Afslet/Execute': grpclib.const.Handler(
                self.Execute,
                grpclib.const.Cardinality.STREAM_STREAM,
                afslet_pb2.ExecuteRequest,
                afslet_pb2.ExecuteResponse,
            ),
            '/afsletpb.Afslet/GetRuntimeStatus': grpclib.const.Handler(
                self.GetRuntimeStatus,
                grpclib.const.Cardinality.UNARY_UNARY,
                afslet_pb2.GetRuntimeStatusRequest,
                afslet_pb2.GetRuntimeStatusResponse,
            ),
        }


class AfsletStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Execute = grpclib.client.StreamStreamMethod(
            channel,
            '/afsletpb.Afslet/Execute',
            afslet_pb2.ExecuteRequest,
            afslet_pb2.ExecuteResponse,
        )
        self.GetRuntimeStatus = grpclib.client.UnaryUnaryMethod(
            channel,
            '/afsletpb.Afslet/GetRuntimeStatus',
            afslet_pb2.GetRuntimeStatusRequest,
            afslet_pb2.GetRuntimeStatusResponse,
        )
