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

from . import zip_service_pb2 as zip__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.StartZip = channel.unary_stream(
                '/zipservice.ZipService/StartZip',
                request_serializer=zip__service__pb2.ZipRequest.SerializeToString,
                response_deserializer=zip__service__pb2.ZipProgress.FromString,
                )
        self.DownloadZip = channel.unary_stream(
                '/zipservice.ZipService/DownloadZip',
                request_serializer=zip__service__pb2.DownloadRequest.SerializeToString,
                response_deserializer=zip__service__pb2.ZipChunk.FromString,
                )


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

    def StartZip(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 DownloadZip(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_ZipServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StartZip': grpc.unary_stream_rpc_method_handler(
                    servicer.StartZip,
                    request_deserializer=zip__service__pb2.ZipRequest.FromString,
                    response_serializer=zip__service__pb2.ZipProgress.SerializeToString,
            ),
            'DownloadZip': grpc.unary_stream_rpc_method_handler(
                    servicer.DownloadZip,
                    request_deserializer=zip__service__pb2.DownloadRequest.FromString,
                    response_serializer=zip__service__pb2.ZipChunk.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'zipservice.ZipService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def StartZip(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, '/zipservice.ZipService/StartZip',
            zip__service__pb2.ZipRequest.SerializeToString,
            zip__service__pb2.ZipProgress.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DownloadZip(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, '/zipservice.ZipService/DownloadZip',
            zip__service__pb2.DownloadRequest.SerializeToString,
            zip__service__pb2.ZipChunk.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
