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

import chunk_pb2 as chunk__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.set = channel.unary_unary(
                '/FileHandler/set',
                request_serializer=chunk__pb2.File.SerializeToString,
                response_deserializer=chunk__pb2.File.FromString,
                )
        self.ul = channel.stream_unary(
                '/FileHandler/ul',
                request_serializer=chunk__pb2.Content.SerializeToString,
                response_deserializer=chunk__pb2.File.FromString,
                )
        self.dl = channel.unary_stream(
                '/FileHandler/dl',
                request_serializer=chunk__pb2.File.SerializeToString,
                response_deserializer=chunk__pb2.Content.FromString,
                )


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

    def set(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 ul(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 dl(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_FileHandlerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'set': grpc.unary_unary_rpc_method_handler(
                    servicer.set,
                    request_deserializer=chunk__pb2.File.FromString,
                    response_serializer=chunk__pb2.File.SerializeToString,
            ),
            'ul': grpc.stream_unary_rpc_method_handler(
                    servicer.ul,
                    request_deserializer=chunk__pb2.Content.FromString,
                    response_serializer=chunk__pb2.File.SerializeToString,
            ),
            'dl': grpc.unary_stream_rpc_method_handler(
                    servicer.dl,
                    request_deserializer=chunk__pb2.File.FromString,
                    response_serializer=chunk__pb2.Content.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'FileHandler', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def set(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, '/FileHandler/set',
            chunk__pb2.File.SerializeToString,
            chunk__pb2.File.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ul(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, '/FileHandler/ul',
            chunk__pb2.Content.SerializeToString,
            chunk__pb2.File.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def dl(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, '/FileHandler/dl',
            chunk__pb2.File.SerializeToString,
            chunk__pb2.Content.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
