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

from cogneed_protos.audio_stream.audio_stream_api import audio_stream_api_service_pb2 as cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2
from cogneed_protos.audio_stream.common import common_pb2 as cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.init_session = channel.unary_unary(
        '/ai.cogneed.api.audio.audiostream.StreamAudioService/init_session',
        request_serializer=cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2.InitSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.InitSessionResponse.FromString,
        )
    self.send_audio = channel.unary_unary(
        '/ai.cogneed.api.audio.audiostream.StreamAudioService/send_audio',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.AudioBlob.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.Response.FromString,
        )
    self.end_session = channel.unary_unary(
        '/ai.cogneed.api.audio.audiostream.StreamAudioService/end_session',
        request_serializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.EndSessionRequest.SerializeToString,
        response_deserializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.EndSessionResponse.FromString,
        )


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

  def init_session(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 send_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 end_session(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_StreamAudioServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'init_session': grpc.unary_unary_rpc_method_handler(
          servicer.init_session,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_common_dot_common__pb2.InitSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.InitSessionResponse.SerializeToString,
      ),
      'send_audio': grpc.unary_unary_rpc_method_handler(
          servicer.send_audio,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.AudioBlob.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.Response.SerializeToString,
      ),
      'end_session': grpc.unary_unary_rpc_method_handler(
          servicer.end_session,
          request_deserializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.EndSessionRequest.FromString,
          response_serializer=cogneed__protos_dot_audio__stream_dot_audio__stream__api_dot_audio__stream__api__service__pb2.EndSessionResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.cogneed.api.audio.audiostream.StreamAudioService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
