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

from rpc.Tradex import tradex_pb2 as tradex__pb2


class TradeXStub(object):
  """The greeting service definition.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.SayHello = channel.unary_unary(
        '/TradeX.TradeX/SayHello',
        request_serializer=tradex__pb2.JSONRequest.SerializeToString,
        response_deserializer=tradex__pb2.JSONResponse.FromString,
        )
    self.GetPos = channel.unary_unary(
        '/TradeX.TradeX/GetPos',
        request_serializer=tradex__pb2.JSONRequest.SerializeToString,
        response_deserializer=tradex__pb2.JSONResponse.FromString,
        )
    self.GetOrders = channel.unary_unary(
        '/TradeX.TradeX/GetOrders',
        request_serializer=tradex__pb2.JSONRequest.SerializeToString,
        response_deserializer=tradex__pb2.JSONResponse.FromString,
        )
    self.SendOrder = channel.unary_unary(
        '/TradeX.TradeX/SendOrder',
        request_serializer=tradex__pb2.JSONRequest.SerializeToString,
        response_deserializer=tradex__pb2.JSONResponse.FromString,
        )


class TradeXServicer(object):
  """The greeting service definition.
  """

  def SayHello(self, request, context):
    """Sends a greeting
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPos(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 GetOrders(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 SendOrder(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_TradeXServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SayHello': grpc.unary_unary_rpc_method_handler(
          servicer.SayHello,
          request_deserializer=tradex__pb2.JSONRequest.FromString,
          response_serializer=tradex__pb2.JSONResponse.SerializeToString,
      ),
      'GetPos': grpc.unary_unary_rpc_method_handler(
          servicer.GetPos,
          request_deserializer=tradex__pb2.JSONRequest.FromString,
          response_serializer=tradex__pb2.JSONResponse.SerializeToString,
      ),
      'GetOrders': grpc.unary_unary_rpc_method_handler(
          servicer.GetOrders,
          request_deserializer=tradex__pb2.JSONRequest.FromString,
          response_serializer=tradex__pb2.JSONResponse.SerializeToString,
      ),
      'SendOrder': grpc.unary_unary_rpc_method_handler(
          servicer.SendOrder,
          request_deserializer=tradex__pb2.JSONRequest.FromString,
          response_serializer=tradex__pb2.JSONResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'TradeX.TradeX', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
