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

from . import client_pb2 as client__pb2

GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in client_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class ClientServiceStub(object):
    """Client服务定义
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SubmitJob = channel.unary_unary(
                '/desam.client.ClientService/SubmitJob',
                request_serializer=client__pb2.SubmitJobRequest.SerializeToString,
                response_deserializer=client__pb2.SubmitJobResponse.FromString,
                _registered_method=True)
        self.QueryJob = channel.unary_unary(
                '/desam.client.ClientService/QueryJob',
                request_serializer=client__pb2.QueryJobRequest.SerializeToString,
                response_deserializer=client__pb2.QueryJobResponse.FromString,
                _registered_method=True)
        self.CancelJob = channel.unary_unary(
                '/desam.client.ClientService/CancelJob',
                request_serializer=client__pb2.CancelJobRequest.SerializeToString,
                response_deserializer=client__pb2.CancelJobResponse.FromString,
                _registered_method=True)
        self.ListJobs = channel.unary_unary(
                '/desam.client.ClientService/ListJobs',
                request_serializer=client__pb2.ListJobsRequest.SerializeToString,
                response_deserializer=client__pb2.ListJobsResponse.FromString,
                _registered_method=True)
        self.GetJobLogs = channel.unary_unary(
                '/desam.client.ClientService/GetJobLogs',
                request_serializer=client__pb2.GetJobLogsRequest.SerializeToString,
                response_deserializer=client__pb2.GetJobLogsResponse.FromString,
                _registered_method=True)
        self.BatchQueryJobs = channel.unary_unary(
                '/desam.client.ClientService/BatchQueryJobs',
                request_serializer=client__pb2.BatchQueryJobsRequest.SerializeToString,
                response_deserializer=client__pb2.ListJobsResponse.FromString,
                _registered_method=True)
        self.BatchCancelJobs = channel.unary_unary(
                '/desam.client.ClientService/BatchCancelJobs',
                request_serializer=client__pb2.BatchCancelJobsRequest.SerializeToString,
                response_deserializer=client__pb2.BatchCancelJobsResponse.FromString,
                _registered_method=True)
        self.QueryCacheQuota = channel.unary_unary(
                '/desam.client.ClientService/QueryCacheQuota',
                request_serializer=client__pb2.QueryCacheQuotaRequest.SerializeToString,
                response_deserializer=client__pb2.QueryCacheQuotaResponse.FromString,
                _registered_method=True)
        self.VerifyDependencies = channel.unary_unary(
                '/desam.client.ClientService/VerifyDependencies',
                request_serializer=client__pb2.VerifyDependenciesRequest.SerializeToString,
                response_deserializer=client__pb2.VerifyDependenciesResponse.FromString,
                _registered_method=True)
        self.UploadFile = channel.stream_unary(
                '/desam.client.ClientService/UploadFile',
                request_serializer=client__pb2.UploadFileRequest.SerializeToString,
                response_deserializer=client__pb2.UploadFileResponse.FromString,
                _registered_method=True)
        self.SubmitJobWithArtifacts = channel.unary_unary(
                '/desam.client.ClientService/SubmitJobWithArtifacts',
                request_serializer=client__pb2.SubmitJobWithArtifactsRequest.SerializeToString,
                response_deserializer=client__pb2.SubmitJobWithArtifactsResponse.FromString,
                _registered_method=True)


class ClientServiceServicer(object):
    """Client服务定义
    """

    def SubmitJob(self, request, context):
        """提交作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryJob(self, request, context):
        """查询作业状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelJob(self, request, context):
        """取消作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListJobs(self, request, context):
        """列出作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetJobLogs(self, request, context):
        """获取作业日志
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BatchQueryJobs(self, request, context):
        """批量查询作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BatchCancelJobs(self, request, context):
        """批量取消作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryCacheQuota(self, request, context):
        """查询缓存配额
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyDependencies(self, request, context):
        """验证数据依赖
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UploadFile(self, request_iterator, context):
        """上传文件
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubmitJobWithArtifacts(self, request, context):
        """提交带数据依赖的作业
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ClientServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SubmitJob': grpc.unary_unary_rpc_method_handler(
                    servicer.SubmitJob,
                    request_deserializer=client__pb2.SubmitJobRequest.FromString,
                    response_serializer=client__pb2.SubmitJobResponse.SerializeToString,
            ),
            'QueryJob': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryJob,
                    request_deserializer=client__pb2.QueryJobRequest.FromString,
                    response_serializer=client__pb2.QueryJobResponse.SerializeToString,
            ),
            'CancelJob': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelJob,
                    request_deserializer=client__pb2.CancelJobRequest.FromString,
                    response_serializer=client__pb2.CancelJobResponse.SerializeToString,
            ),
            'ListJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.ListJobs,
                    request_deserializer=client__pb2.ListJobsRequest.FromString,
                    response_serializer=client__pb2.ListJobsResponse.SerializeToString,
            ),
            'GetJobLogs': grpc.unary_unary_rpc_method_handler(
                    servicer.GetJobLogs,
                    request_deserializer=client__pb2.GetJobLogsRequest.FromString,
                    response_serializer=client__pb2.GetJobLogsResponse.SerializeToString,
            ),
            'BatchQueryJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchQueryJobs,
                    request_deserializer=client__pb2.BatchQueryJobsRequest.FromString,
                    response_serializer=client__pb2.ListJobsResponse.SerializeToString,
            ),
            'BatchCancelJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchCancelJobs,
                    request_deserializer=client__pb2.BatchCancelJobsRequest.FromString,
                    response_serializer=client__pb2.BatchCancelJobsResponse.SerializeToString,
            ),
            'QueryCacheQuota': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryCacheQuota,
                    request_deserializer=client__pb2.QueryCacheQuotaRequest.FromString,
                    response_serializer=client__pb2.QueryCacheQuotaResponse.SerializeToString,
            ),
            'VerifyDependencies': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyDependencies,
                    request_deserializer=client__pb2.VerifyDependenciesRequest.FromString,
                    response_serializer=client__pb2.VerifyDependenciesResponse.SerializeToString,
            ),
            'UploadFile': grpc.stream_unary_rpc_method_handler(
                    servicer.UploadFile,
                    request_deserializer=client__pb2.UploadFileRequest.FromString,
                    response_serializer=client__pb2.UploadFileResponse.SerializeToString,
            ),
            'SubmitJobWithArtifacts': grpc.unary_unary_rpc_method_handler(
                    servicer.SubmitJobWithArtifacts,
                    request_deserializer=client__pb2.SubmitJobWithArtifactsRequest.FromString,
                    response_serializer=client__pb2.SubmitJobWithArtifactsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'desam.client.ClientService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('desam.client.ClientService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class ClientService(object):
    """Client服务定义
    """

    @staticmethod
    def SubmitJob(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,
            '/desam.client.ClientService/SubmitJob',
            client__pb2.SubmitJobRequest.SerializeToString,
            client__pb2.SubmitJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def QueryJob(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,
            '/desam.client.ClientService/QueryJob',
            client__pb2.QueryJobRequest.SerializeToString,
            client__pb2.QueryJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelJob(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,
            '/desam.client.ClientService/CancelJob',
            client__pb2.CancelJobRequest.SerializeToString,
            client__pb2.CancelJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListJobs(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,
            '/desam.client.ClientService/ListJobs',
            client__pb2.ListJobsRequest.SerializeToString,
            client__pb2.ListJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetJobLogs(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,
            '/desam.client.ClientService/GetJobLogs',
            client__pb2.GetJobLogsRequest.SerializeToString,
            client__pb2.GetJobLogsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BatchQueryJobs(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,
            '/desam.client.ClientService/BatchQueryJobs',
            client__pb2.BatchQueryJobsRequest.SerializeToString,
            client__pb2.ListJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BatchCancelJobs(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,
            '/desam.client.ClientService/BatchCancelJobs',
            client__pb2.BatchCancelJobsRequest.SerializeToString,
            client__pb2.BatchCancelJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def QueryCacheQuota(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,
            '/desam.client.ClientService/QueryCacheQuota',
            client__pb2.QueryCacheQuotaRequest.SerializeToString,
            client__pb2.QueryCacheQuotaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyDependencies(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,
            '/desam.client.ClientService/VerifyDependencies',
            client__pb2.VerifyDependenciesRequest.SerializeToString,
            client__pb2.VerifyDependenciesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UploadFile(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(
            request_iterator,
            target,
            '/desam.client.ClientService/UploadFile',
            client__pb2.UploadFileRequest.SerializeToString,
            client__pb2.UploadFileResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SubmitJobWithArtifacts(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,
            '/desam.client.ClientService/SubmitJobWithArtifacts',
            client__pb2.SubmitJobWithArtifactsRequest.SerializeToString,
            client__pb2.SubmitJobWithArtifactsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
