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

from nexus.grpc import initialize_pb2 as nexus_dot_grpc_dot_initialize__pb2
from nexus.grpc.vfs import vfs_pb2 as nexus_dot_grpc_dot_vfs_dot_vfs__pb2

GRPC_GENERATED_VERSION = '1.80.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 nexus/grpc/vfs/vfs_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 NexusVFSServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Initialize = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Initialize',
                request_serializer=nexus_dot_grpc_dot_initialize__pb2.InitializeRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_initialize__pb2.InitializeResponse.FromString,
                _registered_method=True)
        self.Call = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Call',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallResponse.FromString,
                _registered_method=True)
        self.Read = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Read',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadResponse.FromString,
                _registered_method=True)
        self.Write = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Write',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteResponse.FromString,
                _registered_method=True)
        self.Delete = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Delete',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteResponse.FromString,
                _registered_method=True)
        self.Ping = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/Ping',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingResponse.FromString,
                _registered_method=True)
        self.BatchRead = channel.unary_unary(
                '/nexus.grpc.vfs.NexusVFSService/BatchRead',
                request_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadRequest.SerializeToString,
                response_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadResponse.FromString,
                _registered_method=True)


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

    def Initialize(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 Call(self, request, context):
        """Generic dispatch RPC — method name + JSON-encoded params.
        Server routes to the same dispatch_method() as the HTTP endpoint.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Read(self, request, context):
        """Typed RPCs for content operations — native bytes, no JSON/base64.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Write(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 Delete(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 Ping(self, request, context):
        """Health check with server metadata.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BatchRead(self, request, context):
        """Vectored batch read (Issue #4058). Per-request errors are reported
        per-item; outer Status is reserved for transport-level failures.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NexusVFSServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Initialize': grpc.unary_unary_rpc_method_handler(
                    servicer.Initialize,
                    request_deserializer=nexus_dot_grpc_dot_initialize__pb2.InitializeRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_initialize__pb2.InitializeResponse.SerializeToString,
            ),
            'Call': grpc.unary_unary_rpc_method_handler(
                    servicer.Call,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallResponse.SerializeToString,
            ),
            'Read': grpc.unary_unary_rpc_method_handler(
                    servicer.Read,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadResponse.SerializeToString,
            ),
            'Write': grpc.unary_unary_rpc_method_handler(
                    servicer.Write,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteResponse.SerializeToString,
            ),
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingResponse.SerializeToString,
            ),
            'BatchRead': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchRead,
                    request_deserializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadRequest.FromString,
                    response_serializer=nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nexus.grpc.vfs.NexusVFSService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('nexus.grpc.vfs.NexusVFSService', rpc_method_handlers)


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

    @staticmethod
    def Initialize(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,
            '/nexus.grpc.vfs.NexusVFSService/Initialize',
            nexus_dot_grpc_dot_initialize__pb2.InitializeRequest.SerializeToString,
            nexus_dot_grpc_dot_initialize__pb2.InitializeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Call(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,
            '/nexus.grpc.vfs.NexusVFSService/Call',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.CallResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Read(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,
            '/nexus.grpc.vfs.NexusVFSService/Read',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.ReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Write(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,
            '/nexus.grpc.vfs.NexusVFSService/Write',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.WriteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Delete(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,
            '/nexus.grpc.vfs.NexusVFSService/Delete',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.DeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Ping(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,
            '/nexus.grpc.vfs.NexusVFSService/Ping',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.PingResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BatchRead(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,
            '/nexus.grpc.vfs.NexusVFSService/BatchRead',
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadRequest.SerializeToString,
            nexus_dot_grpc_dot_vfs_dot_vfs__pb2.BatchReadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
