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

import grpc
from filesystem import filesystem_pb2 as filesystem_dot_filesystem__pb2

GRPC_GENERATED_VERSION = "1.76.0"
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower

    _version_not_supported = first_version_is_lower(
        GRPC_VERSION, GRPC_GENERATED_VERSION
    )
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f"The grpc package installed is at version {GRPC_VERSION},"
        + " but the generated code in filesystem/filesystem_pb2_grpc.py depends on"
        + f" grpcio>={GRPC_GENERATED_VERSION}."
        + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
        + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Stat = channel.unary_unary(
            "/filesystem.Filesystem/Stat",
            request_serializer=filesystem_dot_filesystem__pb2.StatRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.StatResponse.FromString,
            _registered_method=True,
        )
        self.MakeDir = channel.unary_unary(
            "/filesystem.Filesystem/MakeDir",
            request_serializer=filesystem_dot_filesystem__pb2.MakeDirRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.MakeDirResponse.FromString,
            _registered_method=True,
        )
        self.Move = channel.unary_unary(
            "/filesystem.Filesystem/Move",
            request_serializer=filesystem_dot_filesystem__pb2.MoveRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.MoveResponse.FromString,
            _registered_method=True,
        )
        self.ListDir = channel.unary_unary(
            "/filesystem.Filesystem/ListDir",
            request_serializer=filesystem_dot_filesystem__pb2.ListDirRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.ListDirResponse.FromString,
            _registered_method=True,
        )
        self.Remove = channel.unary_unary(
            "/filesystem.Filesystem/Remove",
            request_serializer=filesystem_dot_filesystem__pb2.RemoveRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.RemoveResponse.FromString,
            _registered_method=True,
        )
        self.WatchDir = channel.unary_stream(
            "/filesystem.Filesystem/WatchDir",
            request_serializer=filesystem_dot_filesystem__pb2.WatchDirRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.WatchDirResponse.FromString,
            _registered_method=True,
        )
        self.CreateWatcher = channel.unary_unary(
            "/filesystem.Filesystem/CreateWatcher",
            request_serializer=filesystem_dot_filesystem__pb2.CreateWatcherRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.CreateWatcherResponse.FromString,
            _registered_method=True,
        )
        self.GetWatcherEvents = channel.unary_unary(
            "/filesystem.Filesystem/GetWatcherEvents",
            request_serializer=filesystem_dot_filesystem__pb2.GetWatcherEventsRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.GetWatcherEventsResponse.FromString,
            _registered_method=True,
        )
        self.RemoveWatcher = channel.unary_unary(
            "/filesystem.Filesystem/RemoveWatcher",
            request_serializer=filesystem_dot_filesystem__pb2.RemoveWatcherRequest.SerializeToString,
            response_deserializer=filesystem_dot_filesystem__pb2.RemoveWatcherResponse.FromString,
            _registered_method=True,
        )


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

    def Stat(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 MakeDir(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 Move(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 ListDir(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 Remove(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 WatchDir(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 CreateWatcher(self, request, context):
        """Non-streaming versions of WatchDir"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetWatcherEvents(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 RemoveWatcher(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_FilesystemServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Stat": grpc.unary_unary_rpc_method_handler(
            servicer.Stat,
            request_deserializer=filesystem_dot_filesystem__pb2.StatRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.StatResponse.SerializeToString,
        ),
        "MakeDir": grpc.unary_unary_rpc_method_handler(
            servicer.MakeDir,
            request_deserializer=filesystem_dot_filesystem__pb2.MakeDirRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.MakeDirResponse.SerializeToString,
        ),
        "Move": grpc.unary_unary_rpc_method_handler(
            servicer.Move,
            request_deserializer=filesystem_dot_filesystem__pb2.MoveRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.MoveResponse.SerializeToString,
        ),
        "ListDir": grpc.unary_unary_rpc_method_handler(
            servicer.ListDir,
            request_deserializer=filesystem_dot_filesystem__pb2.ListDirRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.ListDirResponse.SerializeToString,
        ),
        "Remove": grpc.unary_unary_rpc_method_handler(
            servicer.Remove,
            request_deserializer=filesystem_dot_filesystem__pb2.RemoveRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.RemoveResponse.SerializeToString,
        ),
        "WatchDir": grpc.unary_stream_rpc_method_handler(
            servicer.WatchDir,
            request_deserializer=filesystem_dot_filesystem__pb2.WatchDirRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.WatchDirResponse.SerializeToString,
        ),
        "CreateWatcher": grpc.unary_unary_rpc_method_handler(
            servicer.CreateWatcher,
            request_deserializer=filesystem_dot_filesystem__pb2.CreateWatcherRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.CreateWatcherResponse.SerializeToString,
        ),
        "GetWatcherEvents": grpc.unary_unary_rpc_method_handler(
            servicer.GetWatcherEvents,
            request_deserializer=filesystem_dot_filesystem__pb2.GetWatcherEventsRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.GetWatcherEventsResponse.SerializeToString,
        ),
        "RemoveWatcher": grpc.unary_unary_rpc_method_handler(
            servicer.RemoveWatcher,
            request_deserializer=filesystem_dot_filesystem__pb2.RemoveWatcherRequest.FromString,
            response_serializer=filesystem_dot_filesystem__pb2.RemoveWatcherResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "filesystem.Filesystem", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("filesystem.Filesystem", rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
class Filesystem(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,
            "/filesystem.Filesystem/Stat",
            filesystem_dot_filesystem__pb2.StatRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.StatResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @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,
            "/filesystem.Filesystem/MakeDir",
            filesystem_dot_filesystem__pb2.MakeDirRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.MakeDirResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Move(
        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,
            "/filesystem.Filesystem/Move",
            filesystem_dot_filesystem__pb2.MoveRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.MoveResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @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_unary(
            request,
            target,
            "/filesystem.Filesystem/ListDir",
            filesystem_dot_filesystem__pb2.ListDirRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.ListDirResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @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,
            "/filesystem.Filesystem/Remove",
            filesystem_dot_filesystem__pb2.RemoveRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.RemoveResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def WatchDir(
        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,
            "/filesystem.Filesystem/WatchDir",
            filesystem_dot_filesystem__pb2.WatchDirRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.WatchDirResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def CreateWatcher(
        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,
            "/filesystem.Filesystem/CreateWatcher",
            filesystem_dot_filesystem__pb2.CreateWatcherRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.CreateWatcherResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetWatcherEvents(
        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,
            "/filesystem.Filesystem/GetWatcherEvents",
            filesystem_dot_filesystem__pb2.GetWatcherEventsRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.GetWatcherEventsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def RemoveWatcher(
        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,
            "/filesystem.Filesystem/RemoveWatcher",
            filesystem_dot_filesystem__pb2.RemoveWatcherRequest.SerializeToString,
            filesystem_dot_filesystem__pb2.RemoveWatcherResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
