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

from ..jobs import dag_pb2 as jobs_dot_dag__pb2
from ..jobs import job_pb2 as jobs_dot_job__pb2
from timeless import timeless_pb2 as timeless_dot_timeless__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetRandomDag = channel.unary_unary(
                '/timeless.Timeless/GetRandomDag',
                request_serializer=timeless_dot_timeless__pb2.RandomDAGRequest.SerializeToString,
                response_deserializer=jobs_dot_dag__pb2.DAG.FromString,
                )
        self.FillJobsFlow = channel.unary_unary(
                '/timeless.Timeless/FillJobsFlow',
                request_serializer=jobs_dot_job__pb2.Job.SerializeToString,
                response_deserializer=jobs_dot_job__pb2.Job.FromString,
                )


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

    def GetRandomDag(self, request, context):
        """method to get any RandomDag
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FillJobsFlow(self, request, context):
        """method to populate a Job with DAG
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TimelessServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetRandomDag': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRandomDag,
                    request_deserializer=timeless_dot_timeless__pb2.RandomDAGRequest.FromString,
                    response_serializer=jobs_dot_dag__pb2.DAG.SerializeToString,
            ),
            'FillJobsFlow': grpc.unary_unary_rpc_method_handler(
                    servicer.FillJobsFlow,
                    request_deserializer=jobs_dot_job__pb2.Job.FromString,
                    response_serializer=jobs_dot_job__pb2.Job.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'timeless.Timeless', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetRandomDag(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, '/timeless.Timeless/GetRandomDag',
            timeless_dot_timeless__pb2.RandomDAGRequest.SerializeToString,
            jobs_dot_dag__pb2.DAG.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FillJobsFlow(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, '/timeless.Timeless/FillJobsFlow',
            jobs_dot_job__pb2.Job.SerializeToString,
            jobs_dot_job__pb2.Job.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
