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

from yandex.cloud.datasphere.v1 import project_data_service_pb2 as yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2


class ProjectDataServiceStub(object):
    """A set of methods for managing data of the Project resource.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.UploadFile = channel.stream_unary(
                '/yandex.cloud.datasphere.v1.ProjectDataService/UploadFile',
                request_serializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileResponse.FromString,
                )
        self.DownloadFile = channel.unary_stream(
                '/yandex.cloud.datasphere.v1.ProjectDataService/DownloadFile',
                request_serializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileResponse.FromString,
                )


class ProjectDataServiceServicer(object):
    """A set of methods for managing data of the Project resource.
    """

    def UploadFile(self, request_iterator, context):
        """Uploads a file to the specified project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DownloadFile(self, request, context):
        """Downloads the specified file from the specified project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ProjectDataServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UploadFile': grpc.stream_unary_rpc_method_handler(
                    servicer.UploadFile,
                    request_deserializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileResponse.SerializeToString,
            ),
            'DownloadFile': grpc.unary_stream_rpc_method_handler(
                    servicer.DownloadFile,
                    request_deserializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.datasphere.v1.ProjectDataService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ProjectDataService(object):
    """A set of methods for managing data of the Project resource.
    """

    @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, '/yandex.cloud.datasphere.v1.ProjectDataService/UploadFile',
            yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileRequest.SerializeToString,
            yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.UploadFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DownloadFile(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, '/yandex.cloud.datasphere.v1.ProjectDataService/DownloadFile',
            yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileRequest.SerializeToString,
            yandex_dot_cloud_dot_datasphere_dot_v1_dot_project__data__service__pb2.DownloadFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
