# 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.app.wall.v1 import wall_pb2 as bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2


class WallStub(object):
    """免流规则
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.RuleInfo = channel.unary_unary(
                '/bilibili.app.wall.v1.Wall/RuleInfo',
                request_serializer=bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RuleRequest.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RulesReply.FromString,
                )


class WallServicer(object):
    """免流规则
    """

    def RuleInfo(self, request, context):
        """获取免流规则信息
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_WallServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RuleInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.RuleInfo,
                    request_deserializer=bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RuleRequest.FromString,
                    response_serializer=bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RulesReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.app.wall.v1.Wall', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Wall(object):
    """免流规则
    """

    @staticmethod
    def RuleInfo(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.app.wall.v1.Wall/RuleInfo',
            bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RuleRequest.SerializeToString,
            bilibili_dot_app_dot_wall_dot_v1_dot_wall__pb2.RulesReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
