# 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.interfaces.v1 import history_pb2 as bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2


class HistoryStub(object):
    """历史记录
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.HistoryTab = channel.unary_unary(
                '/bilibili.app.interface.v1.History/HistoryTab',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReply.FromString,
                )
        self.Cursor = channel.unary_unary(
                '/bilibili.app.interface.v1.History/Cursor',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReply.FromString,
                )
        self.CursorV2 = channel.unary_unary(
                '/bilibili.app.interface.v1.History/CursorV2',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Req.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Reply.FromString,
                )
        self.Delete = channel.unary_unary(
                '/bilibili.app.interface.v1.History/Delete',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.DeleteReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.FromString,
                )
        self.Search = channel.unary_unary(
                '/bilibili.app.interface.v1.History/Search',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReply.FromString,
                )
        self.Clear = channel.unary_unary(
                '/bilibili.app.interface.v1.History/Clear',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.ClearReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.FromString,
                )
        self.LatestHistory = channel.unary_unary(
                '/bilibili.app.interface.v1.History/LatestHistory',
                request_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReply.FromString,
                )


class HistoryServicer(object):
    """历史记录
    """

    def HistoryTab(self, request, context):
        """获取历史记录tab
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Cursor(self, request, context):
        """获取历史记录列表(旧版)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CursorV2(self, request, context):
        """获取历史记录列表
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """删除历史记录
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Search(self, request, context):
        """搜索历史记录
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Clear(self, request, context):
        """清空历史记录
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LatestHistory(self, request, context):
        """获取最新的历史记录
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_HistoryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'HistoryTab': grpc.unary_unary_rpc_method_handler(
                    servicer.HistoryTab,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReply.SerializeToString,
            ),
            'Cursor': grpc.unary_unary_rpc_method_handler(
                    servicer.Cursor,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReply.SerializeToString,
            ),
            'CursorV2': grpc.unary_unary_rpc_method_handler(
                    servicer.CursorV2,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Req.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Reply.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.DeleteReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.SerializeToString,
            ),
            'Search': grpc.unary_unary_rpc_method_handler(
                    servicer.Search,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReply.SerializeToString,
            ),
            'Clear': grpc.unary_unary_rpc_method_handler(
                    servicer.Clear,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.ClearReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.SerializeToString,
            ),
            'LatestHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.LatestHistory,
                    request_deserializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReq.FromString,
                    response_serializer=bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.app.interface.v1.History', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class History(object):
    """历史记录
    """

    @staticmethod
    def HistoryTab(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.interface.v1.History/HistoryTab',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.HistoryTabReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Cursor(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.interface.v1.History/Cursor',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CursorV2(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.interface.v1.History/CursorV2',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Req.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.CursorV2Reply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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.interface.v1.History/Delete',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.DeleteReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Search(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.interface.v1.History/Search',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.SearchReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Clear(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.interface.v1.History/Clear',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.ClearReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.NoReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LatestHistory(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.interface.v1.History/LatestHistory',
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReq.SerializeToString,
            bilibili_dot_app_dot_interfaces_dot_v1_dot_history__pb2.LatestHistoryReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
