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

from . import api_pb2 as api__pb2


class ServiceStub(object):
    """Service is the peer-to-peer network API for document sync
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetReplicator = channel.unary_unary(
                '/api.pb.Service/SetReplicator',
                request_serializer=api__pb2.SetReplicatorRequest.SerializeToString,
                response_deserializer=api__pb2.SetReplicatorReply.FromString,
                )
        self.DeleteReplicator = channel.unary_unary(
                '/api.pb.Service/DeleteReplicator',
                request_serializer=api__pb2.DeleteReplicatorRequest.SerializeToString,
                response_deserializer=api__pb2.DeleteReplicatorReply.FromString,
                )
        self.GetAllReplicators = channel.unary_unary(
                '/api.pb.Service/GetAllReplicators',
                request_serializer=api__pb2.GetAllReplicatorRequest.SerializeToString,
                response_deserializer=api__pb2.GetAllReplicatorReply.FromString,
                )
        self.AddP2PCollections = channel.unary_unary(
                '/api.pb.Service/AddP2PCollections',
                request_serializer=api__pb2.AddP2PCollectionsRequest.SerializeToString,
                response_deserializer=api__pb2.AddP2PCollectionsReply.FromString,
                )
        self.RemoveP2PCollections = channel.unary_unary(
                '/api.pb.Service/RemoveP2PCollections',
                request_serializer=api__pb2.RemoveP2PCollectionsRequest.SerializeToString,
                response_deserializer=api__pb2.RemoveP2PCollectionsReply.FromString,
                )
        self.GetAllP2PCollections = channel.unary_unary(
                '/api.pb.Service/GetAllP2PCollections',
                request_serializer=api__pb2.GetAllP2PCollectionsRequest.SerializeToString,
                response_deserializer=api__pb2.GetAllP2PCollectionsReply.FromString,
                )


class ServiceServicer(object):
    """Service is the peer-to-peer network API for document sync
    """

    def SetReplicator(self, request, context):
        """SetReplicator for this peer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteReplicator(self, request, context):
        """DeleteReplicator for this peer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAllReplicators(self, request, context):
        """DeleteReplicator for this peer
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddP2PCollections(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 RemoveP2PCollections(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 GetAllP2PCollections(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_ServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetReplicator': grpc.unary_unary_rpc_method_handler(
                    servicer.SetReplicator,
                    request_deserializer=api__pb2.SetReplicatorRequest.FromString,
                    response_serializer=api__pb2.SetReplicatorReply.SerializeToString,
            ),
            'DeleteReplicator': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteReplicator,
                    request_deserializer=api__pb2.DeleteReplicatorRequest.FromString,
                    response_serializer=api__pb2.DeleteReplicatorReply.SerializeToString,
            ),
            'GetAllReplicators': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllReplicators,
                    request_deserializer=api__pb2.GetAllReplicatorRequest.FromString,
                    response_serializer=api__pb2.GetAllReplicatorReply.SerializeToString,
            ),
            'AddP2PCollections': grpc.unary_unary_rpc_method_handler(
                    servicer.AddP2PCollections,
                    request_deserializer=api__pb2.AddP2PCollectionsRequest.FromString,
                    response_serializer=api__pb2.AddP2PCollectionsReply.SerializeToString,
            ),
            'RemoveP2PCollections': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveP2PCollections,
                    request_deserializer=api__pb2.RemoveP2PCollectionsRequest.FromString,
                    response_serializer=api__pb2.RemoveP2PCollectionsReply.SerializeToString,
            ),
            'GetAllP2PCollections': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllP2PCollections,
                    request_deserializer=api__pb2.GetAllP2PCollectionsRequest.FromString,
                    response_serializer=api__pb2.GetAllP2PCollectionsReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'api.pb.Service', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Service(object):
    """Service is the peer-to-peer network API for document sync
    """

    @staticmethod
    def SetReplicator(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, '/api.pb.Service/SetReplicator',
            api__pb2.SetReplicatorRequest.SerializeToString,
            api__pb2.SetReplicatorReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteReplicator(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, '/api.pb.Service/DeleteReplicator',
            api__pb2.DeleteReplicatorRequest.SerializeToString,
            api__pb2.DeleteReplicatorReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAllReplicators(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, '/api.pb.Service/GetAllReplicators',
            api__pb2.GetAllReplicatorRequest.SerializeToString,
            api__pb2.GetAllReplicatorReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddP2PCollections(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, '/api.pb.Service/AddP2PCollections',
            api__pb2.AddP2PCollectionsRequest.SerializeToString,
            api__pb2.AddP2PCollectionsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveP2PCollections(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, '/api.pb.Service/RemoveP2PCollections',
            api__pb2.RemoveP2PCollectionsRequest.SerializeToString,
            api__pb2.RemoveP2PCollectionsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAllP2PCollections(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, '/api.pb.Service/GetAllP2PCollections',
            api__pb2.GetAllP2PCollectionsRequest.SerializeToString,
            api__pb2.GetAllP2PCollectionsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
