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

from cogneed_protos.ai.cogneed.api.audio.detect import detect_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_detect_dot_detect__pb2
from cogneed_protos.ai.cogneed.api import common_pb2 as cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.PersistBlob = channel.unary_unary(
        '/ai.cogneed.api.audio.detect.DetectService/PersistBlob',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_detect_dot_detect__pb2.AudioBlob.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.FromString,
        )
    self.CreateDetection = channel.unary_unary(
        '/ai.cogneed.api.audio.detect.DetectService/CreateDetection',
        request_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_detect_dot_detect__pb2.Detection.SerializeToString,
        response_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.FromString,
        )


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

  def PersistBlob(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 CreateDetection(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_DetectServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'PersistBlob': grpc.unary_unary_rpc_method_handler(
          servicer.PersistBlob,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_detect_dot_detect__pb2.AudioBlob.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.SerializeToString,
      ),
      'CreateDetection': grpc.unary_unary_rpc_method_handler(
          servicer.CreateDetection,
          request_deserializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_audio_dot_detect_dot_detect__pb2.Detection.FromString,
          response_serializer=cogneed__protos_dot_ai_dot_cogneed_dot_api_dot_common__pb2.AckResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.api.audio.detect.DetectService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
