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

import task_pb2 as task__pb2


class QueryTaskStub(object):
    """Missing associated documentation comment in .protobuf file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetTaskId = channel.unary_unary(
                '/task.QueryTask/GetTaskId',
                request_serializer=task__pb2.TaskRoot.SerializeToString,
                response_deserializer=task__pb2.TaskId.FromString,
                )
        self.GetTask = channel.unary_unary(
                '/task.QueryTask/GetTask',
                request_serializer=task__pb2.TaskId.SerializeToString,
                response_deserializer=task__pb2.Task.FromString,
                )


class QueryTaskServicer(object):
    """Missing associated documentation comment in .protobuf file."""

    def GetTaskId(self, request, context):
        """Missing associated documentation comment in .protobuf file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTask(self, request, context):
        """Missing associated documentation comment in .protobuf file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryTaskServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetTaskId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTaskId,
                    request_deserializer=task__pb2.TaskRoot.FromString,
                    response_serializer=task__pb2.TaskId.SerializeToString,
            ),
            'GetTask': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTask,
                    request_deserializer=task__pb2.TaskId.FromString,
                    response_serializer=task__pb2.Task.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'task.QueryTask', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetTaskId(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.QueryTask/GetTaskId',
            task__pb2.TaskRoot.SerializeToString,
            task__pb2.TaskId.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetTask(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.QueryTask/GetTask',
            task__pb2.TaskId.SerializeToString,
            task__pb2.Task.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
