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


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateBinary = channel.unary_unary(
            "/sila2.org.silastandard.BinaryUpload/CreateBinary",
            request_serializer=SiLABinaryTransfer__pb2.CreateBinaryRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.CreateBinaryResponse.FromString,
        )
        self.UploadChunk = channel.stream_stream(
            "/sila2.org.silastandard.BinaryUpload/UploadChunk",
            request_serializer=SiLABinaryTransfer__pb2.UploadChunkRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.UploadChunkResponse.FromString,
        )
        self.DeleteBinary = channel.unary_unary(
            "/sila2.org.silastandard.BinaryUpload/DeleteBinary",
            request_serializer=SiLABinaryTransfer__pb2.DeleteBinaryRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.DeleteBinaryResponse.FromString,
        )


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

    def CreateBinary(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 UploadChunk(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 DeleteBinary(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_BinaryUploadServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateBinary": grpc.unary_unary_rpc_method_handler(
            servicer.CreateBinary,
            request_deserializer=SiLABinaryTransfer__pb2.CreateBinaryRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.CreateBinaryResponse.SerializeToString,
        ),
        "UploadChunk": grpc.stream_stream_rpc_method_handler(
            servicer.UploadChunk,
            request_deserializer=SiLABinaryTransfer__pb2.UploadChunkRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.UploadChunkResponse.SerializeToString,
        ),
        "DeleteBinary": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBinary,
            request_deserializer=SiLABinaryTransfer__pb2.DeleteBinaryRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.DeleteBinaryResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("sila2.org.silastandard.BinaryUpload", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateBinary(
        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,
            "/sila2.org.silastandard.BinaryUpload/CreateBinary",
            SiLABinaryTransfer__pb2.CreateBinaryRequest.SerializeToString,
            SiLABinaryTransfer__pb2.CreateBinaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UploadChunk(
        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_stream(
            request_iterator,
            target,
            "/sila2.org.silastandard.BinaryUpload/UploadChunk",
            SiLABinaryTransfer__pb2.UploadChunkRequest.SerializeToString,
            SiLABinaryTransfer__pb2.UploadChunkResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeleteBinary(
        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,
            "/sila2.org.silastandard.BinaryUpload/DeleteBinary",
            SiLABinaryTransfer__pb2.DeleteBinaryRequest.SerializeToString,
            SiLABinaryTransfer__pb2.DeleteBinaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetBinaryInfo = channel.unary_unary(
            "/sila2.org.silastandard.BinaryDownload/GetBinaryInfo",
            request_serializer=SiLABinaryTransfer__pb2.GetBinaryInfoRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.GetBinaryInfoResponse.FromString,
        )
        self.GetChunk = channel.stream_stream(
            "/sila2.org.silastandard.BinaryDownload/GetChunk",
            request_serializer=SiLABinaryTransfer__pb2.GetChunkRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.GetChunkResponse.FromString,
        )
        self.DeleteBinary = channel.unary_unary(
            "/sila2.org.silastandard.BinaryDownload/DeleteBinary",
            request_serializer=SiLABinaryTransfer__pb2.DeleteBinaryRequest.SerializeToString,
            response_deserializer=SiLABinaryTransfer__pb2.DeleteBinaryResponse.FromString,
        )


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

    def GetBinaryInfo(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 GetChunk(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 DeleteBinary(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_BinaryDownloadServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetBinaryInfo": grpc.unary_unary_rpc_method_handler(
            servicer.GetBinaryInfo,
            request_deserializer=SiLABinaryTransfer__pb2.GetBinaryInfoRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.GetBinaryInfoResponse.SerializeToString,
        ),
        "GetChunk": grpc.stream_stream_rpc_method_handler(
            servicer.GetChunk,
            request_deserializer=SiLABinaryTransfer__pb2.GetChunkRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.GetChunkResponse.SerializeToString,
        ),
        "DeleteBinary": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteBinary,
            request_deserializer=SiLABinaryTransfer__pb2.DeleteBinaryRequest.FromString,
            response_serializer=SiLABinaryTransfer__pb2.DeleteBinaryResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("sila2.org.silastandard.BinaryDownload", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetBinaryInfo(
        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,
            "/sila2.org.silastandard.BinaryDownload/GetBinaryInfo",
            SiLABinaryTransfer__pb2.GetBinaryInfoRequest.SerializeToString,
            SiLABinaryTransfer__pb2.GetBinaryInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetChunk(
        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_stream(
            request_iterator,
            target,
            "/sila2.org.silastandard.BinaryDownload/GetChunk",
            SiLABinaryTransfer__pb2.GetChunkRequest.SerializeToString,
            SiLABinaryTransfer__pb2.GetChunkResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeleteBinary(
        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,
            "/sila2.org.silastandard.BinaryDownload/DeleteBinary",
            SiLABinaryTransfer__pb2.DeleteBinaryRequest.SerializeToString,
            SiLABinaryTransfer__pb2.DeleteBinaryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
