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

import pyfactcast.grpc.generated.FactStore_pb2 as FactStore__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.subscribe = channel.unary_stream(
            "/org.factcast.grpc.api.gen.RemoteFactStore/subscribe",
            request_serializer=FactStore__pb2.MSG_SubscriptionRequest.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_Notification.FromString,
        )
        self.fetchById = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/fetchById",
            request_serializer=FactStore__pb2.MSG_UUID.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_OptionalFact.FromString,
        )
        self.publish = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/publish",
            request_serializer=FactStore__pb2.MSG_Facts.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_Empty.FromString,
        )
        self.serialOf = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/serialOf",
            request_serializer=FactStore__pb2.MSG_UUID.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_OptionalSerial.FromString,
        )
        self.handshake = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/handshake",
            request_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_ServerConfig.FromString,
        )
        self.enumerateNamespaces = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/enumerateNamespaces",
            request_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_StringSet.FromString,
        )
        self.enumerateTypes = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/enumerateTypes",
            request_serializer=FactStore__pb2.MSG_String.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_StringSet.FromString,
        )
        self.publishConditional = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/publishConditional",
            request_serializer=FactStore__pb2.MSG_ConditionalPublishRequest.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_ConditionalPublishResult.FromString,
        )
        self.invalidate = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/invalidate",
            request_serializer=FactStore__pb2.MSG_UUID.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_Empty.FromString,
        )
        self.stateFor = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/stateFor",
            request_serializer=FactStore__pb2.MSG_StateForRequest.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_UUID.FromString,
        )
        self.currentTime = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/currentTime",
            request_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_CurrentDatabaseTime.FromString,
        )
        self.fetchByIdAndVersion = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/fetchByIdAndVersion",
            request_serializer=FactStore__pb2.MSG_UUID_AND_VERSION.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_OptionalFact.FromString,
        )
        self.clearSnapshot = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/clearSnapshot",
            request_serializer=FactStore__pb2.MSG_SnapshotId.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_Empty.FromString,
        )
        self.setSnapshot = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/setSnapshot",
            request_serializer=FactStore__pb2.MSG_Snapshot.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_Empty.FromString,
        )
        self.getSnapshot = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/getSnapshot",
            request_serializer=FactStore__pb2.MSG_SnapshotId.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_OptionalSnapshot.FromString,
        )
        self.stateForSpecsJson = channel.unary_unary(
            "/org.factcast.grpc.api.gen.RemoteFactStore/stateForSpecsJson",
            request_serializer=FactStore__pb2.MSG_FactSpecsJson.SerializeToString,
            response_deserializer=FactStore__pb2.MSG_UUID.FromString,
        )


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

    def subscribe(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 fetchById(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 publish(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 serialOf(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 handshake(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 enumerateNamespaces(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 enumerateTypes(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 publishConditional(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 invalidate(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 stateFor(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 currentTime(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 fetchByIdAndVersion(self, request, context):
        """1.2"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def clearSnapshot(self, request, context):
        """1.3"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def setSnapshot(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 getSnapshot(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 stateForSpecsJson(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_RemoteFactStoreServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "subscribe": grpc.unary_stream_rpc_method_handler(
            servicer.subscribe,
            request_deserializer=FactStore__pb2.MSG_SubscriptionRequest.FromString,
            response_serializer=FactStore__pb2.MSG_Notification.SerializeToString,
        ),
        "fetchById": grpc.unary_unary_rpc_method_handler(
            servicer.fetchById,
            request_deserializer=FactStore__pb2.MSG_UUID.FromString,
            response_serializer=FactStore__pb2.MSG_OptionalFact.SerializeToString,
        ),
        "publish": grpc.unary_unary_rpc_method_handler(
            servicer.publish,
            request_deserializer=FactStore__pb2.MSG_Facts.FromString,
            response_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
        ),
        "serialOf": grpc.unary_unary_rpc_method_handler(
            servicer.serialOf,
            request_deserializer=FactStore__pb2.MSG_UUID.FromString,
            response_serializer=FactStore__pb2.MSG_OptionalSerial.SerializeToString,
        ),
        "handshake": grpc.unary_unary_rpc_method_handler(
            servicer.handshake,
            request_deserializer=FactStore__pb2.MSG_Empty.FromString,
            response_serializer=FactStore__pb2.MSG_ServerConfig.SerializeToString,
        ),
        "enumerateNamespaces": grpc.unary_unary_rpc_method_handler(
            servicer.enumerateNamespaces,
            request_deserializer=FactStore__pb2.MSG_Empty.FromString,
            response_serializer=FactStore__pb2.MSG_StringSet.SerializeToString,
        ),
        "enumerateTypes": grpc.unary_unary_rpc_method_handler(
            servicer.enumerateTypes,
            request_deserializer=FactStore__pb2.MSG_String.FromString,
            response_serializer=FactStore__pb2.MSG_StringSet.SerializeToString,
        ),
        "publishConditional": grpc.unary_unary_rpc_method_handler(
            servicer.publishConditional,
            request_deserializer=FactStore__pb2.MSG_ConditionalPublishRequest.FromString,
            response_serializer=FactStore__pb2.MSG_ConditionalPublishResult.SerializeToString,
        ),
        "invalidate": grpc.unary_unary_rpc_method_handler(
            servicer.invalidate,
            request_deserializer=FactStore__pb2.MSG_UUID.FromString,
            response_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
        ),
        "stateFor": grpc.unary_unary_rpc_method_handler(
            servicer.stateFor,
            request_deserializer=FactStore__pb2.MSG_StateForRequest.FromString,
            response_serializer=FactStore__pb2.MSG_UUID.SerializeToString,
        ),
        "currentTime": grpc.unary_unary_rpc_method_handler(
            servicer.currentTime,
            request_deserializer=FactStore__pb2.MSG_Empty.FromString,
            response_serializer=FactStore__pb2.MSG_CurrentDatabaseTime.SerializeToString,
        ),
        "fetchByIdAndVersion": grpc.unary_unary_rpc_method_handler(
            servicer.fetchByIdAndVersion,
            request_deserializer=FactStore__pb2.MSG_UUID_AND_VERSION.FromString,
            response_serializer=FactStore__pb2.MSG_OptionalFact.SerializeToString,
        ),
        "clearSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.clearSnapshot,
            request_deserializer=FactStore__pb2.MSG_SnapshotId.FromString,
            response_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
        ),
        "setSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.setSnapshot,
            request_deserializer=FactStore__pb2.MSG_Snapshot.FromString,
            response_serializer=FactStore__pb2.MSG_Empty.SerializeToString,
        ),
        "getSnapshot": grpc.unary_unary_rpc_method_handler(
            servicer.getSnapshot,
            request_deserializer=FactStore__pb2.MSG_SnapshotId.FromString,
            response_serializer=FactStore__pb2.MSG_OptionalSnapshot.SerializeToString,
        ),
        "stateForSpecsJson": grpc.unary_unary_rpc_method_handler(
            servicer.stateForSpecsJson,
            request_deserializer=FactStore__pb2.MSG_FactSpecsJson.FromString,
            response_serializer=FactStore__pb2.MSG_UUID.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "org.factcast.grpc.api.gen.RemoteFactStore", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def subscribe(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/subscribe",
            FactStore__pb2.MSG_SubscriptionRequest.SerializeToString,
            FactStore__pb2.MSG_Notification.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def fetchById(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/fetchById",
            FactStore__pb2.MSG_UUID.SerializeToString,
            FactStore__pb2.MSG_OptionalFact.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def publish(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/publish",
            FactStore__pb2.MSG_Facts.SerializeToString,
            FactStore__pb2.MSG_Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def serialOf(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/serialOf",
            FactStore__pb2.MSG_UUID.SerializeToString,
            FactStore__pb2.MSG_OptionalSerial.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def handshake(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/handshake",
            FactStore__pb2.MSG_Empty.SerializeToString,
            FactStore__pb2.MSG_ServerConfig.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def enumerateNamespaces(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/enumerateNamespaces",
            FactStore__pb2.MSG_Empty.SerializeToString,
            FactStore__pb2.MSG_StringSet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def enumerateTypes(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/enumerateTypes",
            FactStore__pb2.MSG_String.SerializeToString,
            FactStore__pb2.MSG_StringSet.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def publishConditional(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/publishConditional",
            FactStore__pb2.MSG_ConditionalPublishRequest.SerializeToString,
            FactStore__pb2.MSG_ConditionalPublishResult.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def invalidate(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/invalidate",
            FactStore__pb2.MSG_UUID.SerializeToString,
            FactStore__pb2.MSG_Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def stateFor(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/stateFor",
            FactStore__pb2.MSG_StateForRequest.SerializeToString,
            FactStore__pb2.MSG_UUID.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def currentTime(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/currentTime",
            FactStore__pb2.MSG_Empty.SerializeToString,
            FactStore__pb2.MSG_CurrentDatabaseTime.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def fetchByIdAndVersion(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/fetchByIdAndVersion",
            FactStore__pb2.MSG_UUID_AND_VERSION.SerializeToString,
            FactStore__pb2.MSG_OptionalFact.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def clearSnapshot(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/clearSnapshot",
            FactStore__pb2.MSG_SnapshotId.SerializeToString,
            FactStore__pb2.MSG_Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def setSnapshot(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/setSnapshot",
            FactStore__pb2.MSG_Snapshot.SerializeToString,
            FactStore__pb2.MSG_Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def getSnapshot(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/getSnapshot",
            FactStore__pb2.MSG_SnapshotId.SerializeToString,
            FactStore__pb2.MSG_OptionalSnapshot.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def stateForSpecsJson(
        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,
            "/org.factcast.grpc.api.gen.RemoteFactStore/stateForSpecsJson",
            FactStore__pb2.MSG_FactSpecsJson.SerializeToString,
            FactStore__pb2.MSG_UUID.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
