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

from bilireq.grpc.protos.bilibili.broadcast.v1 import test_pb2 as bilibili_dot_broadcast_dot_v1_dot_test__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class TestStub(object):
    """服务端下发的测试专用消息，客户端debug/release包都会通过弹窗响应该消息
    后端平台 必须 限制该消息只能针对单个用户发送

    Test
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.WatchTestEvent = channel.unary_stream(
                '/bilibili.broadcast.v1.Test/WatchTestEvent',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=bilibili_dot_broadcast_dot_v1_dot_test__pb2.TestResp.FromString,
                )


class TestServicer(object):
    """服务端下发的测试专用消息，客户端debug/release包都会通过弹窗响应该消息
    后端平台 必须 限制该消息只能针对单个用户发送

    Test
    """

    def WatchTestEvent(self, request, context):
        """监听上报事件
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TestServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'WatchTestEvent': grpc.unary_stream_rpc_method_handler(
                    servicer.WatchTestEvent,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=bilibili_dot_broadcast_dot_v1_dot_test__pb2.TestResp.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.broadcast.v1.Test', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Test(object):
    """服务端下发的测试专用消息，客户端debug/release包都会通过弹窗响应该消息
    后端平台 必须 限制该消息只能针对单个用户发送

    Test
    """

    @staticmethod
    def WatchTestEvent(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/bilibili.broadcast.v1.Test/WatchTestEvent',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            bilibili_dot_broadcast_dot_v1_dot_test__pb2.TestResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


class Test2Stub(object):
    """
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Test = channel.unary_unary(
                '/bilibili.broadcast.v1.Test2/Test',
                request_serializer=bilibili_dot_broadcast_dot_v1_dot_test__pb2.AddParams.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class Test2Servicer(object):
    """
    """

    def Test(self, request, context):
        """
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_Test2Servicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Test': grpc.unary_unary_rpc_method_handler(
                    servicer.Test,
                    request_deserializer=bilibili_dot_broadcast_dot_v1_dot_test__pb2.AddParams.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.broadcast.v1.Test2', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Test2(object):
    """
    """

    @staticmethod
    def Test(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/bilibili.broadcast.v1.Test2/Test',
            bilibili_dot_broadcast_dot_v1_dot_test__pb2.AddParams.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
