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

from . import task_pb2 as task__pb2


class TaskInterfaceStub(object):
    """Tasks
    Tasks are shot priorities for a specific dept

    -------- Services --------]

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ClearAdjustments = channel.unary_unary(
                '/task.TaskInterface/ClearAdjustments',
                request_serializer=task__pb2.TaskClearAdjustmentsRequest.SerializeToString,
                response_deserializer=task__pb2.TaskClearAdjustmentsResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/task.TaskInterface/Delete',
                request_serializer=task__pb2.TaskDeleteRequest.SerializeToString,
                response_deserializer=task__pb2.TaskDeleteResponse.FromString,
                )
        self.SetMinCores = channel.unary_unary(
                '/task.TaskInterface/SetMinCores',
                request_serializer=task__pb2.TaskSetMinCoresRequest.SerializeToString,
                response_deserializer=task__pb2.TaskSetMinCoresResponse.FromString,
                )


class TaskInterfaceServicer(object):
    """Tasks
    Tasks are shot priorities for a specific dept

    -------- Services --------]

    """

    def ClearAdjustments(self, request, context):
        """Clear any min core adjustments that have been made
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Removes the task.  If the department is managed the task is likely to come back upon the next update.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMinCores(self, request, context):
        """Sets the minimum number of cores.  If the task is being managed, then the min core value is adjusted
        but the original is not changed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TaskInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ClearAdjustments': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearAdjustments,
                    request_deserializer=task__pb2.TaskClearAdjustmentsRequest.FromString,
                    response_serializer=task__pb2.TaskClearAdjustmentsResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=task__pb2.TaskDeleteRequest.FromString,
                    response_serializer=task__pb2.TaskDeleteResponse.SerializeToString,
            ),
            'SetMinCores': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMinCores,
                    request_deserializer=task__pb2.TaskSetMinCoresRequest.FromString,
                    response_serializer=task__pb2.TaskSetMinCoresResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'task.TaskInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TaskInterface(object):
    """Tasks
    Tasks are shot priorities for a specific dept

    -------- Services --------]

    """

    @staticmethod
    def ClearAdjustments(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, '/task.TaskInterface/ClearAdjustments',
            task__pb2.TaskClearAdjustmentsRequest.SerializeToString,
            task__pb2.TaskClearAdjustmentsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/task.TaskInterface/Delete',
            task__pb2.TaskDeleteRequest.SerializeToString,
            task__pb2.TaskDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMinCores(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, '/task.TaskInterface/SetMinCores',
            task__pb2.TaskSetMinCoresRequest.SerializeToString,
            task__pb2.TaskSetMinCoresResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)