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

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

from . import annotations_pb2
from . import control_pb2


class ControlServiceBase(abc.ABC):

    @abc.abstractmethod
    async def Propose(self, stream: 'grpclib.server.Stream[control_pb2.ProposeRequest, control_pb2.ProposeResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/io.casperlabs.node.api.control.ControlService/Propose': grpclib.const.Handler(
                self.Propose,
                grpclib.const.Cardinality.UNARY_UNARY,
                control_pb2.ProposeRequest,
                control_pb2.ProposeResponse,
            ),
        }


class ControlServiceStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Propose = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.node.api.control.ControlService/Propose',
            control_pb2.ProposeRequest,
            control_pb2.ProposeResponse,
        )
