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

from kaskada.api.v1alpha import staged_file_pb2 as kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2


class StagedFileServiceStub(object):
    """A service for managing StagedFiles.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListStagedFiles = channel.unary_unary(
                '/kaskada.api.v1alpha.StagedFileService/ListStagedFiles',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesResponse.FromString,
                )
        self.GetStagedFile = channel.unary_unary(
                '/kaskada.api.v1alpha.StagedFileService/GetStagedFile',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileResponse.FromString,
                )
        self.CreateStagedFile = channel.unary_unary(
                '/kaskada.api.v1alpha.StagedFileService/CreateStagedFile',
                request_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileRequest.SerializeToString,
                response_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileResponse.FromString,
                )


class StagedFileServiceServicer(object):
    """A service for managing StagedFiles.
    """

    def ListStagedFiles(self, request, context):
        """Lists staged files.

        The response includes all StagedFiles defined for the Kaskada
        account. If a search string is provided, only StagedFiles matching
        the search string are returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStagedFile(self, request, context):
        """Gets a staged file.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateStagedFile(self, request, context):
        """Creates a staged file and returns a signed URL for uploading.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_StagedFileServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListStagedFiles': grpc.unary_unary_rpc_method_handler(
                    servicer.ListStagedFiles,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesResponse.SerializeToString,
            ),
            'GetStagedFile': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStagedFile,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileResponse.SerializeToString,
            ),
            'CreateStagedFile': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateStagedFile,
                    request_deserializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileRequest.FromString,
                    response_serializer=kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.api.v1alpha.StagedFileService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class StagedFileService(object):
    """A service for managing StagedFiles.
    """

    @staticmethod
    def ListStagedFiles(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, '/kaskada.api.v1alpha.StagedFileService/ListStagedFiles',
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.ListStagedFilesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetStagedFile(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, '/kaskada.api.v1alpha.StagedFileService/GetStagedFile',
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.GetStagedFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateStagedFile(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, '/kaskada.api.v1alpha.StagedFileService/CreateStagedFile',
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileRequest.SerializeToString,
            kaskada_dot_api_dot_v1alpha_dot_staged__file__pb2.CreateStagedFileResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
