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

from h2o_notebook.gen.ai.h2o.notebook.v1 import kernel_task_service_pb2 as ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2


class KernelTaskServiceStub(object):
    """KernelTaskService manages KernelTask resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateKernelTask = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTaskService/CreateKernelTask',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskResponse.FromString,
                )
        self.GetKernelTask = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTaskService/GetKernelTask',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskResponse.FromString,
                )
        self.ListKernelTasks = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTaskService/ListKernelTasks',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksResponse.FromString,
                )


class KernelTaskServiceServicer(object):
    """KernelTaskService manages KernelTask resources.
    """

    def CreateKernelTask(self, request, context):
        """Creates a new KernelTask and assign it to a Kernel.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetKernelTask(self, request, context):
        """Returns a specific KernelTask.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListKernelTasks(self, request, context):
        """Returns a collection of KernelTasks assigned to a Kernel.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_KernelTaskServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateKernelTask': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateKernelTask,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskResponse.SerializeToString,
            ),
            'GetKernelTask': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKernelTask,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskResponse.SerializeToString,
            ),
            'ListKernelTasks': grpc.unary_unary_rpc_method_handler(
                    servicer.ListKernelTasks,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.notebook.v1.KernelTaskService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class KernelTaskService(object):
    """KernelTaskService manages KernelTask resources.
    """

    @staticmethod
    def CreateKernelTask(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, '/ai.h2o.notebook.v1.KernelTaskService/CreateKernelTask',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.CreateKernelTaskResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetKernelTask(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, '/ai.h2o.notebook.v1.KernelTaskService/GetKernelTask',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.GetKernelTaskResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListKernelTasks(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, '/ai.h2o.notebook.v1.KernelTaskService/ListKernelTasks',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__task__service__pb2.ListKernelTasksResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
