# 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 environment_pb2 as cogment_dot_api_dot_environment__pb2


class EnvironmentStub(object):
  """This is the connection between the orchestrator and the Env backend.
  This service is hosted on the backend executable, and contacted by the 
  orchestrator.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Start = channel.unary_unary(
        '/cogment.Environment/Start',
        request_serializer=cogment_dot_api_dot_environment__pb2.EnvStartRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_environment__pb2.EnvStartReply.FromString,
        )
    self.End = channel.unary_unary(
        '/cogment.Environment/End',
        request_serializer=cogment_dot_api_dot_environment__pb2.EnvEndRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_environment__pb2.EnvEndReply.FromString,
        )
    self.Update = channel.unary_unary(
        '/cogment.Environment/Update',
        request_serializer=cogment_dot_api_dot_environment__pb2.EnvUpdateRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_environment__pb2.EnvUpdateReply.FromString,
        )
    self.Version = channel.unary_unary(
        '/cogment.Environment/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.Environment/OnMessage',
        request_serializer=cogment_dot_api_dot_environment__pb2.EnvOnMessageRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_environment__pb2.EnvOnMessageReply.FromString,
        )


class EnvironmentServicer(object):
  """This is the connection between the orchestrator and the Env backend.
  This service is hosted on the backend executable, and contacted by the 
  orchestrator.
  """

  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 Update(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_EnvironmentServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Start': grpc.unary_unary_rpc_method_handler(
          servicer.Start,
          request_deserializer=cogment_dot_api_dot_environment__pb2.EnvStartRequest.FromString,
          response_serializer=cogment_dot_api_dot_environment__pb2.EnvStartReply.SerializeToString,
      ),
      'End': grpc.unary_unary_rpc_method_handler(
          servicer.End,
          request_deserializer=cogment_dot_api_dot_environment__pb2.EnvEndRequest.FromString,
          response_serializer=cogment_dot_api_dot_environment__pb2.EnvEndReply.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=cogment_dot_api_dot_environment__pb2.EnvUpdateRequest.FromString,
          response_serializer=cogment_dot_api_dot_environment__pb2.EnvUpdateReply.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_environment__pb2.EnvOnMessageRequest.FromString,
          response_serializer=cogment_dot_api_dot_environment__pb2.EnvOnMessageReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'cogment.Environment', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
