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

from cogment.api import common_pb2 as cogment_dot_api_dot_common__pb2
from cogment.api import orchestrator_pb2 as cogment_dot_api_dot_orchestrator__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetTrialParams = channel.unary_unary(
        '/cogment.Trial/GetTrialParams',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.GetTrialParamsRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.GetTrialParamsReply.FromString,
        )
    self.Start = channel.unary_unary(
        '/cogment.Trial/Start',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartReply.FromString,
        )
    self.Join = channel.unary_unary(
        '/cogment.Trial/Join',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialJoinRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartReply.FromString,
        )
    self.End = channel.unary_unary(
        '/cogment.Trial/End',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialEndRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialEndReply.FromString,
        )
    self.Action = channel.unary_unary(
        '/cogment.Trial/Action',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionReply.FromString,
        )
    self.ActionStream = channel.stream_stream(
        '/cogment.Trial/ActionStream',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionReply.FromString,
        )
    self.Heartbeat = channel.unary_unary(
        '/cogment.Trial/Heartbeat',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialHeartbeatRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialHeartbeatReply.FromString,
        )
    self.GiveFeedback = channel.unary_unary(
        '/cogment.Trial/GiveFeedback',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialFeedbackRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialFeedbackReply.FromString,
        )
    self.Version = channel.unary_unary(
        '/cogment.Trial/Version',
        request_serializer=cogment_dot_api_dot_common__pb2.VersionRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_common__pb2.VersionInfo.FromString,
        )
    self.SendMessage = channel.unary_unary(
        '/cogment.Trial/SendMessage',
        request_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialMessageRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialMessageReply.FromString,
        )


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

  def GetTrialParams(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 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 Join(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 Action(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 ActionStream(self, request_iterator, 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 Heartbeat(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 GiveFeedback(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 SendMessage(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_TrialServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetTrialParams': grpc.unary_unary_rpc_method_handler(
          servicer.GetTrialParams,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.GetTrialParamsRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.GetTrialParamsReply.SerializeToString,
      ),
      'Start': grpc.unary_unary_rpc_method_handler(
          servicer.Start,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartReply.SerializeToString,
      ),
      'Join': grpc.unary_unary_rpc_method_handler(
          servicer.Join,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialJoinRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialStartReply.SerializeToString,
      ),
      'End': grpc.unary_unary_rpc_method_handler(
          servicer.End,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialEndRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialEndReply.SerializeToString,
      ),
      'Action': grpc.unary_unary_rpc_method_handler(
          servicer.Action,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionReply.SerializeToString,
      ),
      'ActionStream': grpc.stream_stream_rpc_method_handler(
          servicer.ActionStream,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialActionReply.SerializeToString,
      ),
      'Heartbeat': grpc.unary_unary_rpc_method_handler(
          servicer.Heartbeat,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialHeartbeatRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialHeartbeatReply.SerializeToString,
      ),
      'GiveFeedback': grpc.unary_unary_rpc_method_handler(
          servicer.GiveFeedback,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialFeedbackRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialFeedbackReply.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,
      ),
      'SendMessage': grpc.unary_unary_rpc_method_handler(
          servicer.SendMessage,
          request_deserializer=cogment_dot_api_dot_orchestrator__pb2.TrialMessageRequest.FromString,
          response_serializer=cogment_dot_api_dot_orchestrator__pb2.TrialMessageReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'cogment.Trial', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
