# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # cimport cython from typing import AsyncIterator from cpython.version cimport PY_VERSION_HEX from libc.stdint cimport ( int8_t as cint8_t, int16_t as cint16_t, int32_t as cint32_t, int64_t as cint64_t, ) from libcpp.memory cimport shared_ptr, make_shared, unique_ptr from libcpp.string cimport string from libcpp cimport bool as cbool from cpython cimport bool as pbool from libcpp.vector cimport vector from libcpp.set cimport set as cset from libcpp.map cimport map as cmap from libcpp.utility cimport move as cmove from libcpp.pair cimport pair from cython.operator cimport dereference as deref from cpython.ref cimport PyObject from thrift.py3.exceptions cimport ( cTApplicationException, ApplicationError as __ApplicationError, cTApplicationExceptionType__UNKNOWN) from thrift.py3.server cimport ServiceInterface, RequestContext, Cpp2RequestContext from thrift.py3.server import RequestContext from folly cimport ( cFollyPromise, cFollyUnit, c_unit, ) from thrift.py3.common cimport ( cThriftServiceMetadataResponse as __fbthrift_cThriftServiceMetadataResponse, ServiceMetadata, MetadataBox as __MetadataBox, ) from thrift.py3.server cimport THRIFT_REQUEST_CONTEXT as __THRIFT_REQUEST_CONTEXT from thrift.py3.types cimport make_unique cimport folly.futures from folly.executor cimport get_executor cimport folly.iobuf as _fbthrift_iobuf import folly.iobuf as _fbthrift_iobuf from folly.iobuf cimport move as move_iobuf from folly.memory cimport to_shared_ptr as __to_shared_ptr cimport module.types as _module_types import module.types as _module_types import includes.types as _includes_types cimport includes.types as _includes_types cimport module.services_reflection as _services_reflection import asyncio import functools import sys import traceback import types as _py_types from module.services_wrapper cimport cEmptyServiceInterface from module.services_wrapper cimport cReturnServiceInterface from module.services_wrapper cimport cParamServiceInterface @cython.auto_pickle(False) cdef class Promise__module_types_cComplexUnion: cdef cFollyPromise[unique_ptr[_module_types.cComplexUnion]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[_module_types.cComplexUnion]](cFollyPromise[unique_ptr[_module_types.cComplexUnion]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[_module_types.cComplexUnion]] cPromise): cdef Promise__module_types_cComplexUnion inst = Promise__module_types_cComplexUnion.__new__(Promise__module_types_cComplexUnion) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector___module_types_cComplexUnion: cdef cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]](cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]] cPromise): cdef Promise_vector___module_types_cComplexUnion inst = Promise_vector___module_types_cComplexUnion.__new__(Promise_vector___module_types_cComplexUnion) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct: cdef cFollyPromise[unique_ptr[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]]](cFollyPromise[unique_ptr[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]]] cPromise): cdef Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct inst = Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct.__new__(Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct: cdef cFollyPromise[unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]](cFollyPromise[unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]] cPromise): cdef Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct inst = Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct.__new__(Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector___module_types_cMyEnumA: cdef cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]](cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]] cPromise): cdef Promise_vector___module_types_cMyEnumA inst = Promise_vector___module_types_cMyEnumA.__new__(Promise_vector___module_types_cMyEnumA) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector__cbool: cdef cFollyPromise[unique_ptr[vector[cbool]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[cbool]]](cFollyPromise[unique_ptr[vector[cbool]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[cbool]]] cPromise): cdef Promise_vector__cbool inst = Promise_vector__cbool.__new__(Promise_vector__cbool) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_vector__cint32_t: cdef cFollyPromise[unique_ptr[vector[cint32_t]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[vector[cint32_t]]](cFollyPromise[unique_ptr[vector[cint32_t]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[vector[cint32_t]]] cPromise): cdef Promise_vector__cint32_t inst = Promise_vector__cint32_t.__new__(Promise_vector__cint32_t) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string: cdef cFollyPromise[unique_ptr[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]]](cFollyPromise[unique_ptr[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]]] cPromise): cdef Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string inst = Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string.__new__(Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cmap__string_cint64_t: cdef cFollyPromise[unique_ptr[cmap[string,cint64_t]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[cmap[string,cint64_t]]](cFollyPromise[unique_ptr[cmap[string,cint64_t]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[cmap[string,cint64_t]]] cPromise): cdef Promise_cmap__string_cint64_t inst = Promise_cmap__string_cint64_t.__new__(Promise_cmap__string_cint64_t) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise__module_types_cMyEnumA: cdef cFollyPromise[_module_types.cMyEnumA]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[_module_types.cMyEnumA](cFollyPromise[_module_types.cMyEnumA].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[_module_types.cMyEnumA] cPromise): cdef Promise__module_types_cMyEnumA inst = Promise__module_types_cMyEnumA.__new__(Promise__module_types_cMyEnumA) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise__module_types_cMyStruct: cdef cFollyPromise[unique_ptr[_module_types.cMyStruct]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[_module_types.cMyStruct]](cFollyPromise[unique_ptr[_module_types.cMyStruct]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[_module_types.cMyStruct]] cPromise): cdef Promise__module_types_cMyStruct inst = Promise__module_types_cMyStruct.__new__(Promise__module_types_cMyStruct) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cset___module_types_cMyStruct: cdef cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]](cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]] cPromise): cdef Promise_cset___module_types_cMyStruct inst = Promise_cset___module_types_cMyStruct.__new__(Promise_cset___module_types_cMyStruct) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_binary: cdef cFollyPromise[unique_ptr[string]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[string]](cFollyPromise[unique_ptr[string]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[string]] cPromise): cdef Promise_binary inst = Promise_binary.__new__(Promise_binary) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cbool: cdef cFollyPromise[cbool]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[cbool](cFollyPromise[cbool].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[cbool] cPromise): cdef Promise_cbool inst = Promise_cbool.__new__(Promise_cbool) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_double: cdef cFollyPromise[double]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[double](cFollyPromise[double].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[double] cPromise): cdef Promise_double inst = Promise_double.__new__(Promise_double) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_float: cdef cFollyPromise[float]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[float](cFollyPromise[float].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[float] cPromise): cdef Promise_float inst = Promise_float.__new__(Promise_float) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise___iobuf_cIOBuf: cdef cFollyPromise[unique_ptr[_fbthrift_iobuf.cIOBuf]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[_fbthrift_iobuf.cIOBuf]](cFollyPromise[unique_ptr[_fbthrift_iobuf.cIOBuf]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[_fbthrift_iobuf.cIOBuf]] cPromise): cdef Promise___iobuf_cIOBuf inst = Promise___iobuf_cIOBuf.__new__(Promise___iobuf_cIOBuf) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cint16_t: cdef cFollyPromise[cint16_t]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[cint16_t](cFollyPromise[cint16_t].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[cint16_t] cPromise): cdef Promise_cint16_t inst = Promise_cint16_t.__new__(Promise_cint16_t) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cint32_t: cdef cFollyPromise[cint32_t]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[cint32_t](cFollyPromise[cint32_t].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[cint32_t] cPromise): cdef Promise_cint32_t inst = Promise_cint32_t.__new__(Promise_cint32_t) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cint64_t: cdef cFollyPromise[cint64_t]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[cint64_t](cFollyPromise[cint64_t].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[cint64_t] cPromise): cdef Promise_cint64_t inst = Promise_cint64_t.__new__(Promise_cint64_t) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_unique_ptr__iobuf_cIOBuf: cdef cFollyPromise[unique_ptr[unique_ptr[_fbthrift_iobuf.cIOBuf]]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[unique_ptr[_fbthrift_iobuf.cIOBuf]]](cFollyPromise[unique_ptr[unique_ptr[_fbthrift_iobuf.cIOBuf]]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[unique_ptr[_fbthrift_iobuf.cIOBuf]]] cPromise): cdef Promise_unique_ptr__iobuf_cIOBuf inst = Promise_unique_ptr__iobuf_cIOBuf.__new__(Promise_unique_ptr__iobuf_cIOBuf) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_string: cdef cFollyPromise[unique_ptr[string]]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[unique_ptr[string]](cFollyPromise[unique_ptr[string]].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[unique_ptr[string]] cPromise): cdef Promise_string inst = Promise_string.__new__(Promise_string) inst.cPromise[0] = cmove(cPromise) return inst @cython.auto_pickle(False) cdef class Promise_cFollyUnit: cdef cFollyPromise[cFollyUnit]* cPromise def __cinit__(self): self.cPromise = new cFollyPromise[cFollyUnit](cFollyPromise[cFollyUnit].makeEmpty()) def __dealloc__(self): del self.cPromise @staticmethod cdef _fbthrift_create(cFollyPromise[cFollyUnit] cPromise): cdef Promise_cFollyUnit inst = Promise_cFollyUnit.__new__(Promise_cFollyUnit) inst.cPromise[0] = cmove(cPromise) return inst cdef object _EmptyService_annotations = _py_types.MappingProxyType({ }) @cython.auto_pickle(False) cdef class EmptyServiceInterface( ServiceInterface ): annotations = _EmptyService_annotations def __cinit__(self): self._cpp_obj = cEmptyServiceInterface( self, get_executor() ) @classmethod def __get_reflection__(cls): return _services_reflection.get_reflection__EmptyService(for_clients=False) @staticmethod def __get_metadata__(): cdef __fbthrift_cThriftServiceMetadataResponse response ServiceMetadata[_services_reflection.cEmptyServiceSvIf].gen(response) return __MetadataBox.box(cmove(deref(response.metadata_ref()))) @staticmethod def __get_thrift_name__(): return "module.EmptyService" cdef object _ReturnService_annotations = _py_types.MappingProxyType({ }) @cython.auto_pickle(False) cdef class ReturnServiceInterface( ServiceInterface ): annotations = _ReturnService_annotations def __cinit__(self): self._cpp_obj = cReturnServiceInterface( self, get_executor() ) async def noReturn( self): raise NotImplementedError("async def noReturn is not implemented") async def boolReturn( self): raise NotImplementedError("async def boolReturn is not implemented") async def i16Return( self): raise NotImplementedError("async def i16Return is not implemented") async def i32Return( self): raise NotImplementedError("async def i32Return is not implemented") async def i64Return( self): raise NotImplementedError("async def i64Return is not implemented") async def floatReturn( self): raise NotImplementedError("async def floatReturn is not implemented") async def doubleReturn( self): raise NotImplementedError("async def doubleReturn is not implemented") async def stringReturn( self): raise NotImplementedError("async def stringReturn is not implemented") async def binaryReturn( self): raise NotImplementedError("async def binaryReturn is not implemented") async def mapReturn( self): raise NotImplementedError("async def mapReturn is not implemented") async def simpleTypedefReturn( self): raise NotImplementedError("async def simpleTypedefReturn is not implemented") async def complexTypedefReturn( self): raise NotImplementedError("async def complexTypedefReturn is not implemented") async def list_mostComplexTypedefReturn( self): raise NotImplementedError("async def list_mostComplexTypedefReturn is not implemented") async def enumReturn( self): raise NotImplementedError("async def enumReturn is not implemented") async def list_EnumReturn( self): raise NotImplementedError("async def list_EnumReturn is not implemented") async def structReturn( self): raise NotImplementedError("async def structReturn is not implemented") async def set_StructReturn( self): raise NotImplementedError("async def set_StructReturn is not implemented") async def unionReturn( self): raise NotImplementedError("async def unionReturn is not implemented") async def list_UnionReturn( self): raise NotImplementedError("async def list_UnionReturn is not implemented") async def readDataEb( self, size): raise NotImplementedError("async def readDataEb is not implemented") async def readData( self, size): raise NotImplementedError("async def readData is not implemented") @classmethod def __get_reflection__(cls): return _services_reflection.get_reflection__ReturnService(for_clients=False) @staticmethod def __get_metadata__(): cdef __fbthrift_cThriftServiceMetadataResponse response ServiceMetadata[_services_reflection.cReturnServiceSvIf].gen(response) return __MetadataBox.box(cmove(deref(response.metadata_ref()))) @staticmethod def __get_thrift_name__(): return "module.ReturnService" cdef object _ParamService_annotations = _py_types.MappingProxyType({ }) @cython.auto_pickle(False) cdef class ParamServiceInterface( ServiceInterface ): annotations = _ParamService_annotations def __cinit__(self): self._cpp_obj = cParamServiceInterface( self, get_executor() ) async def void_ret_i16_param( self, param1): raise NotImplementedError("async def void_ret_i16_param is not implemented") async def void_ret_byte_i16_param( self, param1, param2): raise NotImplementedError("async def void_ret_byte_i16_param is not implemented") async def void_ret_map_param( self, param1): raise NotImplementedError("async def void_ret_map_param is not implemented") async def void_ret_map_setlist_param( self, param1, param2): raise NotImplementedError("async def void_ret_map_setlist_param is not implemented") async def void_ret_map_typedef_param( self, param1): raise NotImplementedError("async def void_ret_map_typedef_param is not implemented") async def void_ret_enum_param( self, param1): raise NotImplementedError("async def void_ret_enum_param is not implemented") async def void_ret_struct_param( self, param1): raise NotImplementedError("async def void_ret_struct_param is not implemented") async def void_ret_listunion_param( self, param1): raise NotImplementedError("async def void_ret_listunion_param is not implemented") async def bool_ret_i32_i64_param( self, param1, param2): raise NotImplementedError("async def bool_ret_i32_i64_param is not implemented") async def bool_ret_map_param( self, param1): raise NotImplementedError("async def bool_ret_map_param is not implemented") async def bool_ret_union_param( self, param1): raise NotImplementedError("async def bool_ret_union_param is not implemented") async def i64_ret_float_double_param( self, param1, param2): raise NotImplementedError("async def i64_ret_float_double_param is not implemented") async def i64_ret_string_typedef_param( self, param1, param2): raise NotImplementedError("async def i64_ret_string_typedef_param is not implemented") async def i64_ret_i32_i32_i32_i32_i32_param( self, param1, param2, param3, param4, param5): raise NotImplementedError("async def i64_ret_i32_i32_i32_i32_i32_param is not implemented") async def double_ret_setstruct_param( self, param1): raise NotImplementedError("async def double_ret_setstruct_param is not implemented") async def string_ret_string_param( self, param1): raise NotImplementedError("async def string_ret_string_param is not implemented") async def binary_ret_binary_param( self, param1): raise NotImplementedError("async def binary_ret_binary_param is not implemented") async def map_ret_bool_param( self, param1): raise NotImplementedError("async def map_ret_bool_param is not implemented") async def list_ret_map_setlist_param( self, param1, param2): raise NotImplementedError("async def list_ret_map_setlist_param is not implemented") async def mapsetlistmapliststring_ret_listlistlist_param( self, param1): raise NotImplementedError("async def mapsetlistmapliststring_ret_listlistlist_param is not implemented") async def typedef_ret_i32_param( self, param1): raise NotImplementedError("async def typedef_ret_i32_param is not implemented") async def listtypedef_ret_typedef_param( self, param1): raise NotImplementedError("async def listtypedef_ret_typedef_param is not implemented") async def enum_ret_double_param( self, param1): raise NotImplementedError("async def enum_ret_double_param is not implemented") async def enum_ret_double_enum_param( self, param1, param2): raise NotImplementedError("async def enum_ret_double_enum_param is not implemented") async def listenum_ret_map_param( self, param1): raise NotImplementedError("async def listenum_ret_map_param is not implemented") async def struct_ret_i16_param( self, param1): raise NotImplementedError("async def struct_ret_i16_param is not implemented") async def setstruct_ret_set_param( self, param1): raise NotImplementedError("async def setstruct_ret_set_param is not implemented") async def union_ret_i32_i32_param( self, param1, param2): raise NotImplementedError("async def union_ret_i32_i32_param is not implemented") async def listunion_string_param( self, param1): raise NotImplementedError("async def listunion_string_param is not implemented") @classmethod def __get_reflection__(cls): return _services_reflection.get_reflection__ParamService(for_clients=False) @staticmethod def __get_metadata__(): cdef __fbthrift_cThriftServiceMetadataResponse response ServiceMetadata[_services_reflection.cParamServiceSvIf].gen(response) return __MetadataBox.box(cmove(deref(response.metadata_ref()))) @staticmethod def __get_thrift_name__(): return "module.ParamService" cdef api void call_cy_EmptyService_onStartServing( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( EmptyService_onStartServing_coro( self, __promise ) ) cdef api void call_cy_EmptyService_onStopRequested( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( EmptyService_onStopRequested_coro( self, __promise ) ) async def EmptyService_onStartServing_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStartServing() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler EmptyService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler EmptyService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def EmptyService_onStopRequested_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStopRequested() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler EmptyService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler EmptyService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) cdef api void call_cy_ReturnService_noReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_noReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_boolReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[cbool] cPromise ) noexcept: cdef Promise_cbool __promise = Promise_cbool._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_boolReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_i16Return( object self, Cpp2RequestContext* ctx, cFollyPromise[cint16_t] cPromise ) noexcept: cdef Promise_cint16_t __promise = Promise_cint16_t._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_i16Return_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_i32Return( object self, Cpp2RequestContext* ctx, cFollyPromise[cint32_t] cPromise ) noexcept: cdef Promise_cint32_t __promise = Promise_cint32_t._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_i32Return_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_i64Return( object self, Cpp2RequestContext* ctx, cFollyPromise[cint64_t] cPromise ) noexcept: cdef Promise_cint64_t __promise = Promise_cint64_t._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_i64Return_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_floatReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[float] cPromise ) noexcept: cdef Promise_float __promise = Promise_float._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_floatReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_doubleReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[double] cPromise ) noexcept: cdef Promise_double __promise = Promise_double._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_doubleReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_stringReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[string]] cPromise ) noexcept: cdef Promise_string __promise = Promise_string._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_stringReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_binaryReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[string]] cPromise ) noexcept: cdef Promise_binary __promise = Promise_binary._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_binaryReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_mapReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[cmap[string,cint64_t]]] cPromise ) noexcept: cdef Promise_cmap__string_cint64_t __promise = Promise_cmap__string_cint64_t._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_mapReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_simpleTypedefReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[cint32_t] cPromise ) noexcept: cdef Promise_cint32_t __promise = Promise_cint32_t._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_simpleTypedefReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_complexTypedefReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]] cPromise ) noexcept: cdef Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct __promise = Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_complexTypedefReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_list_mostComplexTypedefReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]]] cPromise ) noexcept: cdef Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct __promise = Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_list_mostComplexTypedefReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_enumReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[_module_types.cMyEnumA] cPromise ) noexcept: cdef Promise__module_types_cMyEnumA __promise = Promise__module_types_cMyEnumA._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_enumReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_list_EnumReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]] cPromise ) noexcept: cdef Promise_vector___module_types_cMyEnumA __promise = Promise_vector___module_types_cMyEnumA._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_list_EnumReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_structReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[_module_types.cMyStruct]] cPromise ) noexcept: cdef Promise__module_types_cMyStruct __promise = Promise__module_types_cMyStruct._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_structReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_set_StructReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]] cPromise ) noexcept: cdef Promise_cset___module_types_cMyStruct __promise = Promise_cset___module_types_cMyStruct._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_set_StructReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_unionReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[_module_types.cComplexUnion]] cPromise ) noexcept: cdef Promise__module_types_cComplexUnion __promise = Promise__module_types_cComplexUnion._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_unionReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_list_UnionReturn( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]] cPromise ) noexcept: cdef Promise_vector___module_types_cComplexUnion __promise = Promise_vector___module_types_cComplexUnion._fbthrift_create(cmove(cPromise)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_list_UnionReturn_coro( self, __promise ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_readDataEb( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[_fbthrift_iobuf.cIOBuf]] cPromise, cint64_t size ) noexcept: cdef Promise___iobuf_cIOBuf __promise = Promise___iobuf_cIOBuf._fbthrift_create(cmove(cPromise)) arg_size = size __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_readDataEb_coro( self, __promise, arg_size ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_readData( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[unique_ptr[_fbthrift_iobuf.cIOBuf]]] cPromise, cint64_t size ) noexcept: cdef Promise_unique_ptr__iobuf_cIOBuf __promise = Promise_unique_ptr__iobuf_cIOBuf._fbthrift_create(cmove(cPromise)) arg_size = size __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ReturnService_readData_coro( self, __promise, arg_size ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ReturnService_onStartServing( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( ReturnService_onStartServing_coro( self, __promise ) ) cdef api void call_cy_ReturnService_onStopRequested( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( ReturnService_onStopRequested_coro( self, __promise ) ) async def ReturnService_noReturn_coro( object self, Promise_cFollyUnit promise ): try: result = await self.noReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.noReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.noReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ReturnService_boolReturn_coro( object self, Promise_cbool promise ): try: result = await self.boolReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.boolReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.boolReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_i16Return_coro( object self, Promise_cint16_t promise ): try: result = await self.i16Return() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.i16Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.i16Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_i32Return_coro( object self, Promise_cint32_t promise ): try: result = await self.i32Return() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.i32Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.i32Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_i64Return_coro( object self, Promise_cint64_t promise ): try: result = await self.i64Return() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.i64Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.i64Return:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_floatReturn_coro( object self, Promise_float promise ): try: result = await self.floatReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.floatReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.floatReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_doubleReturn_coro( object self, Promise_double promise ): try: result = await self.doubleReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.doubleReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.doubleReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_stringReturn_coro( object self, Promise_string promise ): try: result = await self.stringReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.stringReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.stringReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[string]( result.encode('UTF-8'))) async def ReturnService_binaryReturn_coro( object self, Promise_binary promise ): try: result = await self.binaryReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.binaryReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.binaryReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[string]( result)) async def ReturnService_mapReturn_coro( object self, Promise_cmap__string_cint64_t promise ): try: result = await self.mapReturn() result = _module_types.Map__string_i64(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.mapReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.mapReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[cmap[string,cint64_t]](deref((<_module_types.Map__string_i64?> result)._cpp_obj))) async def ReturnService_simpleTypedefReturn_coro( object self, Promise_cint32_t promise ): try: result = await self.simpleTypedefReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.simpleTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.simpleTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ReturnService_complexTypedefReturn_coro( object self, Promise_vector__cmap___module_types_cEmpty__module_types_cMyStruct promise ): try: result = await self.complexTypedefReturn() result = _module_types.List__Map__Empty_MyStruct(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.complexTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.complexTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]](deref((<_module_types.List__Map__Empty_MyStruct?> result)._cpp_obj))) async def ReturnService_list_mostComplexTypedefReturn_coro( object self, Promise_vector__vector__vector__cmap___module_types_cEmpty__module_types_cMyStruct promise ): try: result = await self.list_mostComplexTypedefReturn() result = _module_types.List__List__List__Map__Empty_MyStruct(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.list_mostComplexTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.list_mostComplexTypedefReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]](deref((<_module_types.List__List__List__Map__Empty_MyStruct?> result)._cpp_obj))) async def ReturnService_enumReturn_coro( object self, Promise__module_types_cMyEnumA promise ): try: result = await self.enumReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.enumReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.enumReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(<_module_types.cMyEnumA>result) async def ReturnService_list_EnumReturn_coro( object self, Promise_vector___module_types_cMyEnumA promise ): try: result = await self.list_EnumReturn() result = _module_types.List__MyEnumA(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.list_EnumReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.list_EnumReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[_module_types.cMyEnumA]](deref((<_module_types.List__MyEnumA?> result)._cpp_obj))) async def ReturnService_structReturn_coro( object self, Promise__module_types_cMyStruct promise ): try: result = await self.structReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.structReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.structReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[_module_types.cMyStruct](deref((<_module_types.MyStruct?> result)._cpp_obj))) async def ReturnService_set_StructReturn_coro( object self, Promise_cset___module_types_cMyStruct promise ): try: result = await self.set_StructReturn() result = _module_types.Set__MyStruct(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.set_StructReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.set_StructReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[cset[_module_types.cMyStruct]](deref((<_module_types.Set__MyStruct?> result)._cpp_obj))) async def ReturnService_unionReturn_coro( object self, Promise__module_types_cComplexUnion promise ): try: result = await self.unionReturn() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.unionReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.unionReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[_module_types.cComplexUnion](deref((<_module_types.ComplexUnion?> result)._cpp_obj))) async def ReturnService_list_UnionReturn_coro( object self, Promise_vector___module_types_cComplexUnion promise ): try: result = await self.list_UnionReturn() result = _module_types.List__ComplexUnion(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.list_UnionReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.list_UnionReturn:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[_module_types.cComplexUnion]](deref((<_module_types.List__ComplexUnion?> result)._cpp_obj))) async def ReturnService_readDataEb_coro( object self, Promise___iobuf_cIOBuf promise, size ): try: result = await self.readDataEb( size) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.readDataEb:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.readDataEb:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(((<_fbthrift_iobuf.IOBuf>result).c_clone())) async def ReturnService_readData_coro( object self, Promise_unique_ptr__iobuf_cIOBuf promise, size ): try: result = await self.readData( size) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.readData:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.readData:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[unique_ptr[_fbthrift_iobuf.cIOBuf]](((<_fbthrift_iobuf.IOBuf>result).c_clone()))) async def ReturnService_onStartServing_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStartServing() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ReturnService_onStopRequested_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStopRequested() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ReturnService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ReturnService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) cdef api void call_cy_ParamService_void_ret_i16_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, cint16_t param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_i16_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_byte_i16_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, cint8_t param1, cint16_t param2 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = param2 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_byte_i16_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_map_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, unique_ptr[cmap[string,cint64_t]] param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Map__string_i64._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_map_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_map_setlist_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, unique_ptr[cmap[string,cint64_t]] param1, unique_ptr[cset[vector[string]]] param2 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Map__string_i64._fbthrift_create(__to_shared_ptr(cmove(param1))) arg_param2 = _module_types.Set__List__string._fbthrift_create(__to_shared_ptr(cmove(param2))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_map_setlist_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_map_typedef_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, cint32_t param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_map_typedef_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_enum_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, _module_types.cMyEnumA param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.MyEnumA( param1) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_enum_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_struct_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, unique_ptr[_module_types.cMyStruct] param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.MyStruct._fbthrift_create(shared_ptr[_module_types.cMyStruct](param1.release())) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_struct_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_void_ret_listunion_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cFollyUnit] cPromise, unique_ptr[vector[_module_types.cComplexUnion]] param1 ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.List__ComplexUnion._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_void_ret_listunion_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_bool_ret_i32_i64_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cbool] cPromise, cint32_t param1, cint64_t param2 ) noexcept: cdef Promise_cbool __promise = Promise_cbool._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = param2 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_bool_ret_i32_i64_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_bool_ret_map_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cbool] cPromise, unique_ptr[cmap[string,cint64_t]] param1 ) noexcept: cdef Promise_cbool __promise = Promise_cbool._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Map__string_i64._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_bool_ret_map_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_bool_ret_union_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cbool] cPromise, unique_ptr[_module_types.cComplexUnion] param1 ) noexcept: cdef Promise_cbool __promise = Promise_cbool._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.ComplexUnion._fbthrift_create(shared_ptr[_module_types.cComplexUnion](param1.release())) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_bool_ret_union_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_i64_ret_float_double_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cint64_t] cPromise, float param1, double param2 ) noexcept: cdef Promise_cint64_t __promise = Promise_cint64_t._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = param2 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_i64_ret_float_double_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_i64_ret_string_typedef_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cint64_t] cPromise, unique_ptr[string] param1, unique_ptr[cset[vector[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]]]] param2 ) noexcept: cdef Promise_cint64_t __promise = Promise_cint64_t._fbthrift_create(cmove(cPromise)) arg_param1 = (deref(param1)).data().decode('UTF-8') arg_param2 = _module_types.Set__List__List__Map__Empty_MyStruct._fbthrift_create(__to_shared_ptr(cmove(param2))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_i64_ret_string_typedef_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_i64_ret_i32_i32_i32_i32_i32_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cint64_t] cPromise, cint32_t param1, cint32_t param2, cint32_t param3, cint32_t param4, cint32_t param5 ) noexcept: cdef Promise_cint64_t __promise = Promise_cint64_t._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = param2 arg_param3 = param3 arg_param4 = param4 arg_param5 = param5 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_i64_ret_i32_i32_i32_i32_i32_param_coro( self, __promise, arg_param1, arg_param2, arg_param3, arg_param4, arg_param5 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_double_ret_setstruct_param( object self, Cpp2RequestContext* ctx, cFollyPromise[double] cPromise, unique_ptr[cset[_module_types.cMyStruct]] param1 ) noexcept: cdef Promise_double __promise = Promise_double._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Set__MyStruct._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_double_ret_setstruct_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_string_ret_string_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[string]] cPromise, unique_ptr[string] param1 ) noexcept: cdef Promise_string __promise = Promise_string._fbthrift_create(cmove(cPromise)) arg_param1 = (deref(param1)).data().decode('UTF-8') __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_string_ret_string_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_binary_ret_binary_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[string]] cPromise, unique_ptr[string] param1 ) noexcept: cdef Promise_binary __promise = Promise_binary._fbthrift_create(cmove(cPromise)) arg_param1 = (deref(param1)) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_binary_ret_binary_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_map_ret_bool_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[cmap[string,cint64_t]]] cPromise, cbool param1 ) noexcept: cdef Promise_cmap__string_cint64_t __promise = Promise_cmap__string_cint64_t._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_map_ret_bool_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_list_ret_map_setlist_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[cbool]]] cPromise, unique_ptr[cmap[cint32_t,vector[string]]] param1, unique_ptr[vector[string]] param2 ) noexcept: cdef Promise_vector__cbool __promise = Promise_vector__cbool._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Map__i32_List__string._fbthrift_create(__to_shared_ptr(cmove(param1))) arg_param2 = _module_types.List__string._fbthrift_create(__to_shared_ptr(cmove(param2))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_list_ret_map_setlist_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_mapsetlistmapliststring_ret_listlistlist_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]]] cPromise, unique_ptr[vector[vector[vector[vector[cint32_t]]]]] param1 ) noexcept: cdef Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string __promise = Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.List__List__List__List__i32._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_mapsetlistmapliststring_ret_listlistlist_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_typedef_ret_i32_param( object self, Cpp2RequestContext* ctx, cFollyPromise[cint32_t] cPromise, cint32_t param1 ) noexcept: cdef Promise_cint32_t __promise = Promise_cint32_t._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_typedef_ret_i32_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_listtypedef_ret_typedef_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[cint32_t]]] cPromise, unique_ptr[vector[cmap[_module_types.cEmpty,_module_types.cMyStruct]]] param1 ) noexcept: cdef Promise_vector__cint32_t __promise = Promise_vector__cint32_t._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.List__Map__Empty_MyStruct._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_listtypedef_ret_typedef_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_enum_ret_double_param( object self, Cpp2RequestContext* ctx, cFollyPromise[_module_types.cMyEnumA] cPromise, double param1 ) noexcept: cdef Promise__module_types_cMyEnumA __promise = Promise__module_types_cMyEnumA._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_enum_ret_double_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_enum_ret_double_enum_param( object self, Cpp2RequestContext* ctx, cFollyPromise[_module_types.cMyEnumA] cPromise, double param1, _module_types.cMyEnumA param2 ) noexcept: cdef Promise__module_types_cMyEnumA __promise = Promise__module_types_cMyEnumA._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = _module_types.MyEnumA( param2) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_enum_ret_double_enum_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_listenum_ret_map_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[_module_types.cMyEnumA]]] cPromise, unique_ptr[cmap[string,cint64_t]] param1 ) noexcept: cdef Promise_vector___module_types_cMyEnumA __promise = Promise_vector___module_types_cMyEnumA._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Map__string_i64._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_listenum_ret_map_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_struct_ret_i16_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[_module_types.cMyStruct]] cPromise, cint16_t param1 ) noexcept: cdef Promise__module_types_cMyStruct __promise = Promise__module_types_cMyStruct._fbthrift_create(cmove(cPromise)) arg_param1 = param1 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_struct_ret_i16_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_setstruct_ret_set_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[cset[_module_types.cMyStruct]]] cPromise, unique_ptr[cset[string]] param1 ) noexcept: cdef Promise_cset___module_types_cMyStruct __promise = Promise_cset___module_types_cMyStruct._fbthrift_create(cmove(cPromise)) arg_param1 = _module_types.Set__string._fbthrift_create(__to_shared_ptr(cmove(param1))) __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_setstruct_ret_set_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_union_ret_i32_i32_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[_module_types.cComplexUnion]] cPromise, cint32_t param1, cint32_t param2 ) noexcept: cdef Promise__module_types_cComplexUnion __promise = Promise__module_types_cComplexUnion._fbthrift_create(cmove(cPromise)) arg_param1 = param1 arg_param2 = param2 __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_union_ret_i32_i32_param_coro( self, __promise, arg_param1, arg_param2 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_listunion_string_param( object self, Cpp2RequestContext* ctx, cFollyPromise[unique_ptr[vector[_module_types.cComplexUnion]]] cPromise, unique_ptr[string] param1 ) noexcept: cdef Promise_vector___module_types_cComplexUnion __promise = Promise_vector___module_types_cComplexUnion._fbthrift_create(cmove(cPromise)) arg_param1 = (deref(param1)).data().decode('UTF-8') __context = RequestContext._fbthrift_create(ctx) __context_token = __THRIFT_REQUEST_CONTEXT.set(__context) asyncio.get_event_loop().create_task( ParamService_listunion_string_param_coro( self, __promise, arg_param1 ) ) __THRIFT_REQUEST_CONTEXT.reset(__context_token) cdef api void call_cy_ParamService_onStartServing( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( ParamService_onStartServing_coro( self, __promise ) ) cdef api void call_cy_ParamService_onStopRequested( object self, cFollyPromise[cFollyUnit] cPromise ) noexcept: cdef Promise_cFollyUnit __promise = Promise_cFollyUnit._fbthrift_create(cmove(cPromise)) asyncio.get_event_loop().create_task( ParamService_onStopRequested_coro( self, __promise ) ) async def ParamService_void_ret_i16_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_i16_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_byte_i16_param_coro( object self, Promise_cFollyUnit promise, param1, param2 ): try: result = await self.void_ret_byte_i16_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_byte_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_byte_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_map_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_map_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_map_setlist_param_coro( object self, Promise_cFollyUnit promise, param1, param2 ): try: result = await self.void_ret_map_setlist_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_map_setlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_map_setlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_map_typedef_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_map_typedef_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_map_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_map_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_enum_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_enum_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_enum_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_enum_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_struct_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_struct_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_struct_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_struct_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_void_ret_listunion_param_coro( object self, Promise_cFollyUnit promise, param1 ): try: result = await self.void_ret_listunion_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.void_ret_listunion_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.void_ret_listunion_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_bool_ret_i32_i64_param_coro( object self, Promise_cbool promise, param1, param2 ): try: result = await self.bool_ret_i32_i64_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.bool_ret_i32_i64_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.bool_ret_i32_i64_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_bool_ret_map_param_coro( object self, Promise_cbool promise, param1 ): try: result = await self.bool_ret_map_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.bool_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.bool_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_bool_ret_union_param_coro( object self, Promise_cbool promise, param1 ): try: result = await self.bool_ret_union_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.bool_ret_union_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.bool_ret_union_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_i64_ret_float_double_param_coro( object self, Promise_cint64_t promise, param1, param2 ): try: result = await self.i64_ret_float_double_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.i64_ret_float_double_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.i64_ret_float_double_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_i64_ret_string_typedef_param_coro( object self, Promise_cint64_t promise, param1, param2 ): try: result = await self.i64_ret_string_typedef_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.i64_ret_string_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.i64_ret_string_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_i64_ret_i32_i32_i32_i32_i32_param_coro( object self, Promise_cint64_t promise, param1, param2, param3, param4, param5 ): try: result = await self.i64_ret_i32_i32_i32_i32_i32_param( param1, param2, param3, param4, param5) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.i64_ret_i32_i32_i32_i32_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.i64_ret_i32_i32_i32_i32_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_double_ret_setstruct_param_coro( object self, Promise_double promise, param1 ): try: result = await self.double_ret_setstruct_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.double_ret_setstruct_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.double_ret_setstruct_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_string_ret_string_param_coro( object self, Promise_string promise, param1 ): try: result = await self.string_ret_string_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.string_ret_string_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.string_ret_string_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[string]( result.encode('UTF-8'))) async def ParamService_binary_ret_binary_param_coro( object self, Promise_binary promise, param1 ): try: result = await self.binary_ret_binary_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.binary_ret_binary_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.binary_ret_binary_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[string]( result)) async def ParamService_map_ret_bool_param_coro( object self, Promise_cmap__string_cint64_t promise, param1 ): try: result = await self.map_ret_bool_param( param1) result = _module_types.Map__string_i64(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.map_ret_bool_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.map_ret_bool_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[cmap[string,cint64_t]](deref((<_module_types.Map__string_i64?> result)._cpp_obj))) async def ParamService_list_ret_map_setlist_param_coro( object self, Promise_vector__cbool promise, param1, param2 ): try: result = await self.list_ret_map_setlist_param( param1, param2) result = _module_types.List__bool(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.list_ret_map_setlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.list_ret_map_setlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[cbool]](deref((<_module_types.List__bool?> result)._cpp_obj))) async def ParamService_mapsetlistmapliststring_ret_listlistlist_param_coro( object self, Promise_cmap__cset__vector__cint32_t_cmap__vector__cset__string_string promise, param1 ): try: result = await self.mapsetlistmapliststring_ret_listlistlist_param( param1) result = _module_types.Map__Set__List__i32_Map__List__Set__string_string(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.mapsetlistmapliststring_ret_listlistlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.mapsetlistmapliststring_ret_listlistlist_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[cmap[cset[vector[cint32_t]],cmap[vector[cset[string]],string]]](deref((<_module_types.Map__Set__List__i32_Map__List__Set__string_string?> result)._cpp_obj))) async def ParamService_typedef_ret_i32_param_coro( object self, Promise_cint32_t promise, param1 ): try: result = await self.typedef_ret_i32_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.typedef_ret_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.typedef_ret_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue( result) async def ParamService_listtypedef_ret_typedef_param_coro( object self, Promise_vector__cint32_t promise, param1 ): try: result = await self.listtypedef_ret_typedef_param( param1) result = _module_types.List__i32(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.listtypedef_ret_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.listtypedef_ret_typedef_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[cint32_t]](deref((<_module_types.List__i32?> result)._cpp_obj))) async def ParamService_enum_ret_double_param_coro( object self, Promise__module_types_cMyEnumA promise, param1 ): try: result = await self.enum_ret_double_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.enum_ret_double_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.enum_ret_double_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(<_module_types.cMyEnumA>result) async def ParamService_enum_ret_double_enum_param_coro( object self, Promise__module_types_cMyEnumA promise, param1, param2 ): try: result = await self.enum_ret_double_enum_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.enum_ret_double_enum_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.enum_ret_double_enum_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(<_module_types.cMyEnumA>result) async def ParamService_listenum_ret_map_param_coro( object self, Promise_vector___module_types_cMyEnumA promise, param1 ): try: result = await self.listenum_ret_map_param( param1) result = _module_types.List__MyEnumA(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.listenum_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.listenum_ret_map_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[_module_types.cMyEnumA]](deref((<_module_types.List__MyEnumA?> result)._cpp_obj))) async def ParamService_struct_ret_i16_param_coro( object self, Promise__module_types_cMyStruct promise, param1 ): try: result = await self.struct_ret_i16_param( param1) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.struct_ret_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.struct_ret_i16_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[_module_types.cMyStruct](deref((<_module_types.MyStruct?> result)._cpp_obj))) async def ParamService_setstruct_ret_set_param_coro( object self, Promise_cset___module_types_cMyStruct promise, param1 ): try: result = await self.setstruct_ret_set_param( param1) result = _module_types.Set__MyStruct(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.setstruct_ret_set_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.setstruct_ret_set_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[cset[_module_types.cMyStruct]](deref((<_module_types.Set__MyStruct?> result)._cpp_obj))) async def ParamService_union_ret_i32_i32_param_coro( object self, Promise__module_types_cComplexUnion promise, param1, param2 ): try: result = await self.union_ret_i32_i32_param( param1, param2) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.union_ret_i32_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.union_ret_i32_i32_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[_module_types.cComplexUnion](deref((<_module_types.ComplexUnion?> result)._cpp_obj))) async def ParamService_listunion_string_param_coro( object self, Promise_vector___module_types_cComplexUnion promise, param1 ): try: result = await self.listunion_string_param( param1) result = _module_types.List__ComplexUnion(result) except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.listunion_string_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.listunion_string_param:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(make_unique[vector[_module_types.cComplexUnion]](deref((<_module_types.List__ComplexUnion?> result)._cpp_obj))) async def ParamService_onStartServing_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStartServing() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.onStartServing:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit) async def ParamService_onStopRequested_coro( object self, Promise_cFollyUnit promise ): try: result = await self.onStopRequested() except __ApplicationError as ex: # If the handler raised an ApplicationError convert it to a C++ one promise.cPromise.setException(cTApplicationException( ex.type.value, ex.message.encode('UTF-8') )) except Exception as ex: print( "Unexpected error in service handler ParamService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, repr(ex).encode('UTF-8') )) except asyncio.CancelledError as ex: print("Coroutine was cancelled in service handler ParamService.onStopRequested:", file=sys.stderr) traceback.print_exc() promise.cPromise.setException(cTApplicationException( cTApplicationExceptionType__UNKNOWN, (f'Application was cancelled on the server with message: {str(ex)}').encode('UTF-8') )) else: promise.cPromise.setValue(c_unit)