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

import explorer_pb2 as explorer__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.stat = channel.unary_unary(
                '/explorer.Explorer/stat',
                request_serializer=explorer__pb2.StatRequest.SerializeToString,
                response_deserializer=explorer__pb2.StatResponse.FromString,
                )
        self.listdir = channel.unary_stream(
                '/explorer.Explorer/listdir',
                request_serializer=explorer__pb2.StatRequest.SerializeToString,
                response_deserializer=explorer__pb2.StatResponse.FromString,
                )
        self.remove = channel.unary_unary(
                '/explorer.Explorer/remove',
                request_serializer=explorer__pb2.Remove.SerializeToString,
                response_deserializer=explorer__pb2.Remove.FromString,
                )
        self.rename = channel.unary_unary(
                '/explorer.Explorer/rename',
                request_serializer=explorer__pb2.Rename.SerializeToString,
                response_deserializer=explorer__pb2.Rename.FromString,
                )
        self.makedir = channel.unary_unary(
                '/explorer.Explorer/makedir',
                request_serializer=explorer__pb2.Makedir.SerializeToString,
                response_deserializer=explorer__pb2.Makedir.FromString,
                )
        self.upload_init = channel.stream_stream(
                '/explorer.Explorer/upload_init',
                request_serializer=explorer__pb2.CopyInit.SerializeToString,
                response_deserializer=explorer__pb2.CopyInit.FromString,
                )
        self.upload_file = channel.stream_stream(
                '/explorer.Explorer/upload_file',
                request_serializer=explorer__pb2.CopyChunk.SerializeToString,
                response_deserializer=explorer__pb2.CopyChunkInfo.FromString,
                )
        self.download_init = channel.unary_stream(
                '/explorer.Explorer/download_init',
                request_serializer=explorer__pb2.CopyDir.SerializeToString,
                response_deserializer=explorer__pb2.CopyInit.FromString,
                )
        self.download_file = channel.stream_stream(
                '/explorer.Explorer/download_file',
                request_serializer=explorer__pb2.CopyFile.SerializeToString,
                response_deserializer=explorer__pb2.CopyChunk.FromString,
                )


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

    def stat(self, request, context):
        """查询路径信息
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def listdir(self, request, context):
        """查询目录包含的子路径信息
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

    def makedir(self, request, context):
        """创建目录
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def upload_init(self, request_iterator, context):
        """上传初始化
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def upload_file(self, request_iterator, context):
        """上传文件块
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def download_init(self, request, context):
        """下载初始化
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def download_file(self, request_iterator, context):
        """下载文件块
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ExplorerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=explorer__pb2.StatRequest.FromString,
                    response_serializer=explorer__pb2.StatResponse.SerializeToString,
            ),
            'listdir': grpc.unary_stream_rpc_method_handler(
                    servicer.listdir,
                    request_deserializer=explorer__pb2.StatRequest.FromString,
                    response_serializer=explorer__pb2.StatResponse.SerializeToString,
            ),
            'remove': grpc.unary_unary_rpc_method_handler(
                    servicer.remove,
                    request_deserializer=explorer__pb2.Remove.FromString,
                    response_serializer=explorer__pb2.Remove.SerializeToString,
            ),
            'rename': grpc.unary_unary_rpc_method_handler(
                    servicer.rename,
                    request_deserializer=explorer__pb2.Rename.FromString,
                    response_serializer=explorer__pb2.Rename.SerializeToString,
            ),
            'makedir': grpc.unary_unary_rpc_method_handler(
                    servicer.makedir,
                    request_deserializer=explorer__pb2.Makedir.FromString,
                    response_serializer=explorer__pb2.Makedir.SerializeToString,
            ),
            'upload_init': grpc.stream_stream_rpc_method_handler(
                    servicer.upload_init,
                    request_deserializer=explorer__pb2.CopyInit.FromString,
                    response_serializer=explorer__pb2.CopyInit.SerializeToString,
            ),
            'upload_file': grpc.stream_stream_rpc_method_handler(
                    servicer.upload_file,
                    request_deserializer=explorer__pb2.CopyChunk.FromString,
                    response_serializer=explorer__pb2.CopyChunkInfo.SerializeToString,
            ),
            'download_init': grpc.unary_stream_rpc_method_handler(
                    servicer.download_init,
                    request_deserializer=explorer__pb2.CopyDir.FromString,
                    response_serializer=explorer__pb2.CopyInit.SerializeToString,
            ),
            'download_file': grpc.stream_stream_rpc_method_handler(
                    servicer.download_file,
                    request_deserializer=explorer__pb2.CopyFile.FromString,
                    response_serializer=explorer__pb2.CopyChunk.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'explorer.Explorer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def stat(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, '/explorer.Explorer/stat',
            explorer__pb2.StatRequest.SerializeToString,
            explorer__pb2.StatResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def listdir(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, '/explorer.Explorer/listdir',
            explorer__pb2.StatRequest.SerializeToString,
            explorer__pb2.StatResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def remove(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, '/explorer.Explorer/remove',
            explorer__pb2.Remove.SerializeToString,
            explorer__pb2.Remove.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def rename(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, '/explorer.Explorer/rename',
            explorer__pb2.Rename.SerializeToString,
            explorer__pb2.Rename.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def makedir(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, '/explorer.Explorer/makedir',
            explorer__pb2.Makedir.SerializeToString,
            explorer__pb2.Makedir.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def upload_init(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/explorer.Explorer/upload_init',
            explorer__pb2.CopyInit.SerializeToString,
            explorer__pb2.CopyInit.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def upload_file(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/explorer.Explorer/upload_file',
            explorer__pb2.CopyChunk.SerializeToString,
            explorer__pb2.CopyChunkInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def download_init(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, '/explorer.Explorer/download_init',
            explorer__pb2.CopyDir.SerializeToString,
            explorer__pb2.CopyInit.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def download_file(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/explorer.Explorer/download_file',
            explorer__pb2.CopyFile.SerializeToString,
            explorer__pb2.CopyChunk.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
