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

from cogneed_protos.audio_stream.audio_web_middleware import audio_web_middleware_service_pb2 as cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2
from cogneed_protos.audio_stream.common import common_pb2 as cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.start = channel.unary_unary(
        '/ai.cogneed.api.audio.web.WebAudioService/start',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StartWebSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StartWebSessionResponse.FromString,
        )
    self.audio = channel.unary_unary(
        '/ai.cogneed.api.audio.web.WebAudioService/audio',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.WebAudioRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StatusResponse.FromString,
        )
    self.subscribe = channel.unary_stream(
        '/ai.cogneed.api.audio.web.WebAudioService/subscribe',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.SubscribeRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2.DetectionResponse.FromString,
        )
    self.unstack = channel.unary_unary(
        '/ai.cogneed.api.audio.web.WebAudioService/unstack',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.UnstackRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.UnstackResponse.FromString,
        )


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

  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 audio(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 subscribe(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 unstack(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_WebAudioServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'start': grpc.unary_unary_rpc_method_handler(
          servicer.start,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StartWebSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StartWebSessionResponse.SerializeToString,
      ),
      'audio': grpc.unary_unary_rpc_method_handler(
          servicer.audio,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.WebAudioRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.StatusResponse.SerializeToString,
      ),
      'subscribe': grpc.unary_stream_rpc_method_handler(
          servicer.subscribe,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.SubscribeRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2.DetectionResponse.SerializeToString,
      ),
      'unstack': grpc.unary_unary_rpc_method_handler(
          servicer.unstack,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.UnstackRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__web__middleware_dot_audio__web__middleware__service__pb2.UnstackResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.api.audio.web.WebAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
