# 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.viewunite.v1 import viewunite_pb2 as bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2


class ViewStub(object):
    """统一视频信息接口(7.23启用)
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.View = channel.unary_unary(
                '/bilibili.app.viewunite.v1.View/View',
                request_serializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReply.FromString,
                )
        self.ViewProgress = channel.unary_unary(
                '/bilibili.app.viewunite.v1.View/ViewProgress',
                request_serializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReq.SerializeToString,
                response_deserializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReply.FromString,
                )


class ViewServicer(object):
    """统一视频信息接口(7.23启用)
    """

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

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


def add_ViewServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'View': grpc.unary_unary_rpc_method_handler(
                    servicer.View,
                    request_deserializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReq.FromString,
                    response_serializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReply.SerializeToString,
            ),
            'ViewProgress': grpc.unary_unary_rpc_method_handler(
                    servicer.ViewProgress,
                    request_deserializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReq.FromString,
                    response_serializer=bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.app.viewunite.v1.View', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class View(object):
    """统一视频信息接口(7.23启用)
    """

    @staticmethod
    def View(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.viewunite.v1.View/View',
            bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReq.SerializeToString,
            bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ViewProgress(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.viewunite.v1.View/ViewProgress',
            bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReq.SerializeToString,
            bilibili_dot_app_dot_viewunite_dot_v1_dot_viewunite__pb2.ViewProgressReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
