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

import grpc

from . import entdb_pb2 as entdb__pb2

GRPC_GENERATED_VERSION = "1.78.0"
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower

    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f"The grpc package installed is at version {GRPC_VERSION},"
        + " but the generated code in entdb_pb2_grpc.py depends on"
        + f" grpcio>={GRPC_GENERATED_VERSION}."
        + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
        + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
    )


class EntDBServiceStub:
    """EntDB Service - Main API for database operations"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.ExecuteAtomic = channel.unary_unary(
            "/entdb.v1.EntDBService/ExecuteAtomic",
            request_serializer=entdb__pb2.ExecuteAtomicRequest.SerializeToString,
            response_deserializer=entdb__pb2.ExecuteAtomicResponse.FromString,
            _registered_method=True,
        )
        self.GetReceiptStatus = channel.unary_unary(
            "/entdb.v1.EntDBService/GetReceiptStatus",
            request_serializer=entdb__pb2.GetReceiptStatusRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetReceiptStatusResponse.FromString,
            _registered_method=True,
        )
        self.GetNode = channel.unary_unary(
            "/entdb.v1.EntDBService/GetNode",
            request_serializer=entdb__pb2.GetNodeRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetNodeResponse.FromString,
            _registered_method=True,
        )
        self.GetNodes = channel.unary_unary(
            "/entdb.v1.EntDBService/GetNodes",
            request_serializer=entdb__pb2.GetNodesRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetNodesResponse.FromString,
            _registered_method=True,
        )
        self.QueryNodes = channel.unary_unary(
            "/entdb.v1.EntDBService/QueryNodes",
            request_serializer=entdb__pb2.QueryNodesRequest.SerializeToString,
            response_deserializer=entdb__pb2.QueryNodesResponse.FromString,
            _registered_method=True,
        )
        self.GetEdgesFrom = channel.unary_unary(
            "/entdb.v1.EntDBService/GetEdgesFrom",
            request_serializer=entdb__pb2.GetEdgesRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetEdgesResponse.FromString,
            _registered_method=True,
        )
        self.GetEdgesTo = channel.unary_unary(
            "/entdb.v1.EntDBService/GetEdgesTo",
            request_serializer=entdb__pb2.GetEdgesRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetEdgesResponse.FromString,
            _registered_method=True,
        )
        self.SearchMailbox = channel.unary_unary(
            "/entdb.v1.EntDBService/SearchMailbox",
            request_serializer=entdb__pb2.SearchMailboxRequest.SerializeToString,
            response_deserializer=entdb__pb2.SearchMailboxResponse.FromString,
            _registered_method=True,
        )
        self.GetMailbox = channel.unary_unary(
            "/entdb.v1.EntDBService/GetMailbox",
            request_serializer=entdb__pb2.GetMailboxRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetMailboxResponse.FromString,
            _registered_method=True,
        )
        self.Health = channel.unary_unary(
            "/entdb.v1.EntDBService/Health",
            request_serializer=entdb__pb2.HealthRequest.SerializeToString,
            response_deserializer=entdb__pb2.HealthResponse.FromString,
            _registered_method=True,
        )
        self.GetSchema = channel.unary_unary(
            "/entdb.v1.EntDBService/GetSchema",
            request_serializer=entdb__pb2.GetSchemaRequest.SerializeToString,
            response_deserializer=entdb__pb2.GetSchemaResponse.FromString,
            _registered_method=True,
        )


class EntDBServiceServicer:
    """EntDB Service - Main API for database operations"""

    def ExecuteAtomic(self, request, context):
        """Execute an atomic transaction containing one or more operations
        Returns a receipt that can be used to check application status
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetReceiptStatus(self, request, context):
        """Get the status of a previously submitted transaction"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetNode(self, request, context):
        """Get a node by ID"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetNodes(self, request, context):
        """Get multiple nodes by IDs"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def QueryNodes(self, request, context):
        """Query nodes by type with optional filters"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetEdgesFrom(self, request, context):
        """Get outgoing edges from a node"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetEdgesTo(self, request, context):
        """Get incoming edges to a node"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def SearchMailbox(self, request, context):
        """Search mailbox with full-text search"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetMailbox(self, request, context):
        """Get mailbox items for a user"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Health(self, request, context):
        """Get server health and status"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetSchema(self, request, context):
        """Get schema information"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_EntDBServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ExecuteAtomic": grpc.unary_unary_rpc_method_handler(
            servicer.ExecuteAtomic,
            request_deserializer=entdb__pb2.ExecuteAtomicRequest.FromString,
            response_serializer=entdb__pb2.ExecuteAtomicResponse.SerializeToString,
        ),
        "GetReceiptStatus": grpc.unary_unary_rpc_method_handler(
            servicer.GetReceiptStatus,
            request_deserializer=entdb__pb2.GetReceiptStatusRequest.FromString,
            response_serializer=entdb__pb2.GetReceiptStatusResponse.SerializeToString,
        ),
        "GetNode": grpc.unary_unary_rpc_method_handler(
            servicer.GetNode,
            request_deserializer=entdb__pb2.GetNodeRequest.FromString,
            response_serializer=entdb__pb2.GetNodeResponse.SerializeToString,
        ),
        "GetNodes": grpc.unary_unary_rpc_method_handler(
            servicer.GetNodes,
            request_deserializer=entdb__pb2.GetNodesRequest.FromString,
            response_serializer=entdb__pb2.GetNodesResponse.SerializeToString,
        ),
        "QueryNodes": grpc.unary_unary_rpc_method_handler(
            servicer.QueryNodes,
            request_deserializer=entdb__pb2.QueryNodesRequest.FromString,
            response_serializer=entdb__pb2.QueryNodesResponse.SerializeToString,
        ),
        "GetEdgesFrom": grpc.unary_unary_rpc_method_handler(
            servicer.GetEdgesFrom,
            request_deserializer=entdb__pb2.GetEdgesRequest.FromString,
            response_serializer=entdb__pb2.GetEdgesResponse.SerializeToString,
        ),
        "GetEdgesTo": grpc.unary_unary_rpc_method_handler(
            servicer.GetEdgesTo,
            request_deserializer=entdb__pb2.GetEdgesRequest.FromString,
            response_serializer=entdb__pb2.GetEdgesResponse.SerializeToString,
        ),
        "SearchMailbox": grpc.unary_unary_rpc_method_handler(
            servicer.SearchMailbox,
            request_deserializer=entdb__pb2.SearchMailboxRequest.FromString,
            response_serializer=entdb__pb2.SearchMailboxResponse.SerializeToString,
        ),
        "GetMailbox": grpc.unary_unary_rpc_method_handler(
            servicer.GetMailbox,
            request_deserializer=entdb__pb2.GetMailboxRequest.FromString,
            response_serializer=entdb__pb2.GetMailboxResponse.SerializeToString,
        ),
        "Health": grpc.unary_unary_rpc_method_handler(
            servicer.Health,
            request_deserializer=entdb__pb2.HealthRequest.FromString,
            response_serializer=entdb__pb2.HealthResponse.SerializeToString,
        ),
        "GetSchema": grpc.unary_unary_rpc_method_handler(
            servicer.GetSchema,
            request_deserializer=entdb__pb2.GetSchemaRequest.FromString,
            response_serializer=entdb__pb2.GetSchemaResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "entdb.v1.EntDBService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("entdb.v1.EntDBService", rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
class EntDBService:
    """EntDB Service - Main API for database operations"""

    @staticmethod
    def ExecuteAtomic(
        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,
            "/entdb.v1.EntDBService/ExecuteAtomic",
            entdb__pb2.ExecuteAtomicRequest.SerializeToString,
            entdb__pb2.ExecuteAtomicResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetReceiptStatus(
        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,
            "/entdb.v1.EntDBService/GetReceiptStatus",
            entdb__pb2.GetReceiptStatusRequest.SerializeToString,
            entdb__pb2.GetReceiptStatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetNode(
        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,
            "/entdb.v1.EntDBService/GetNode",
            entdb__pb2.GetNodeRequest.SerializeToString,
            entdb__pb2.GetNodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetNodes(
        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,
            "/entdb.v1.EntDBService/GetNodes",
            entdb__pb2.GetNodesRequest.SerializeToString,
            entdb__pb2.GetNodesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def QueryNodes(
        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,
            "/entdb.v1.EntDBService/QueryNodes",
            entdb__pb2.QueryNodesRequest.SerializeToString,
            entdb__pb2.QueryNodesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetEdgesFrom(
        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,
            "/entdb.v1.EntDBService/GetEdgesFrom",
            entdb__pb2.GetEdgesRequest.SerializeToString,
            entdb__pb2.GetEdgesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetEdgesTo(
        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,
            "/entdb.v1.EntDBService/GetEdgesTo",
            entdb__pb2.GetEdgesRequest.SerializeToString,
            entdb__pb2.GetEdgesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def SearchMailbox(
        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,
            "/entdb.v1.EntDBService/SearchMailbox",
            entdb__pb2.SearchMailboxRequest.SerializeToString,
            entdb__pb2.SearchMailboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetMailbox(
        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,
            "/entdb.v1.EntDBService/GetMailbox",
            entdb__pb2.GetMailboxRequest.SerializeToString,
            entdb__pb2.GetMailboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Health(
        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,
            "/entdb.v1.EntDBService/Health",
            entdb__pb2.HealthRequest.SerializeToString,
            entdb__pb2.HealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetSchema(
        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,
            "/entdb.v1.EntDBService/GetSchema",
            entdb__pb2.GetSchemaRequest.SerializeToString,
            entdb__pb2.GetSchemaResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
