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

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

import ledapi_pb2


class LEDServiceBase(abc.ABC):

    @abc.abstractmethod
    async def IsAlive(self, stream: 'grpclib.server.Stream[ledapi_pb2.Void, ledapi_pb2.Success]') -> None:
        pass

    @abc.abstractmethod
    async def SetColor(self, stream: 'grpclib.server.Stream[ledapi_pb2.Color, ledapi_pb2.Success]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/LEDService/IsAlive': grpclib.const.Handler(
                self.IsAlive,
                grpclib.const.Cardinality.UNARY_UNARY,
                ledapi_pb2.Void,
                ledapi_pb2.Success,
            ),
            '/LEDService/SetColor': grpclib.const.Handler(
                self.SetColor,
                grpclib.const.Cardinality.UNARY_UNARY,
                ledapi_pb2.Color,
                ledapi_pb2.Success,
            ),
        }


class LEDServiceStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.IsAlive = grpclib.client.UnaryUnaryMethod(
            channel,
            '/LEDService/IsAlive',
            ledapi_pb2.Void,
            ledapi_pb2.Success,
        )
        self.SetColor = grpclib.client.UnaryUnaryMethod(
            channel,
            '/LEDService/SetColor',
            ledapi_pb2.Color,
            ledapi_pb2.Success,
        )
