# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import ipc_pb2 as ipc__pb2


class ExecutionEngineServiceStub(object):
    """--- END PROOF-OF-STAKE SERVICE DEFINITION --- //

    Definition of the service.
    ExecutionEngine implements server part while Consensus implements client part.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.commit = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/commit',
                request_serializer=ipc__pb2.CommitRequest.SerializeToString,
                response_deserializer=ipc__pb2.CommitResponse.FromString,
                )
        self.query = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/query',
                request_serializer=ipc__pb2.QueryRequest.SerializeToString,
                response_deserializer=ipc__pb2.QueryResponse.FromString,
                )
        self.execute = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/execute',
                request_serializer=ipc__pb2.ExecuteRequest.SerializeToString,
                response_deserializer=ipc__pb2.ExecuteResponse.FromString,
                )
        self.run_genesis = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/run_genesis',
                request_serializer=ipc__pb2.RunGenesisRequest.SerializeToString,
                response_deserializer=ipc__pb2.GenesisResponse.FromString,
                )
        self.upgrade = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/upgrade',
                request_serializer=ipc__pb2.UpgradeRequest.SerializeToString,
                response_deserializer=ipc__pb2.UpgradeResponse.FromString,
                )
        self.bid_state = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/bid_state',
                request_serializer=ipc__pb2.BidStateRequest.SerializeToString,
                response_deserializer=ipc__pb2.BidStateResponse.FromString,
                )
        self.distribute_rewards = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/distribute_rewards',
                request_serializer=ipc__pb2.DistributeRewardsRequest.SerializeToString,
                response_deserializer=ipc__pb2.DistributeRewardsResponse.FromString,
                )
        self.slash = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/slash',
                request_serializer=ipc__pb2.SlashRequest.SerializeToString,
                response_deserializer=ipc__pb2.SlashResponse.FromString,
                )
        self.unbond_payout = channel.unary_unary(
                '/io.casperlabs.ipc.ExecutionEngineService/unbond_payout',
                request_serializer=ipc__pb2.UnbondPayoutRequest.SerializeToString,
                response_deserializer=ipc__pb2.UnbondPayoutResponse.FromString,
                )


class ExecutionEngineServiceServicer(object):
    """--- END PROOF-OF-STAKE SERVICE DEFINITION --- //

    Definition of the service.
    ExecutionEngine implements server part while Consensus implements client part.
    """

    def commit(self, request, context):
        """execution endpoints
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def query(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def execute(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def run_genesis(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def upgrade(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def bid_state(self, request, context):
        """proof-of-stake endpoints
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def distribute_rewards(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def slash(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def unbond_payout(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ExecutionEngineServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'commit': grpc.unary_unary_rpc_method_handler(
                    servicer.commit,
                    request_deserializer=ipc__pb2.CommitRequest.FromString,
                    response_serializer=ipc__pb2.CommitResponse.SerializeToString,
            ),
            'query': grpc.unary_unary_rpc_method_handler(
                    servicer.query,
                    request_deserializer=ipc__pb2.QueryRequest.FromString,
                    response_serializer=ipc__pb2.QueryResponse.SerializeToString,
            ),
            'execute': grpc.unary_unary_rpc_method_handler(
                    servicer.execute,
                    request_deserializer=ipc__pb2.ExecuteRequest.FromString,
                    response_serializer=ipc__pb2.ExecuteResponse.SerializeToString,
            ),
            'run_genesis': grpc.unary_unary_rpc_method_handler(
                    servicer.run_genesis,
                    request_deserializer=ipc__pb2.RunGenesisRequest.FromString,
                    response_serializer=ipc__pb2.GenesisResponse.SerializeToString,
            ),
            'upgrade': grpc.unary_unary_rpc_method_handler(
                    servicer.upgrade,
                    request_deserializer=ipc__pb2.UpgradeRequest.FromString,
                    response_serializer=ipc__pb2.UpgradeResponse.SerializeToString,
            ),
            'bid_state': grpc.unary_unary_rpc_method_handler(
                    servicer.bid_state,
                    request_deserializer=ipc__pb2.BidStateRequest.FromString,
                    response_serializer=ipc__pb2.BidStateResponse.SerializeToString,
            ),
            'distribute_rewards': grpc.unary_unary_rpc_method_handler(
                    servicer.distribute_rewards,
                    request_deserializer=ipc__pb2.DistributeRewardsRequest.FromString,
                    response_serializer=ipc__pb2.DistributeRewardsResponse.SerializeToString,
            ),
            'slash': grpc.unary_unary_rpc_method_handler(
                    servicer.slash,
                    request_deserializer=ipc__pb2.SlashRequest.FromString,
                    response_serializer=ipc__pb2.SlashResponse.SerializeToString,
            ),
            'unbond_payout': grpc.unary_unary_rpc_method_handler(
                    servicer.unbond_payout,
                    request_deserializer=ipc__pb2.UnbondPayoutRequest.FromString,
                    response_serializer=ipc__pb2.UnbondPayoutResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'io.casperlabs.ipc.ExecutionEngineService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ExecutionEngineService(object):
    """--- END PROOF-OF-STAKE SERVICE DEFINITION --- //

    Definition of the service.
    ExecutionEngine implements server part while Consensus implements client part.
    """

    @staticmethod
    def commit(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/commit',
            ipc__pb2.CommitRequest.SerializeToString,
            ipc__pb2.CommitResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def query(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/query',
            ipc__pb2.QueryRequest.SerializeToString,
            ipc__pb2.QueryResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def execute(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/execute',
            ipc__pb2.ExecuteRequest.SerializeToString,
            ipc__pb2.ExecuteResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def run_genesis(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/run_genesis',
            ipc__pb2.RunGenesisRequest.SerializeToString,
            ipc__pb2.GenesisResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def upgrade(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/upgrade',
            ipc__pb2.UpgradeRequest.SerializeToString,
            ipc__pb2.UpgradeResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def bid_state(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/bid_state',
            ipc__pb2.BidStateRequest.SerializeToString,
            ipc__pb2.BidStateResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def distribute_rewards(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/distribute_rewards',
            ipc__pb2.DistributeRewardsRequest.SerializeToString,
            ipc__pb2.DistributeRewardsResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def slash(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/slash',
            ipc__pb2.SlashRequest.SerializeToString,
            ipc__pb2.SlashResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def unbond_payout(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/io.casperlabs.ipc.ExecutionEngineService/unbond_payout',
            ipc__pb2.UnbondPayoutRequest.SerializeToString,
            ipc__pb2.UnbondPayoutResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
