# 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


class EntDBServiceStub(object):
    """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,
                )
        self.GetReceiptStatus = channel.unary_unary(
                '/entdb.v1.EntDBService/GetReceiptStatus',
                request_serializer=entdb__pb2.GetReceiptStatusRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetReceiptStatusResponse.FromString,
                )
        self.GetNode = channel.unary_unary(
                '/entdb.v1.EntDBService/GetNode',
                request_serializer=entdb__pb2.GetNodeRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetNodeResponse.FromString,
                )
        self.GetNodes = channel.unary_unary(
                '/entdb.v1.EntDBService/GetNodes',
                request_serializer=entdb__pb2.GetNodesRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetNodesResponse.FromString,
                )
        self.QueryNodes = channel.unary_unary(
                '/entdb.v1.EntDBService/QueryNodes',
                request_serializer=entdb__pb2.QueryNodesRequest.SerializeToString,
                response_deserializer=entdb__pb2.QueryNodesResponse.FromString,
                )
        self.GetEdgesFrom = channel.unary_unary(
                '/entdb.v1.EntDBService/GetEdgesFrom',
                request_serializer=entdb__pb2.GetEdgesRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetEdgesResponse.FromString,
                )
        self.GetEdgesTo = channel.unary_unary(
                '/entdb.v1.EntDBService/GetEdgesTo',
                request_serializer=entdb__pb2.GetEdgesRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetEdgesResponse.FromString,
                )
        self.SearchMailbox = channel.unary_unary(
                '/entdb.v1.EntDBService/SearchMailbox',
                request_serializer=entdb__pb2.SearchMailboxRequest.SerializeToString,
                response_deserializer=entdb__pb2.SearchMailboxResponse.FromString,
                )
        self.GetMailbox = channel.unary_unary(
                '/entdb.v1.EntDBService/GetMailbox',
                request_serializer=entdb__pb2.GetMailboxRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetMailboxResponse.FromString,
                )
        self.Health = channel.unary_unary(
                '/entdb.v1.EntDBService/Health',
                request_serializer=entdb__pb2.HealthRequest.SerializeToString,
                response_deserializer=entdb__pb2.HealthResponse.FromString,
                )
        self.GetSchema = channel.unary_unary(
                '/entdb.v1.EntDBService/GetSchema',
                request_serializer=entdb__pb2.GetSchemaRequest.SerializeToString,
                response_deserializer=entdb__pb2.GetSchemaResponse.FromString,
                )
        self.ListTenants = channel.unary_unary(
                '/entdb.v1.EntDBService/ListTenants',
                request_serializer=entdb__pb2.ListTenantsRequest.SerializeToString,
                response_deserializer=entdb__pb2.ListTenantsResponse.FromString,
                )
        self.ListMailboxUsers = channel.unary_unary(
                '/entdb.v1.EntDBService/ListMailboxUsers',
                request_serializer=entdb__pb2.ListMailboxUsersRequest.SerializeToString,
                response_deserializer=entdb__pb2.ListMailboxUsersResponse.FromString,
                )


class EntDBServiceServicer(object):
    """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 ListTenants(self, request, context):
        """List all tenants that have data
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListMailboxUsers(self, request, context):
        """List mailbox users for a tenant
        """
        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,
            ),
            'ListTenants': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTenants,
                    request_deserializer=entdb__pb2.ListTenantsRequest.FromString,
                    response_serializer=entdb__pb2.ListTenantsResponse.SerializeToString,
            ),
            'ListMailboxUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListMailboxUsers,
                    request_deserializer=entdb__pb2.ListMailboxUsersRequest.FromString,
                    response_serializer=entdb__pb2.ListMailboxUsersResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'entdb.v1.EntDBService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class EntDBService(object):
    """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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @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)

    @staticmethod
    def ListTenants(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/ListTenants',
            entdb__pb2.ListTenantsRequest.SerializeToString,
            entdb__pb2.ListTenantsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListMailboxUsers(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/ListMailboxUsers',
            entdb__pb2.ListMailboxUsersRequest.SerializeToString,
            entdb__pb2.ListMailboxUsersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
