# 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_service_pb2 as ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2


class KernelServiceStub(object):
    """KernelService manages Kernels.
    (-- api-linter: core::0121::resource-must-support-get=disabled
    aip.dev/not-precedent: We support Get method --)
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateKernel = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelService/CreateKernel',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelResponse.FromString,
                )
        self.GetKernel = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelService/GetKernel',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelResponse.FromString,
                )
        self.ListKernels = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelService/ListKernels',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsResponse.FromString,
                )
        self.UpdateKernel = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelService/UpdateKernel',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelResponse.FromString,
                )
        self.DeleteKernel = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelService/DeleteKernel',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelResponse.FromString,
                )


class KernelServiceServicer(object):
    """KernelService manages Kernels.
    (-- api-linter: core::0121::resource-must-support-get=disabled
    aip.dev/not-precedent: We support Get method --)
    """

    def CreateKernel(self, request, context):
        """Create a new Kernel.
        (-- api-linter: core::0133::http-uri-parent=disabled
        aip.dev/not-precedent: Kernel has no parent (it's a top-level resource) --)
        (-- api-linter: core::0133::method-signature=disabled
        aip.dev/not-precedent: Kernel has no parent (it's a top-level resource) --)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def ListKernels(self, request, context):
        """Return a collection of Kernels.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateKernel(self, request, context):
        """Update a Kernel.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteKernel(self, request, context):
        """Delete a Kernel.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_KernelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateKernel': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateKernel,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelResponse.SerializeToString,
            ),
            'GetKernel': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKernel,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelResponse.SerializeToString,
            ),
            'ListKernels': grpc.unary_unary_rpc_method_handler(
                    servicer.ListKernels,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsResponse.SerializeToString,
            ),
            'UpdateKernel': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateKernel,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelResponse.SerializeToString,
            ),
            'DeleteKernel': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteKernel,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.notebook.v1.KernelService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class KernelService(object):
    """KernelService manages Kernels.
    (-- api-linter: core::0121::resource-must-support-get=disabled
    aip.dev/not-precedent: We support Get method --)
    """

    @staticmethod
    def CreateKernel(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.KernelService/CreateKernel',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.CreateKernelResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetKernel(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.KernelService/GetKernel',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.GetKernelResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListKernels(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.KernelService/ListKernels',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.ListKernelsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateKernel(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.KernelService/UpdateKernel',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.UpdateKernelResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteKernel(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.KernelService/DeleteKernel',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__service__pb2.DeleteKernelResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
