# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401

import builtins
import typing
from enum import Enum

class DataManager:
    def get_obj(self, cls_id:builtins.str, partition_id:builtins.int, obj_id:builtins.int) -> typing.Any: ...
    def set_obj(self, obj:ObjectData) -> None: ...
    def del_obj(self, meta:ObjectMetadata) -> None: ...

class InvocationRequest:
    partition_id: builtins.int
    cls_id: builtins.str
    fn_id: builtins.str
    options: builtins.dict[builtins.str, builtins.str]
    payload: builtins.list[builtins.int]
    def __new__(cls, cls_id:builtins.str, fn_id:builtins.str, partition_id:builtins.int=0, options:typing.Mapping[builtins.str, builtins.str]={}, payload:typing.Sequence[builtins.int]=...) -> InvocationRequest: ...

class InvocationResponse:
    payload: builtins.list[builtins.int]
    status: builtins.int
    header: builtins.dict[builtins.str, builtins.str]
    def __new__(cls, payload:typing.Sequence[builtins.int]=..., status:builtins.int=0, header:typing.Mapping[builtins.str, builtins.str]={}) -> InvocationResponse: ...

class OaasEngine:
    data_manager: DataManager
    rpc_manager: RpcManager
    def __new__(cls) -> OaasEngine: ...
    def serve_grpc_server(self, port:builtins.int, event_loop:typing.Any, callback:typing.Any) -> None: ...
    def serve_function(self, key_expr:builtins.str, event_loop:typing.Any, callback:typing.Any) -> None: ...
    def stop_function(self, key_expr:builtins.str) -> None: ...
    def stop_server(self) -> None: ...

class ObjectData:
    meta: ObjectMetadata
    entries: builtins.dict[builtins.int, builtins.list[builtins.int]]

class ObjectInvocationRequest:
    partition_id: builtins.int
    cls_id: builtins.str
    fn_id: builtins.str
    object_id: builtins.int
    options: builtins.dict[builtins.str, builtins.str]
    payload: builtins.list[builtins.int]
    def __new__(cls, cls_id:builtins.str, fn_id:builtins.str, object_id:builtins.int, partition_id:builtins.int=0, options:typing.Mapping[builtins.str, builtins.str]={}, payload:typing.Sequence[builtins.int]=...) -> ObjectInvocationRequest: ...

class ObjectMetadata:
    object_id: builtins.int
    cls_id: builtins.str
    partition_id: builtins.int
    def __new__(cls, cls_id:builtins.str, partition_id:builtins.int, object_id:builtins.int) -> ObjectMetadata: ...

class RpcManager:
    def invoke_fn(self, req:InvocationRequest) -> InvocationResponse: ...
    def invoke_obj(self, req:ObjectInvocationRequest) -> InvocationResponse: ...

class InvocationResponseCode(Enum):
    Okay = ...
    InvalidRequest = ...
    AppError = ...
    SystemError = ...

def init_logger(level:builtins.str) -> None: ...

def rust_sleep() -> typing.Any: ...

def try_callback(callback:typing.Any) -> typing.Any: ...

