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

from mubit.v1 import core_pb2 as mubit_dot_v1_dot_core__pb2

GRPC_GENERATED_VERSION = '1.76.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 mubit/v1/core_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 CoreServiceStub(object):
    """Mubit CoreService gRPC service definition
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateUser = channel.unary_unary(
                '/mubit.v1.CoreService/CreateUser',
                request_serializer=mubit_dot_v1_dot_core__pb2.CreateUserRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.CreateUserResponse.FromString,
                _registered_method=True)
        self.RotateUserApiKey = channel.unary_unary(
                '/mubit.v1.CoreService/RotateUserApiKey',
                request_serializer=mubit_dot_v1_dot_core__pb2.RotateUserApiKeyRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.RotateUserApiKeyResponse.FromString,
                _registered_method=True)
        self.RevokeUserApiKey = channel.unary_unary(
                '/mubit.v1.CoreService/RevokeUserApiKey',
                request_serializer=mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyResponse.FromString,
                _registered_method=True)
        self.ListUsers = channel.unary_unary(
                '/mubit.v1.CoreService/ListUsers',
                request_serializer=mubit_dot_v1_dot_core__pb2.ListUsersRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.ListUsersResponse.FromString,
                _registered_method=True)
        self.GetUser = channel.unary_unary(
                '/mubit.v1.CoreService/GetUser',
                request_serializer=mubit_dot_v1_dot_core__pb2.GetUserRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.GetUserResponse.FromString,
                _registered_method=True)
        self.DeleteUser = channel.unary_unary(
                '/mubit.v1.CoreService/DeleteUser',
                request_serializer=mubit_dot_v1_dot_core__pb2.DeleteUserRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.DeleteUserResponse.FromString,
                _registered_method=True)
        self.Health = channel.unary_unary(
                '/mubit.v1.CoreService/Health',
                request_serializer=mubit_dot_v1_dot_core__pb2.HealthRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.HealthResponse.FromString,
                _registered_method=True)
        self.Insert = channel.unary_unary(
                '/mubit.v1.CoreService/Insert',
                request_serializer=mubit_dot_v1_dot_core__pb2.InsertRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.InsertResponse.FromString,
                _registered_method=True)
        self.GetNode = channel.unary_unary(
                '/mubit.v1.CoreService/GetNode',
                request_serializer=mubit_dot_v1_dot_core__pb2.GetNodeRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.GetNodeResponse.FromString,
                _registered_method=True)
        self.DeleteNode = channel.unary_unary(
                '/mubit.v1.CoreService/DeleteNode',
                request_serializer=mubit_dot_v1_dot_core__pb2.DeleteNodeRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.DeleteNodeResponse.FromString,
                _registered_method=True)
        self.DeleteRun = channel.unary_unary(
                '/mubit.v1.CoreService/DeleteRun',
                request_serializer=mubit_dot_v1_dot_core__pb2.DeleteRunRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.DeleteRunResponse.FromString,
                _registered_method=True)
        self.Search = channel.unary_unary(
                '/mubit.v1.CoreService/Search',
                request_serializer=mubit_dot_v1_dot_core__pb2.SearchRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.SearchResponse.FromString,
                _registered_method=True)
        self.BatchInsert = channel.stream_unary(
                '/mubit.v1.CoreService/BatchInsert',
                request_serializer=mubit_dot_v1_dot_core__pb2.InsertRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.BatchInsertResponse.FromString,
                _registered_method=True)
        self.StreamSearch = channel.unary_stream(
                '/mubit.v1.CoreService/StreamSearch',
                request_serializer=mubit_dot_v1_dot_core__pb2.SearchRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.SearchResult.FromString,
                _registered_method=True)
        self.GrantPermission = channel.unary_unary(
                '/mubit.v1.CoreService/GrantPermission',
                request_serializer=mubit_dot_v1_dot_core__pb2.GrantPermissionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.GrantPermissionResponse.FromString,
                _registered_method=True)
        self.RevokePermission = channel.unary_unary(
                '/mubit.v1.CoreService/RevokePermission',
                request_serializer=mubit_dot_v1_dot_core__pb2.RevokePermissionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.RevokePermissionResponse.FromString,
                _registered_method=True)
        self.Subscribe = channel.unary_stream(
                '/mubit.v1.CoreService/Subscribe',
                request_serializer=mubit_dot_v1_dot_core__pb2.CoreSubscribeRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.PubSubEvent.FromString,
                _registered_method=True)
        self.WriteMemory = channel.unary_unary(
                '/mubit.v1.CoreService/WriteMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.WriteMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.WriteMemoryResponse.FromString,
                _registered_method=True)
        self.ReadMemory = channel.unary_unary(
                '/mubit.v1.CoreService/ReadMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.ReadMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.ReadMemoryResponse.FromString,
                _registered_method=True)
        self.AddMemory = channel.unary_unary(
                '/mubit.v1.CoreService/AddMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.AddMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.AddMemoryResponse.FromString,
                _registered_method=True)
        self.GetMemory = channel.unary_unary(
                '/mubit.v1.CoreService/GetMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.GetMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.GetMemoryResponse.FromString,
                _registered_method=True)
        self.ClearMemory = channel.unary_unary(
                '/mubit.v1.CoreService/ClearMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.ClearMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.ClearMemoryResponse.FromString,
                _registered_method=True)
        self.WatchMemory = channel.unary_stream(
                '/mubit.v1.CoreService/WatchMemory',
                request_serializer=mubit_dot_v1_dot_core__pb2.WatchMemoryRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.MemoryEvent.FromString,
                _registered_method=True)
        self.CreateSession = channel.unary_unary(
                '/mubit.v1.CoreService/CreateSession',
                request_serializer=mubit_dot_v1_dot_core__pb2.CreateSessionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.CreateSessionResponse.FromString,
                _registered_method=True)
        self.SnapshotSession = channel.unary_unary(
                '/mubit.v1.CoreService/SnapshotSession',
                request_serializer=mubit_dot_v1_dot_core__pb2.SnapshotSessionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.SnapshotSessionResponse.FromString,
                _registered_method=True)
        self.LoadSession = channel.unary_unary(
                '/mubit.v1.CoreService/LoadSession',
                request_serializer=mubit_dot_v1_dot_core__pb2.LoadSessionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.LoadSessionResponse.FromString,
                _registered_method=True)
        self.CommitSession = channel.unary_unary(
                '/mubit.v1.CoreService/CommitSession',
                request_serializer=mubit_dot_v1_dot_core__pb2.CommitSessionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.CommitSessionResponse.FromString,
                _registered_method=True)
        self.DropSession = channel.unary_unary(
                '/mubit.v1.CoreService/DropSession',
                request_serializer=mubit_dot_v1_dot_core__pb2.DropSessionRequest.SerializeToString,
                response_deserializer=mubit_dot_v1_dot_core__pb2.DropSessionResponse.FromString,
                _registered_method=True)


class CoreServiceServicer(object):
    """Mubit CoreService gRPC service definition
    """

    def CreateUser(self, request, context):
        """Create User (Admin only)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RotateUserApiKey(self, request, context):
        """Rotate a user's API key (Admin only)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RevokeUserApiKey(self, request, context):
        """Revoke a user's API key (Admin only)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUsers(self, request, context):
        """List users (Admin only)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUser(self, request, context):
        """Get a user (Admin or self)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteUser(self, request, context):
        """Delete User (Admin only)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def Insert(self, request, context):
        """Insert a document
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def DeleteNode(self, request, context):
        """Delete a document
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteRun(self, request, context):
        """Delete all documents in a run
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Search(self, request, context):
        """Search for similar documents
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BatchInsert(self, request_iterator, context):
        """Batch insert (streaming)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamSearch(self, request, context):
        """Streaming search results
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GrantPermission(self, request, context):
        """ACL Operations
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RevokePermission(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 Subscribe(self, request, context):
        """PubSub
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WriteMemory(self, request, context):
        """SDM Write
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReadMemory(self, request, context):
        """SDM Read
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddMemory(self, request, context):
        """Agent Memory (Scratchpad)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMemory(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 ClearMemory(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 WatchMemory(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 CreateSession(self, request, context):
        """Cortex Session Operations
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SnapshotSession(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 LoadSession(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 CommitSession(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 DropSession(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_CoreServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUser,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.CreateUserRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.CreateUserResponse.SerializeToString,
            ),
            'RotateUserApiKey': grpc.unary_unary_rpc_method_handler(
                    servicer.RotateUserApiKey,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.RotateUserApiKeyRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.RotateUserApiKeyResponse.SerializeToString,
            ),
            'RevokeUserApiKey': grpc.unary_unary_rpc_method_handler(
                    servicer.RevokeUserApiKey,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyResponse.SerializeToString,
            ),
            'ListUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUsers,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.ListUsersRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.ListUsersResponse.SerializeToString,
            ),
            'GetUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUser,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.GetUserRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.GetUserResponse.SerializeToString,
            ),
            'DeleteUser': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUser,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.DeleteUserRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.DeleteUserResponse.SerializeToString,
            ),
            'Health': grpc.unary_unary_rpc_method_handler(
                    servicer.Health,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.HealthRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.HealthResponse.SerializeToString,
            ),
            'Insert': grpc.unary_unary_rpc_method_handler(
                    servicer.Insert,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.InsertRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.InsertResponse.SerializeToString,
            ),
            'GetNode': grpc.unary_unary_rpc_method_handler(
                    servicer.GetNode,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.GetNodeRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.GetNodeResponse.SerializeToString,
            ),
            'DeleteNode': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteNode,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.DeleteNodeRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.DeleteNodeResponse.SerializeToString,
            ),
            'DeleteRun': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteRun,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.DeleteRunRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.DeleteRunResponse.SerializeToString,
            ),
            'Search': grpc.unary_unary_rpc_method_handler(
                    servicer.Search,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.SearchRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.SearchResponse.SerializeToString,
            ),
            'BatchInsert': grpc.stream_unary_rpc_method_handler(
                    servicer.BatchInsert,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.InsertRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.BatchInsertResponse.SerializeToString,
            ),
            'StreamSearch': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamSearch,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.SearchRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.SearchResult.SerializeToString,
            ),
            'GrantPermission': grpc.unary_unary_rpc_method_handler(
                    servicer.GrantPermission,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.GrantPermissionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.GrantPermissionResponse.SerializeToString,
            ),
            'RevokePermission': grpc.unary_unary_rpc_method_handler(
                    servicer.RevokePermission,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.RevokePermissionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.RevokePermissionResponse.SerializeToString,
            ),
            'Subscribe': grpc.unary_stream_rpc_method_handler(
                    servicer.Subscribe,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.CoreSubscribeRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.PubSubEvent.SerializeToString,
            ),
            'WriteMemory': grpc.unary_unary_rpc_method_handler(
                    servicer.WriteMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.WriteMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.WriteMemoryResponse.SerializeToString,
            ),
            'ReadMemory': grpc.unary_unary_rpc_method_handler(
                    servicer.ReadMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.ReadMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.ReadMemoryResponse.SerializeToString,
            ),
            'AddMemory': grpc.unary_unary_rpc_method_handler(
                    servicer.AddMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.AddMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.AddMemoryResponse.SerializeToString,
            ),
            'GetMemory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.GetMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.GetMemoryResponse.SerializeToString,
            ),
            'ClearMemory': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.ClearMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.ClearMemoryResponse.SerializeToString,
            ),
            'WatchMemory': grpc.unary_stream_rpc_method_handler(
                    servicer.WatchMemory,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.WatchMemoryRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.MemoryEvent.SerializeToString,
            ),
            'CreateSession': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSession,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.CreateSessionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.CreateSessionResponse.SerializeToString,
            ),
            'SnapshotSession': grpc.unary_unary_rpc_method_handler(
                    servicer.SnapshotSession,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.SnapshotSessionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.SnapshotSessionResponse.SerializeToString,
            ),
            'LoadSession': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadSession,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.LoadSessionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.LoadSessionResponse.SerializeToString,
            ),
            'CommitSession': grpc.unary_unary_rpc_method_handler(
                    servicer.CommitSession,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.CommitSessionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.CommitSessionResponse.SerializeToString,
            ),
            'DropSession': grpc.unary_unary_rpc_method_handler(
                    servicer.DropSession,
                    request_deserializer=mubit_dot_v1_dot_core__pb2.DropSessionRequest.FromString,
                    response_serializer=mubit_dot_v1_dot_core__pb2.DropSessionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mubit.v1.CoreService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mubit.v1.CoreService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class CoreService(object):
    """Mubit CoreService gRPC service definition
    """

    @staticmethod
    def CreateUser(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,
            '/mubit.v1.CoreService/CreateUser',
            mubit_dot_v1_dot_core__pb2.CreateUserRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.CreateUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RotateUserApiKey(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,
            '/mubit.v1.CoreService/RotateUserApiKey',
            mubit_dot_v1_dot_core__pb2.RotateUserApiKeyRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.RotateUserApiKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RevokeUserApiKey(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,
            '/mubit.v1.CoreService/RevokeUserApiKey',
            mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.RevokeUserApiKeyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListUsers(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,
            '/mubit.v1.CoreService/ListUsers',
            mubit_dot_v1_dot_core__pb2.ListUsersRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.ListUsersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUser(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,
            '/mubit.v1.CoreService/GetUser',
            mubit_dot_v1_dot_core__pb2.GetUserRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.GetUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteUser(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,
            '/mubit.v1.CoreService/DeleteUser',
            mubit_dot_v1_dot_core__pb2.DeleteUserRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.DeleteUserResponse.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,
            '/mubit.v1.CoreService/Health',
            mubit_dot_v1_dot_core__pb2.HealthRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.HealthResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Insert(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,
            '/mubit.v1.CoreService/Insert',
            mubit_dot_v1_dot_core__pb2.InsertRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.InsertResponse.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,
            '/mubit.v1.CoreService/GetNode',
            mubit_dot_v1_dot_core__pb2.GetNodeRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.GetNodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteNode(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,
            '/mubit.v1.CoreService/DeleteNode',
            mubit_dot_v1_dot_core__pb2.DeleteNodeRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.DeleteNodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteRun(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,
            '/mubit.v1.CoreService/DeleteRun',
            mubit_dot_v1_dot_core__pb2.DeleteRunRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.DeleteRunResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Search(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,
            '/mubit.v1.CoreService/Search',
            mubit_dot_v1_dot_core__pb2.SearchRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.SearchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BatchInsert(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,
            '/mubit.v1.CoreService/BatchInsert',
            mubit_dot_v1_dot_core__pb2.InsertRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.BatchInsertResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamSearch(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,
            '/mubit.v1.CoreService/StreamSearch',
            mubit_dot_v1_dot_core__pb2.SearchRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.SearchResult.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GrantPermission(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,
            '/mubit.v1.CoreService/GrantPermission',
            mubit_dot_v1_dot_core__pb2.GrantPermissionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.GrantPermissionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RevokePermission(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,
            '/mubit.v1.CoreService/RevokePermission',
            mubit_dot_v1_dot_core__pb2.RevokePermissionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.RevokePermissionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @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,
            '/mubit.v1.CoreService/Subscribe',
            mubit_dot_v1_dot_core__pb2.CoreSubscribeRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.PubSubEvent.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WriteMemory(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,
            '/mubit.v1.CoreService/WriteMemory',
            mubit_dot_v1_dot_core__pb2.WriteMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.WriteMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ReadMemory(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,
            '/mubit.v1.CoreService/ReadMemory',
            mubit_dot_v1_dot_core__pb2.ReadMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.ReadMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddMemory(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,
            '/mubit.v1.CoreService/AddMemory',
            mubit_dot_v1_dot_core__pb2.AddMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.AddMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMemory(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,
            '/mubit.v1.CoreService/GetMemory',
            mubit_dot_v1_dot_core__pb2.GetMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.GetMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ClearMemory(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,
            '/mubit.v1.CoreService/ClearMemory',
            mubit_dot_v1_dot_core__pb2.ClearMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.ClearMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def WatchMemory(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,
            '/mubit.v1.CoreService/WatchMemory',
            mubit_dot_v1_dot_core__pb2.WatchMemoryRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.MemoryEvent.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateSession(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,
            '/mubit.v1.CoreService/CreateSession',
            mubit_dot_v1_dot_core__pb2.CreateSessionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.CreateSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SnapshotSession(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,
            '/mubit.v1.CoreService/SnapshotSession',
            mubit_dot_v1_dot_core__pb2.SnapshotSessionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.SnapshotSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LoadSession(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,
            '/mubit.v1.CoreService/LoadSession',
            mubit_dot_v1_dot_core__pb2.LoadSessionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.LoadSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CommitSession(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,
            '/mubit.v1.CoreService/CommitSession',
            mubit_dot_v1_dot_core__pb2.CommitSessionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.CommitSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DropSession(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,
            '/mubit.v1.CoreService/DropSession',
            mubit_dot_v1_dot_core__pb2.DropSessionRequest.SerializeToString,
            mubit_dot_v1_dot_core__pb2.DropSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
