# 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_template_service_pb2 as ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2


class KernelTemplateServiceStub(object):
    """KernelTemplateService manages KernelTemplate resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateKernelTemplate = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTemplateService/CreateKernelTemplate',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateResponse.FromString,
                )
        self.GetKernelTemplate = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTemplateService/GetKernelTemplate',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateResponse.FromString,
                )
        self.ListKernelTemplates = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTemplateService/ListKernelTemplates',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesResponse.FromString,
                )
        self.DeleteKernelTemplate = channel.unary_unary(
                '/ai.h2o.notebook.v1.KernelTemplateService/DeleteKernelTemplate',
                request_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateRequest.SerializeToString,
                response_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateResponse.FromString,
                )


class KernelTemplateServiceServicer(object):
    """KernelTemplateService manages KernelTemplate resources.
    """

    def CreateKernelTemplate(self, request, context):
        """Creates a new KernelTemplate.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

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

    def DeleteKernelTemplate(self, request, context):
        """Deletes a KernelTemplate.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_KernelTemplateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateKernelTemplate': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateKernelTemplate,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateResponse.SerializeToString,
            ),
            'GetKernelTemplate': grpc.unary_unary_rpc_method_handler(
                    servicer.GetKernelTemplate,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateResponse.SerializeToString,
            ),
            'ListKernelTemplates': grpc.unary_unary_rpc_method_handler(
                    servicer.ListKernelTemplates,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesResponse.SerializeToString,
            ),
            'DeleteKernelTemplate': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteKernelTemplate,
                    request_deserializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateRequest.FromString,
                    response_serializer=ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ai.h2o.notebook.v1.KernelTemplateService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateKernelTemplate(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.KernelTemplateService/CreateKernelTemplate',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.CreateKernelTemplateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetKernelTemplate(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.KernelTemplateService/GetKernelTemplate',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.GetKernelTemplateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListKernelTemplates(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.KernelTemplateService/ListKernelTemplates',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.ListKernelTemplatesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteKernelTemplate(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.KernelTemplateService/DeleteKernelTemplate',
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateRequest.SerializeToString,
            ai_dot_h2o_dot_notebook_dot_v1_dot_kernel__template__service__pb2.DeleteKernelTemplateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
