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

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

import state_pb2
import transforms_pb2
import ipc_pb2


class ExecutionEngineServiceBase(abc.ABC):

    @abc.abstractmethod
    async def commit(self, stream: 'grpclib.server.Stream[ipc_pb2.CommitRequest, ipc_pb2.CommitResponse]') -> None:
        pass

    @abc.abstractmethod
    async def query(self, stream: 'grpclib.server.Stream[ipc_pb2.QueryRequest, ipc_pb2.QueryResponse]') -> None:
        pass

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

    @abc.abstractmethod
    async def run_genesis(self, stream: 'grpclib.server.Stream[ipc_pb2.RunGenesisRequest, ipc_pb2.GenesisResponse]') -> None:
        pass

    @abc.abstractmethod
    async def upgrade(self, stream: 'grpclib.server.Stream[ipc_pb2.UpgradeRequest, ipc_pb2.UpgradeResponse]') -> None:
        pass

    @abc.abstractmethod
    async def bid_state(self, stream: 'grpclib.server.Stream[ipc_pb2.BidStateRequest, ipc_pb2.BidStateResponse]') -> None:
        pass

    @abc.abstractmethod
    async def distribute_rewards(self, stream: 'grpclib.server.Stream[ipc_pb2.DistributeRewardsRequest, ipc_pb2.DistributeRewardsResponse]') -> None:
        pass

    @abc.abstractmethod
    async def slash(self, stream: 'grpclib.server.Stream[ipc_pb2.SlashRequest, ipc_pb2.SlashResponse]') -> None:
        pass

    @abc.abstractmethod
    async def unbond_payout(self, stream: 'grpclib.server.Stream[ipc_pb2.UnbondPayoutRequest, ipc_pb2.UnbondPayoutResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/io.casperlabs.ipc.ExecutionEngineService/commit': grpclib.const.Handler(
                self.commit,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.CommitRequest,
                ipc_pb2.CommitResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/query': grpclib.const.Handler(
                self.query,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.QueryRequest,
                ipc_pb2.QueryResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/execute': grpclib.const.Handler(
                self.execute,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.ExecuteRequest,
                ipc_pb2.ExecuteResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/run_genesis': grpclib.const.Handler(
                self.run_genesis,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.RunGenesisRequest,
                ipc_pb2.GenesisResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/upgrade': grpclib.const.Handler(
                self.upgrade,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.UpgradeRequest,
                ipc_pb2.UpgradeResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/bid_state': grpclib.const.Handler(
                self.bid_state,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.BidStateRequest,
                ipc_pb2.BidStateResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/distribute_rewards': grpclib.const.Handler(
                self.distribute_rewards,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.DistributeRewardsRequest,
                ipc_pb2.DistributeRewardsResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/slash': grpclib.const.Handler(
                self.slash,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.SlashRequest,
                ipc_pb2.SlashResponse,
            ),
            '/io.casperlabs.ipc.ExecutionEngineService/unbond_payout': grpclib.const.Handler(
                self.unbond_payout,
                grpclib.const.Cardinality.UNARY_UNARY,
                ipc_pb2.UnbondPayoutRequest,
                ipc_pb2.UnbondPayoutResponse,
            ),
        }


class ExecutionEngineServiceStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.commit = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/commit',
            ipc_pb2.CommitRequest,
            ipc_pb2.CommitResponse,
        )
        self.query = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/query',
            ipc_pb2.QueryRequest,
            ipc_pb2.QueryResponse,
        )
        self.execute = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/execute',
            ipc_pb2.ExecuteRequest,
            ipc_pb2.ExecuteResponse,
        )
        self.run_genesis = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/run_genesis',
            ipc_pb2.RunGenesisRequest,
            ipc_pb2.GenesisResponse,
        )
        self.upgrade = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/upgrade',
            ipc_pb2.UpgradeRequest,
            ipc_pb2.UpgradeResponse,
        )
        self.bid_state = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/bid_state',
            ipc_pb2.BidStateRequest,
            ipc_pb2.BidStateResponse,
        )
        self.distribute_rewards = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/distribute_rewards',
            ipc_pb2.DistributeRewardsRequest,
            ipc_pb2.DistributeRewardsResponse,
        )
        self.slash = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/slash',
            ipc_pb2.SlashRequest,
            ipc_pb2.SlashResponse,
        )
        self.unbond_payout = grpclib.client.UnaryUnaryMethod(
            channel,
            '/io.casperlabs.ipc.ExecutionEngineService/unbond_payout',
            ipc_pb2.UnbondPayoutRequest,
            ipc_pb2.UnbondPayoutResponse,
        )
