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

from cogment.api import agent_pb2 as cogment_dot_api_dot_agent__pb2
from cogment.api import common_pb2 as cogment_dot_api_dot_common__pb2


class AgentStub(object):
  """This is the connection between a model application and the orchestrator.
  The service is hosted on the model. 
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Start = channel.unary_unary(
        '/cogment.Agent/Start',
        request_serializer=cogment_dot_api_dot_agent__pb2.AgentStartRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_agent__pb2.AgentStartReply.FromString,
        )
    self.End = channel.unary_unary(
        '/cogment.Agent/End',
        request_serializer=cogment_dot_api_dot_agent__pb2.AgentEndRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_agent__pb2.AgentEndReply.FromString,
        )
    self.Decide = channel.unary_unary(
        '/cogment.Agent/Decide',
        request_serializer=cogment_dot_api_dot_agent__pb2.AgentDecideRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_agent__pb2.AgentDecideReply.FromString,
        )
    self.Reward = channel.unary_unary(
        '/cogment.Agent/Reward',
        request_serializer=cogment_dot_api_dot_agent__pb2.AgentRewardRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_agent__pb2.AgentRewardReply.FromString,
        )
    self.Version = channel.unary_unary(
        '/cogment.Agent/Version',
        request_serializer=cogment_dot_api_dot_common__pb2.VersionRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_common__pb2.VersionInfo.FromString,
        )
    self.OnMessage = channel.unary_unary(
        '/cogment.Agent/OnMessage',
        request_serializer=cogment_dot_api_dot_agent__pb2.AgentOnMessageRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_agent__pb2.AgentOnMessageReply.FromString,
        )


class AgentServicer(object):
  """This is the connection between a model application and the orchestrator.
  The service is hosted on the model. 
  """

  def Start(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 End(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 Decide(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 Reward(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 Version(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 OnMessage(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_AgentServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Start': grpc.unary_unary_rpc_method_handler(
          servicer.Start,
          request_deserializer=cogment_dot_api_dot_agent__pb2.AgentStartRequest.FromString,
          response_serializer=cogment_dot_api_dot_agent__pb2.AgentStartReply.SerializeToString,
      ),
      'End': grpc.unary_unary_rpc_method_handler(
          servicer.End,
          request_deserializer=cogment_dot_api_dot_agent__pb2.AgentEndRequest.FromString,
          response_serializer=cogment_dot_api_dot_agent__pb2.AgentEndReply.SerializeToString,
      ),
      'Decide': grpc.unary_unary_rpc_method_handler(
          servicer.Decide,
          request_deserializer=cogment_dot_api_dot_agent__pb2.AgentDecideRequest.FromString,
          response_serializer=cogment_dot_api_dot_agent__pb2.AgentDecideReply.SerializeToString,
      ),
      'Reward': grpc.unary_unary_rpc_method_handler(
          servicer.Reward,
          request_deserializer=cogment_dot_api_dot_agent__pb2.AgentRewardRequest.FromString,
          response_serializer=cogment_dot_api_dot_agent__pb2.AgentRewardReply.SerializeToString,
      ),
      'Version': grpc.unary_unary_rpc_method_handler(
          servicer.Version,
          request_deserializer=cogment_dot_api_dot_common__pb2.VersionRequest.FromString,
          response_serializer=cogment_dot_api_dot_common__pb2.VersionInfo.SerializeToString,
      ),
      'OnMessage': grpc.unary_unary_rpc_method_handler(
          servicer.OnMessage,
          request_deserializer=cogment_dot_api_dot_agent__pb2.AgentOnMessageRequest.FromString,
          response_serializer=cogment_dot_api_dot_agent__pb2.AgentOnMessageReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'cogment.Agent', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
