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

from deepdriver.sdk.interface import grpc_interface_pb2 as deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.upload_log = channel.unary_unary(
                '/Resource/upload_log',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogResponse.FromString,
                )
        self.upload_artifact = channel.unary_unary(
                '/Resource/upload_artifact',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactResponse.FromString,
                )
        self.upload_file = channel.stream_unary(
                '/Resource/upload_file',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileResponse.FromString,
                )
        self.use_artifact = channel.unary_unary(
                '/Resource/use_artifact',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactResponse.FromString,
                )
        self.download_file = channel.unary_stream(
                '/Resource/download_file',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileResponse.FromString,
                )
        self.update_config = channel.unary_unary(
                '/Resource/update_config',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigResponse.FromString,
                )
        self.send_alert = channel.unary_unary(
                '/Resource/send_alert',
                request_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertRequest.SerializeToString,
                response_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertResponse.FromString,
                )


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

    def upload_log(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 upload_artifact(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 upload_file(self, request_iterator, 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 use_artifact(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 download_file(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 update_config(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 send_alert(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 add_ResourceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'upload_log': grpc.unary_unary_rpc_method_handler(
                    servicer.upload_log,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogResponse.SerializeToString,
            ),
            'upload_artifact': grpc.unary_unary_rpc_method_handler(
                    servicer.upload_artifact,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactResponse.SerializeToString,
            ),
            'upload_file': grpc.stream_unary_rpc_method_handler(
                    servicer.upload_file,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileResponse.SerializeToString,
            ),
            'use_artifact': grpc.unary_unary_rpc_method_handler(
                    servicer.use_artifact,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactResponse.SerializeToString,
            ),
            'download_file': grpc.unary_stream_rpc_method_handler(
                    servicer.download_file,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileResponse.SerializeToString,
            ),
            'update_config': grpc.unary_unary_rpc_method_handler(
                    servicer.update_config,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigResponse.SerializeToString,
            ),
            'send_alert': grpc.unary_unary_rpc_method_handler(
                    servicer.send_alert,
                    request_deserializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertRequest.FromString,
                    response_serializer=deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Resource', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def upload_log(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, '/Resource/upload_log',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadLogResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def upload_artifact(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, '/Resource/upload_artifact',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadArtifactResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def upload_file(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, '/Resource/upload_file',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UploadFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def use_artifact(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, '/Resource/use_artifact',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UseArtifactResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def download_file(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, '/Resource/download_file',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.DownloadFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update_config(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, '/Resource/update_config',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.UpdateConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def send_alert(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, '/Resource/send_alert',
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertRequest.SerializeToString,
            deepdriver_dot_sdk_dot_interface_dot_grpc__interface__pb2.SendAlertResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
