async def responseandstreamboththrows( self, foo: int ) -> _typing.Tuple[int, _typing.AsyncGenerator[int, None]]: _fbthrift_resp = await self._send_request( "PubSubStreamingService", "responseandstreamboththrows", module.thrift_types. _fbthrift_PubSubStreamingService_responseandstreamboththrows_args( foo=foo, ), (module.thrift_types. _fbthrift_PubSubStreamingService_responseandstreamboththrows_result, module.thrift_types. _fbthrift_PubSubStreamingService_responseandstreamboththrows_result_stream ), ) _fbthrift_resp, _fbthrift_stream = _fbthrift_resp if _fbthrift_resp.success is not None: return _fbthrift_resp.success, _fbthrift_stream if _fbthrift_resp.e is not None: raise _fbthrift_resp.e raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType. MISSING_RESULT, "Empty Response", )
async def get200(self) -> str: _fbthrift_resp = await self._send_request( "Raiser", "get200", module.thrift_types._fbthrift_Raiser_get200_args(), module.thrift_types._fbthrift_Raiser_get200_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType. MISSING_RESULT, "Empty Response", )
def invalid_return_for_hack( self ) -> _typing.AbstractSet[float]: _fbthrift_resp = self._send_request( "MyService", "invalid_return_for_hack", test.fixtures.basic.module.thrift_types._fbthrift_MyService_invalid_return_for_hack_args(), test.fixtures.basic.module.thrift_types._fbthrift_MyService_invalid_return_for_hack_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType.MISSING_RESULT, "Empty Response", )
def getRandomData( self ) -> str: _fbthrift_resp = self._send_request( "MyService", "getRandomData", test.fixtures.basic.module.thrift_types._fbthrift_MyService_getRandomData_args(), test.fixtures.basic.module.thrift_types._fbthrift_MyService_getRandomData_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType.MISSING_RESULT, "Empty Response", )
def init(self, int1: int) -> int: _fbthrift_resp = self._send_request( "TestService", "init", test.namespace_from_package_without_module_name.module. thrift_types._fbthrift_TestService_init_args(int1=int1, ), test.namespace_from_package_without_module_name.module. thrift_types._fbthrift_TestService_init_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType. MISSING_RESULT, "Empty Response", )
async def init(self, int1: int) -> int: _fbthrift_resp = await self._send_request( "HsTestService", "init", python_module_root.my.namespacing.test.hsmodule.thrift_types. _fbthrift_HsTestService_init_args(int1=int1, ), python_module_root.my.namespacing.test.hsmodule.thrift_types. _fbthrift_HsTestService_init_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType. MISSING_RESULT, "Empty Response", )
async def simple_rpc( self, int_parameter: int ) -> test.fixtures.basic.module.thrift_types.ReservedKeyword: _fbthrift_resp = await self._send_request( "FB303Service", "simple_rpc", test.fixtures.basic.module.thrift_types._fbthrift_FB303Service_simple_rpc_args( int_parameter=int_parameter,), test.fixtures.basic.module.thrift_types._fbthrift_FB303Service_simple_rpc_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType.MISSING_RESULT, "Empty Response", )
def getDataByKey1( self, key: str ) -> bytes: _fbthrift_resp = self._send_request( "DbMixedStackArguments", "getDataByKey1", test.fixtures.basic.module.thrift_types._fbthrift_DbMixedStackArguments_getDataByKey1_args( key=key,), test.fixtures.basic.module.thrift_types._fbthrift_DbMixedStackArguments_getDataByKey1_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType.MISSING_RESULT, "Empty Response", )
def hasDataById( self, id: int ) -> bool: _fbthrift_resp = self._send_request( "MyService", "hasDataById", test.fixtures.basic.module.thrift_types._fbthrift_MyService_hasDataById_args( id=id,), test.fixtures.basic.module.thrift_types._fbthrift_MyService_hasDataById_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType.MISSING_RESULT, "Empty Response", )
def check( self, struct1: python_module_root.my.namespacing.test.hsmodule. thrift_types.HsFoo ) -> bool: _fbthrift_resp = self._send_request( "ExtendTestService", "check", python_module_root.my.namespacing.extend.test.extend. thrift_types._fbthrift_ExtendTestService_check_args( struct1=struct1, ), python_module_root.my.namespacing.extend.test.extend. thrift_types._fbthrift_ExtendTestService_check_result, ) # shortcut to success path for non-void returns if _fbthrift_resp.success is not None: return _fbthrift_resp.success raise _fbthrift_python_exceptions.ApplicationError( _fbthrift_python_exceptions.ApplicationErrorType. MISSING_RESULT, "Empty Response", )