# 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 preparation_service_pb2 as kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.PrepareData = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.PreparationService/PrepareData',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataResponse.FromString,
                )
        self.GetCurrentPrepID = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.PreparationService/GetCurrentPrepID',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDResponse.FromString,
                )


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

    def PrepareData(self, request, context):
        """Prepares the data from source files
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCurrentPrepID(self, request, context):
        """Returns the current preparation ID of the preparation (currently hard coded)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PreparationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PrepareData': grpc.unary_unary_rpc_method_handler(
                    servicer.PrepareData,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataResponse.SerializeToString,
            ),
            'GetCurrentPrepID': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCurrentPrepID,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v1alpha.PreparationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def PrepareData(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.PreparationService/PrepareData',
            kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.PrepareDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCurrentPrepID(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.PreparationService/GetCurrentPrepID',
            kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_preparation__service__pb2.GetCurrentPrepIDResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
