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

from kaskada.kaskada.v1alpha import compute_service_pb2 as kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2


class ComputeServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Compile = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ComputeService/Compile',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileResponse.FromString,
                )
        self.Execute = channel.unary_stream(
                '/kaskada.kaskada.v1alpha.ComputeService/Execute',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteResponse.FromString,
                )
        self.GetCurrentSnapshotVersion = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.ComputeService/GetCurrentSnapshotVersion',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionResponse.FromString,
                )


class ComputeServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

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

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

    def GetCurrentSnapshotVersion(self, request, context):
        """Gets the current snapshot version.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ComputeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Compile': grpc.unary_unary_rpc_method_handler(
                    servicer.Compile,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileResponse.SerializeToString,
            ),
            'Execute': grpc.unary_stream_rpc_method_handler(
                    servicer.Execute,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteResponse.SerializeToString,
            ),
            'GetCurrentSnapshotVersion': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCurrentSnapshotVersion,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v1alpha.ComputeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Compile(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, '/kaskada.kaskada.v1alpha.ComputeService/Compile',
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.CompileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Execute(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_stream(request, target, '/kaskada.kaskada.v1alpha.ComputeService/Execute',
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.ExecuteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCurrentSnapshotVersion(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, '/kaskada.kaskada.v1alpha.ComputeService/GetCurrentSnapshotVersion',
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_compute__service__pb2.GetCurrentSnapshotVersionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
