# 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.pgc.gateway.player.v1 import playurl_pb2 as bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2


class PlayURLStub(object):
    """播放地址
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.PlayView = channel.unary_unary(
                '/bilibili.pgc.gateway.player.v1.PlayURL/PlayView',
                request_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReq.SerializeToString,
                response_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReply.FromString,
                )
        self.Project = channel.unary_unary(
                '/bilibili.pgc.gateway.player.v1.PlayURL/Project',
                request_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReq.SerializeToString,
                response_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReply.FromString,
                )
        self.LivePlayView = channel.unary_unary(
                '/bilibili.pgc.gateway.player.v1.PlayURL/LivePlayView',
                request_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReq.SerializeToString,
                response_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReply.FromString,
                )


class PlayURLServicer(object):
    """播放地址
    """

    def PlayView(self, request, context):
        """播放页信息
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Project(self, request, context):
        """获取投屏地址
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def LivePlayView(self, request, context):
        """直播播放页信息
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PlayURLServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PlayView': grpc.unary_unary_rpc_method_handler(
                    servicer.PlayView,
                    request_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReq.FromString,
                    response_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReply.SerializeToString,
            ),
            'Project': grpc.unary_unary_rpc_method_handler(
                    servicer.Project,
                    request_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReq.FromString,
                    response_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReply.SerializeToString,
            ),
            'LivePlayView': grpc.unary_unary_rpc_method_handler(
                    servicer.LivePlayView,
                    request_deserializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReq.FromString,
                    response_serializer=bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.pgc.gateway.player.v1.PlayURL', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class PlayURL(object):
    """播放地址
    """

    @staticmethod
    def PlayView(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.pgc.gateway.player.v1.PlayURL/PlayView',
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReq.SerializeToString,
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.PlayViewReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Project(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.pgc.gateway.player.v1.PlayURL/Project',
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReq.SerializeToString,
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.ProjectReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LivePlayView(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.pgc.gateway.player.v1.PlayURL/LivePlayView',
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReq.SerializeToString,
            bilibili_dot_pgc_dot_gateway_dot_player_dot_v1_dot_playurl__pb2.LivePlayViewReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
