# 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 task_pb2 as cline_dot_task__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/task_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 TaskServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.cancelTask = channel.unary_unary(
                '/cline.TaskService/cancelTask',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.cancelBackgroundCommand = channel.unary_unary(
                '/cline.TaskService/cancelBackgroundCommand',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.clearTask = channel.unary_unary(
                '/cline.TaskService/clearTask',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.getTotalTasksSize = channel.unary_unary(
                '/cline.TaskService/getTotalTasksSize',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Int64.FromString,
                _registered_method=True)
        self.deleteTasksWithIds = channel.unary_unary(
                '/cline.TaskService/deleteTasksWithIds',
                request_serializer=cline_dot_common__pb2.StringArrayRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.newTask = channel.unary_unary(
                '/cline.TaskService/newTask',
                request_serializer=cline_dot_task__pb2.NewTaskRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.String.FromString,
                _registered_method=True)
        self.showTaskWithId = channel.unary_unary(
                '/cline.TaskService/showTaskWithId',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_task__pb2.TaskResponse.FromString,
                _registered_method=True)
        self.exportTaskWithId = channel.unary_unary(
                '/cline.TaskService/exportTaskWithId',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.toggleTaskFavorite = channel.unary_unary(
                '/cline.TaskService/toggleTaskFavorite',
                request_serializer=cline_dot_task__pb2.TaskFavoriteRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.getTaskHistory = channel.unary_unary(
                '/cline.TaskService/getTaskHistory',
                request_serializer=cline_dot_task__pb2.GetTaskHistoryRequest.SerializeToString,
                response_deserializer=cline_dot_task__pb2.TaskHistoryArray.FromString,
                _registered_method=True)
        self.askResponse = channel.unary_unary(
                '/cline.TaskService/askResponse',
                request_serializer=cline_dot_task__pb2.AskResponseRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.taskFeedback = channel.unary_unary(
                '/cline.TaskService/taskFeedback',
                request_serializer=cline_dot_common__pb2.StringRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.taskCompletionViewChanges = channel.unary_unary(
                '/cline.TaskService/taskCompletionViewChanges',
                request_serializer=cline_dot_common__pb2.Int64Request.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.executeQuickWin = channel.unary_unary(
                '/cline.TaskService/executeQuickWin',
                request_serializer=cline_dot_task__pb2.ExecuteQuickWinRequest.SerializeToString,
                response_deserializer=cline_dot_common__pb2.Empty.FromString,
                _registered_method=True)
        self.deleteAllTaskHistory = channel.unary_unary(
                '/cline.TaskService/deleteAllTaskHistory',
                request_serializer=cline_dot_common__pb2.EmptyRequest.SerializeToString,
                response_deserializer=cline_dot_task__pb2.DeleteAllTaskHistoryCount.FromString,
                _registered_method=True)


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

    def cancelTask(self, request, context):
        """Cancels the currently running task
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def cancelBackgroundCommand(self, request, context):
        """Cancels the currently running background command
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def clearTask(self, request, context):
        """Clears the current task
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getTotalTasksSize(self, request, context):
        """Gets the total size of all tasks
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def deleteTasksWithIds(self, request, context):
        """Deletes multiple tasks with the given IDs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def newTask(self, request, context):
        """Creates a new task with the given text and optional images
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def showTaskWithId(self, request, context):
        """Shows a task with the specified ID
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def exportTaskWithId(self, request, context):
        """Exports a task with the given ID to markdown
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def toggleTaskFavorite(self, request, context):
        """Toggles the favorite status of a task
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getTaskHistory(self, request, context):
        """Gets filtered task history
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def askResponse(self, request, context):
        """Sends a response to a previous ask operation
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def taskFeedback(self, request, context):
        """Records task feedback (thumbs up/down)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def taskCompletionViewChanges(self, request, context):
        """Shows task completion changes diff in a view
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def executeQuickWin(self, request, context):
        """Executes a quick win task with command and title
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def deleteAllTaskHistory(self, request, context):
        """Deletes all task history
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TaskServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'cancelTask': grpc.unary_unary_rpc_method_handler(
                    servicer.cancelTask,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'cancelBackgroundCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.cancelBackgroundCommand,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'clearTask': grpc.unary_unary_rpc_method_handler(
                    servicer.clearTask,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'getTotalTasksSize': grpc.unary_unary_rpc_method_handler(
                    servicer.getTotalTasksSize,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Int64.SerializeToString,
            ),
            'deleteTasksWithIds': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteTasksWithIds,
                    request_deserializer=cline_dot_common__pb2.StringArrayRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'newTask': grpc.unary_unary_rpc_method_handler(
                    servicer.newTask,
                    request_deserializer=cline_dot_task__pb2.NewTaskRequest.FromString,
                    response_serializer=cline_dot_common__pb2.String.SerializeToString,
            ),
            'showTaskWithId': grpc.unary_unary_rpc_method_handler(
                    servicer.showTaskWithId,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_task__pb2.TaskResponse.SerializeToString,
            ),
            'exportTaskWithId': grpc.unary_unary_rpc_method_handler(
                    servicer.exportTaskWithId,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'toggleTaskFavorite': grpc.unary_unary_rpc_method_handler(
                    servicer.toggleTaskFavorite,
                    request_deserializer=cline_dot_task__pb2.TaskFavoriteRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'getTaskHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.getTaskHistory,
                    request_deserializer=cline_dot_task__pb2.GetTaskHistoryRequest.FromString,
                    response_serializer=cline_dot_task__pb2.TaskHistoryArray.SerializeToString,
            ),
            'askResponse': grpc.unary_unary_rpc_method_handler(
                    servicer.askResponse,
                    request_deserializer=cline_dot_task__pb2.AskResponseRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'taskFeedback': grpc.unary_unary_rpc_method_handler(
                    servicer.taskFeedback,
                    request_deserializer=cline_dot_common__pb2.StringRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'taskCompletionViewChanges': grpc.unary_unary_rpc_method_handler(
                    servicer.taskCompletionViewChanges,
                    request_deserializer=cline_dot_common__pb2.Int64Request.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'executeQuickWin': grpc.unary_unary_rpc_method_handler(
                    servicer.executeQuickWin,
                    request_deserializer=cline_dot_task__pb2.ExecuteQuickWinRequest.FromString,
                    response_serializer=cline_dot_common__pb2.Empty.SerializeToString,
            ),
            'deleteAllTaskHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteAllTaskHistory,
                    request_deserializer=cline_dot_common__pb2.EmptyRequest.FromString,
                    response_serializer=cline_dot_task__pb2.DeleteAllTaskHistoryCount.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cline.TaskService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('cline.TaskService', rpc_method_handlers)


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

    @staticmethod
    def cancelTask(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.TaskService/cancelTask',
            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 cancelBackgroundCommand(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.TaskService/cancelBackgroundCommand',
            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 clearTask(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.TaskService/clearTask',
            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 getTotalTasksSize(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.TaskService/getTotalTasksSize',
            cline_dot_common__pb2.EmptyRequest.SerializeToString,
            cline_dot_common__pb2.Int64.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

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

    @staticmethod
    def newTask(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.TaskService/newTask',
            cline_dot_task__pb2.NewTaskRequest.SerializeToString,
            cline_dot_common__pb2.String.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def showTaskWithId(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.TaskService/showTaskWithId',
            cline_dot_common__pb2.StringRequest.SerializeToString,
            cline_dot_task__pb2.TaskResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

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

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

    @staticmethod
    def getTaskHistory(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.TaskService/getTaskHistory',
            cline_dot_task__pb2.GetTaskHistoryRequest.SerializeToString,
            cline_dot_task__pb2.TaskHistoryArray.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

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

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

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

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

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