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

from . import ai_pb2 as ai__pb2


class AIServiceStub(object):
  """Service to interact with the AI model
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.AIPredictOne = channel.unary_unary(
        '/aiservice.AIService/AIPredictOne',
        request_serializer=ai__pb2.AIInput.SerializeToString,
        response_deserializer=ai__pb2.StorePrediction.FromString,
        )


class AIServiceServicer(object):
  """Service to interact with the AI model
  """

  def AIPredictOne(self, request, context):
    """Make 1 prediction only
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_AIServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AIPredictOne': grpc.unary_unary_rpc_method_handler(
          servicer.AIPredictOne,
          request_deserializer=ai__pb2.AIInput.FromString,
          response_serializer=ai__pb2.StorePrediction.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'aiservice.AIService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
