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

from jetpack.proto.runtime.v1alpha1 import remote_pb2 as jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.RemoteCall = channel.unary_unary(
                '/remote.RemoteExecutor/RemoteCall',
                request_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallRequest.SerializeToString,
                response_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallResponse.FromString,
                )
        self.LaunchJob = channel.unary_unary(
                '/remote.RemoteExecutor/LaunchJob',
                request_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobRequest.SerializeToString,
                response_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobResponse.FromString,
                )
        self.LaunchBlockingJob = channel.unary_unary(
                '/remote.RemoteExecutor/LaunchBlockingJob',
                request_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobRequest.SerializeToString,
                response_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobResponse.FromString,
                )
        self.PostResult = channel.unary_unary(
                '/remote.RemoteExecutor/PostResult',
                request_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultRequest.SerializeToString,
                response_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultResponse.FromString,
                )
        self.SetCronJobs = channel.unary_unary(
                '/remote.RemoteExecutor/SetCronJobs',
                request_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsRequest.SerializeToString,
                response_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsResponse.FromString,
                )


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

    def RemoteCall(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 LaunchJob(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 LaunchBlockingJob(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 PostResult(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 SetCronJobs(self, request, context):
        """Sets the cron jobs associated to an app. If the list of cron jobs is
        empty, removes all the cron jobs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RemoteExecutorServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'RemoteCall': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoteCall,
                    request_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallRequest.FromString,
                    response_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallResponse.SerializeToString,
            ),
            'LaunchJob': grpc.unary_unary_rpc_method_handler(
                    servicer.LaunchJob,
                    request_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobRequest.FromString,
                    response_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobResponse.SerializeToString,
            ),
            'LaunchBlockingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.LaunchBlockingJob,
                    request_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobRequest.FromString,
                    response_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobResponse.SerializeToString,
            ),
            'PostResult': grpc.unary_unary_rpc_method_handler(
                    servicer.PostResult,
                    request_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultRequest.FromString,
                    response_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultResponse.SerializeToString,
            ),
            'SetCronJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.SetCronJobs,
                    request_deserializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsRequest.FromString,
                    response_serializer=jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'remote.RemoteExecutor', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def RemoteCall(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, '/remote.RemoteExecutor/RemoteCall',
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallRequest.SerializeToString,
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.RemoteCallResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LaunchJob(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, '/remote.RemoteExecutor/LaunchJob',
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobRequest.SerializeToString,
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchJobResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LaunchBlockingJob(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, '/remote.RemoteExecutor/LaunchBlockingJob',
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobRequest.SerializeToString,
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.LaunchBlockingJobResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PostResult(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, '/remote.RemoteExecutor/PostResult',
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultRequest.SerializeToString,
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.PostResultResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetCronJobs(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, '/remote.RemoteExecutor/SetCronJobs',
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsRequest.SerializeToString,
            jetpack_dot_proto_dot_runtime_dot_v1alpha1_dot_remote__pb2.SetCronJobsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
