# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import iat_pb2 as iat__pb2


class IatStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.createRec = channel.stream_stream(
                '/iat.Iat/createRec',
                request_serializer=iat__pb2.IatRequest.SerializeToString,
                response_deserializer=iat__pb2.IatResult.FromString,
                )


class IatServicer(object):
    """Missing associated documentation comment in .proto file."""

    def createRec(self, request_iterator, context):
        """采用流的方式持续向服务端写音频数据，及持续从服务端获得结果
        音频请求流,IatRequest.endFlag为true时代表写音频结束
        结果返回流,IatResult.endFlang为true时代表会话识别结束
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_IatServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'createRec': grpc.stream_stream_rpc_method_handler(
                    servicer.createRec,
                    request_deserializer=iat__pb2.IatRequest.FromString,
                    response_serializer=iat__pb2.IatResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'iat.Iat', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Iat(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def createRec(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/iat.Iat/createRec',
            iat__pb2.IatRequest.SerializeToString,
            iat__pb2.IatResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
