# 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 hooks_pb2 as cogment_dot_api_dot_hooks__pb2


class TrialHooksStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.PreTrial = channel.unary_unary(
        '/cogment.TrialHooks/PreTrial',
        request_serializer=cogment_dot_api_dot_hooks__pb2.TrialContext.SerializeToString,
        response_deserializer=cogment_dot_api_dot_hooks__pb2.TrialContext.FromString,
        )
    self.Version = channel.unary_unary(
        '/cogment.TrialHooks/Version',
        request_serializer=cogment_dot_api_dot_common__pb2.VersionRequest.SerializeToString,
        response_deserializer=cogment_dot_api_dot_common__pb2.VersionInfo.FromString,
        )


class TrialHooksServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def PreTrial(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 add_TrialHooksServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'PreTrial': grpc.unary_unary_rpc_method_handler(
          servicer.PreTrial,
          request_deserializer=cogment_dot_api_dot_hooks__pb2.TrialContext.FromString,
          response_serializer=cogment_dot_api_dot_hooks__pb2.TrialContext.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,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'cogment.TrialHooks', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
