# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import control_pb2 as control__pb2


class ControlServiceStub(object):
  """The operators can use the ControlService to issue commands to the node,
  such as proposing a block or otherwise influence the proposal strategy.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Propose = channel.unary_unary(
        '/io.casperlabs.node.api.control.ControlService/Propose',
        request_serializer=control__pb2.ProposeRequest.SerializeToString,
        response_deserializer=control__pb2.ProposeResponse.FromString,
        )


class ControlServiceServicer(object):
  """The operators can use the ControlService to issue commands to the node,
  such as proposing a block or otherwise influence the proposal strategy.
  """

  def Propose(self, request, context):
    """Propose a block using the deploys in the pool.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ControlServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Propose': grpc.unary_unary_rpc_method_handler(
          servicer.Propose,
          request_deserializer=control__pb2.ProposeRequest.FromString,
          response_serializer=control__pb2.ProposeResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'io.casperlabs.node.api.control.ControlService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
