# 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 cline_core.proto.cline import common_pb2 as cline_dot_common__pb2
from cline_core.proto.cline import mcp_pb2 as cline_dot_mcp__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 cline/mcp_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 McpServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.toggleMcpServer = channel.unary_unary(
                '/cline.McpService/toggleMcpServer',
                request_serializer=cline_dot_mcp__pb2.ToggleMcpServerRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.updateMcpTimeout = channel.unary_unary(
                '/cline.McpService/updateMcpTimeout',
                request_serializer=cline_dot_mcp__pb2.UpdateMcpTimeoutRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.addRemoteMcpServer = channel.unary_unary(
                '/cline.McpService/addRemoteMcpServer',
                request_serializer=cline_dot_mcp__pb2.AddRemoteMcpServerRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.downloadMcp = channel.unary_unary(
                '/cline.McpService/downloadMcp',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpDownloadResponse.FromString,
                _registered_method=True)
        self.restartMcpServer = channel.unary_unary(
                '/cline.McpService/restartMcpServer',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.deleteMcpServer = channel.unary_unary(
                '/cline.McpService/deleteMcpServer',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.toggleToolAutoApprove = channel.unary_unary(
                '/cline.McpService/toggleToolAutoApprove',
                request_serializer=cline_dot_mcp__pb2.ToggleToolAutoApproveRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.refreshMcpMarketplace = channel.unary_unary(
                '/cline.McpService/refreshMcpMarketplace',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpMarketplaceCatalog.FromString,
                _registered_method=True)
        self.openMcpSettings = channel.unary_unary(
                '/cline.McpService/openMcpSettings',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.subscribeToMcpMarketplaceCatalog = channel.unary_stream(
                '/cline.McpService/subscribeToMcpMarketplaceCatalog',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpMarketplaceCatalog.FromString,
                _registered_method=True)
        self.getLatestMcpServers = channel.unary_unary(
                '/cline.McpService/getLatestMcpServers',
                request_serializer=cline_dot_common__pb2.Empty.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)
        self.subscribeToMcpServers = channel.unary_stream(
                '/cline.McpService/subscribeToMcpServers',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_mcp__pb2.McpServers.FromString,
                _registered_method=True)


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

    def toggleMcpServer(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 updateMcpTimeout(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 addRemoteMcpServer(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 downloadMcp(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 restartMcpServer(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 deleteMcpServer(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 toggleToolAutoApprove(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 refreshMcpMarketplace(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 openMcpSettings(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 subscribeToMcpMarketplaceCatalog(self, request, context):
        """Subscribe to MCP marketplace catalog updates
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getLatestMcpServers(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 subscribeToMcpServers(self, request, context):
        """Subscribe to MCP server updates
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_McpServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'toggleMcpServer': grpc.unary_unary_rpc_method_handler(
                    servicer.toggleMcpServer,
                    request_deserializer=cline_dot_mcp__pb2.ToggleMcpServerRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'updateMcpTimeout': grpc.unary_unary_rpc_method_handler(
                    servicer.updateMcpTimeout,
                    request_deserializer=cline_dot_mcp__pb2.UpdateMcpTimeoutRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'addRemoteMcpServer': grpc.unary_unary_rpc_method_handler(
                    servicer.addRemoteMcpServer,
                    request_deserializer=cline_dot_mcp__pb2.AddRemoteMcpServerRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'downloadMcp': grpc.unary_unary_rpc_method_handler(
                    servicer.downloadMcp,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpDownloadResponse.SerializeToString,
            ),
            'restartMcpServer': grpc.unary_unary_rpc_method_handler(
                    servicer.restartMcpServer,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'deleteMcpServer': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteMcpServer,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'toggleToolAutoApprove': grpc.unary_unary_rpc_method_handler(
                    servicer.toggleToolAutoApprove,
                    request_deserializer=cline_dot_mcp__pb2.ToggleToolAutoApproveRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'refreshMcpMarketplace': grpc.unary_unary_rpc_method_handler(
                    servicer.refreshMcpMarketplace,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpMarketplaceCatalog.SerializeToString,
            ),
            'openMcpSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.openMcpSettings,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'subscribeToMcpMarketplaceCatalog': grpc.unary_stream_rpc_method_handler(
                    servicer.subscribeToMcpMarketplaceCatalog,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpMarketplaceCatalog.SerializeToString,
            ),
            'getLatestMcpServers': grpc.unary_unary_rpc_method_handler(
                    servicer.getLatestMcpServers,
                    request_deserializer=cline_dot_common__pb2.Empty.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
            'subscribeToMcpServers': grpc.unary_stream_rpc_method_handler(
                    servicer.subscribeToMcpServers,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_mcp__pb2.McpServers.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cline.McpService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cline.McpService', rpc_method_handlers)


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

    @staticmethod
    def toggleMcpServer(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,
            '/cline.McpService/toggleMcpServer',
            cline_dot_mcp__pb2.ToggleMcpServerRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def updateMcpTimeout(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,
            '/cline.McpService/updateMcpTimeout',
            cline_dot_mcp__pb2.UpdateMcpTimeoutRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def addRemoteMcpServer(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,
            '/cline.McpService/addRemoteMcpServer',
            cline_dot_mcp__pb2.AddRemoteMcpServerRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def downloadMcp(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,
            '/cline.McpService/downloadMcp',
            cline_dot_common__pb2.StringRequest.SerializeToString,
            cline_dot_mcp__pb2.McpDownloadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def restartMcpServer(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,
            '/cline.McpService/restartMcpServer',
            cline_dot_common__pb2.StringRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def deleteMcpServer(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,
            '/cline.McpService/deleteMcpServer',
            cline_dot_common__pb2.StringRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def toggleToolAutoApprove(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,
            '/cline.McpService/toggleToolAutoApprove',
            cline_dot_mcp__pb2.ToggleToolAutoApproveRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def refreshMcpMarketplace(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,
            '/cline.McpService/refreshMcpMarketplace',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_mcp__pb2.McpMarketplaceCatalog.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def openMcpSettings(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,
            '/cline.McpService/openMcpSettings',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_common__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def subscribeToMcpMarketplaceCatalog(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,
            '/cline.McpService/subscribeToMcpMarketplaceCatalog',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_mcp__pb2.McpMarketplaceCatalog.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def getLatestMcpServers(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,
            '/cline.McpService/getLatestMcpServers',
            cline_dot_common__pb2.Empty.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def subscribeToMcpServers(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,
            '/cline.McpService/subscribeToMcpServers',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_mcp__pb2.McpServers.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
