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

from proto import market_transaction_model_pb2 as proto_dot_market__transaction__model__pb2


class MarketTransactionModelStub(object):
  """The market transaction model service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.PredictLimitPrice = channel.unary_unary(
        '/org.powertac.samplebroker.MarketTransactionModel/PredictLimitPrice',
        request_serializer=proto_dot_market__transaction__model__pb2.PredictLimitPriceRequest.SerializeToString,
        response_deserializer=proto_dot_market__transaction__model__pb2.PredictLimitPriceResponse.FromString,
        )
    self.PutStateHistory = channel.unary_unary(
        '/org.powertac.samplebroker.MarketTransactionModel/PutStateHistory',
        request_serializer=proto_dot_market__transaction__model__pb2.PutStateHistoryRequest.SerializeToString,
        response_deserializer=proto_dot_market__transaction__model__pb2.PutStateHistoryResponse.FromString,
        )


class MarketTransactionModelServicer(object):
  """The market transaction model service definition.
  """

  def PredictLimitPrice(self, request, context):
    """Send a request to predict current states
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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


def add_MarketTransactionModelServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'PredictLimitPrice': grpc.unary_unary_rpc_method_handler(
          servicer.PredictLimitPrice,
          request_deserializer=proto_dot_market__transaction__model__pb2.PredictLimitPriceRequest.FromString,
          response_serializer=proto_dot_market__transaction__model__pb2.PredictLimitPriceResponse.SerializeToString,
      ),
      'PutStateHistory': grpc.unary_unary_rpc_method_handler(
          servicer.PutStateHistory,
          request_deserializer=proto_dot_market__transaction__model__pb2.PutStateHistoryRequest.FromString,
          response_serializer=proto_dot_market__transaction__model__pb2.PutStateHistoryResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'org.powertac.samplebroker.MarketTransactionModel', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
