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

from bk_bscp.grpc_lib.feed_server import feed_server_pb2 as pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2


class UpstreamStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Handshake = channel.unary_unary(
                '/pbfs.Upstream/Handshake',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeMessage.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeResp.FromString,
                )
        self.Messaging = channel.unary_unary(
                '/pbfs.Upstream/Messaging',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingMeta.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingResp.FromString,
                )
        self.Watch = channel.unary_stream(
                '/pbfs.Upstream/Watch',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.SideWatchMeta.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.FeedWatchMessage.FromString,
                )
        self.PullAppFileMeta = channel.unary_unary(
                '/pbfs.Upstream/PullAppFileMeta',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaReq.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaResp.FromString,
                )
        self.GetDownloadURL = channel.unary_unary(
                '/pbfs.Upstream/GetDownloadURL',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLReq.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLResp.FromString,
                )
        self.PullKvMeta = channel.unary_unary(
                '/pbfs.Upstream/PullKvMeta',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaReq.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaResp.FromString,
                )
        self.GetKvValue = channel.unary_unary(
                '/pbfs.Upstream/GetKvValue',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueReq.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueResp.FromString,
                )
        self.ListApps = channel.unary_unary(
                '/pbfs.Upstream/ListApps',
                request_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsReq.SerializeToString,
                response_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsResp.FromString,
                )


class UpstreamServicer(object):
    """Missing associated documentation comment in .proto file."""

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

    def Messaging(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Watch(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PullAppFileMeta(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDownloadURL(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PullKvMeta(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetKvValue(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListApps(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UpstreamServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Handshake': grpc.unary_unary_rpc_method_handler(
                    servicer.Handshake,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeMessage.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeResp.SerializeToString,
            ),
            'Messaging': grpc.unary_unary_rpc_method_handler(
                    servicer.Messaging,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingMeta.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingResp.SerializeToString,
            ),
            'Watch': grpc.unary_stream_rpc_method_handler(
                    servicer.Watch,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.SideWatchMeta.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.FeedWatchMessage.SerializeToString,
            ),
            'PullAppFileMeta': grpc.unary_unary_rpc_method_handler(
                    servicer.PullAppFileMeta,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaReq.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaResp.SerializeToString,
            ),
            'GetDownloadURL': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDownloadURL,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLReq.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLResp.SerializeToString,
            ),
            'PullKvMeta': grpc.unary_unary_rpc_method_handler(
                    servicer.PullKvMeta,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaReq.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaResp.SerializeToString,
            ),
            'GetKvValue': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKvValue,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueReq.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueResp.SerializeToString,
            ),
            'ListApps': grpc.unary_unary_rpc_method_handler(
                    servicer.ListApps,
                    request_deserializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsReq.FromString,
                    response_serializer=pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsResp.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'pbfs.Upstream', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Upstream(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Handshake(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, '/pbfs.Upstream/Handshake',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeMessage.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.HandshakeResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Messaging(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, '/pbfs.Upstream/Messaging',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingMeta.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.MessagingResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Watch(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, '/pbfs.Upstream/Watch',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.SideWatchMeta.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.FeedWatchMessage.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PullAppFileMeta(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, '/pbfs.Upstream/PullAppFileMeta',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaReq.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullAppFileMetaResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDownloadURL(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, '/pbfs.Upstream/GetDownloadURL',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLReq.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetDownloadURLResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PullKvMeta(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, '/pbfs.Upstream/PullKvMeta',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaReq.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.PullKvMetaResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetKvValue(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, '/pbfs.Upstream/GetKvValue',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueReq.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.GetKvValueResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListApps(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, '/pbfs.Upstream/ListApps',
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsReq.SerializeToString,
            pkg_dot_protocol_dot_feed__server_dot_feed__server__pb2.ListAppsResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
