# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
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.ChainSpec.GenesisConfig.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
    pass
    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
    pass
    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
    pass
    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
    pass
    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
    pass
    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
    pass
    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
    pass
    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.ChainSpec.GenesisConfig.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,))
