/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/mcpp2-compare/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/ParamService.h" #include namespace some::valid::ns { typedef apache::thrift::ThriftPresult> ParamService_void_ret_i16_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_i16_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int16_t*>> ParamService_void_ret_byte_i16_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_byte_i16_param_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int64_t>*>> ParamService_void_ret_map_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_map_param_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int64_t>*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, ::std::set<::std::vector<::std::string>>*>> ParamService_void_ret_map_setlist_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_map_setlist_param_presult; typedef apache::thrift::ThriftPresult> ParamService_void_ret_map_typedef_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_map_typedef_param_presult; typedef apache::thrift::ThriftPresult> ParamService_void_ret_enum_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_enum_param_presult; typedef apache::thrift::ThriftPresult> ParamService_void_ret_struct_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_struct_param_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::some::valid::ns::ComplexUnion>*>> ParamService_void_ret_listunion_param_pargs; typedef apache::thrift::ThriftPresult ParamService_void_ret_listunion_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<3, ::apache::thrift::type_class::integral, ::std::int64_t*>> ParamService_bool_ret_i32_i64_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_bool_ret_i32_i64_param_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int64_t>*>> ParamService_bool_ret_map_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_bool_ret_map_param_presult; typedef apache::thrift::ThriftPresult> ParamService_bool_ret_union_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_bool_ret_union_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<3, ::apache::thrift::type_class::floating_point, double*>> ParamService_i64_ret_float_double_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_i64_ret_float_double_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<3, ::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::map<::apache::thrift::type_class::structure, ::apache::thrift::type_class::structure>>>>, ::std::set<::some::valid::ns::mostComplexTypeDef>*>> ParamService_i64_ret_string_typedef_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_i64_ret_string_typedef_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<4, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<5, ::apache::thrift::type_class::integral, ::std::int32_t*>> ParamService_i64_ret_i32_i32_i32_i32_i32_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_i64_ret_i32_i32_i32_i32_i32_param_presult; typedef apache::thrift::ThriftPresult, ::std::set<::some::valid::ns::MyStruct>*>> ParamService_double_ret_setstruct_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_double_ret_setstruct_param_presult; typedef apache::thrift::ThriftPresult> ParamService_string_ret_string_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_string_ret_string_param_presult; typedef apache::thrift::ThriftPresult> ParamService_binary_ret_binary_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_binary_ret_binary_param_presult; typedef apache::thrift::ThriftPresult> ParamService_map_ret_bool_param_pargs; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int64_t>*>> ParamService_map_ret_bool_param_presult; typedef apache::thrift::ThriftPresult>, ::std::map<::std::int32_t, ::std::vector<::std::string>>*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, ::std::vector<::std::string>*>> ParamService_list_ret_map_setlist_param_pargs; typedef apache::thrift::ThriftPresult, ::std::vector*>> ParamService_list_ret_map_setlist_param_presult; typedef apache::thrift::ThriftPresult>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>*>> ParamService_mapsetlistmapliststring_ret_listlistlist_param_pargs; typedef apache::thrift::ThriftPresult>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>*>> ParamService_mapsetlistmapliststring_ret_listlistlist_param_presult; typedef apache::thrift::ThriftPresult> ParamService_typedef_ret_i32_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_typedef_ret_i32_param_presult; typedef apache::thrift::ThriftPresult>, ::some::valid::ns::complexStructTypeDef*>> ParamService_listtypedef_ret_typedef_param_pargs; typedef apache::thrift::ThriftPresult, ::std::vector<::some::valid::ns::simpleTypeDef>*>> ParamService_listtypedef_ret_typedef_param_presult; typedef apache::thrift::ThriftPresult> ParamService_enum_ret_double_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_enum_ret_double_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<5, ::apache::thrift::type_class::enumeration, ::some::valid::ns::MyEnumA*>> ParamService_enum_ret_double_enum_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_enum_ret_double_enum_param_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int64_t>*>> ParamService_listenum_ret_map_param_pargs; typedef apache::thrift::ThriftPresult, ::std::vector<::some::valid::ns::MyEnumA>*>> ParamService_listenum_ret_map_param_presult; typedef apache::thrift::ThriftPresult> ParamService_struct_ret_i16_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_struct_ret_i16_param_presult; typedef apache::thrift::ThriftPresult, ::std::set<::std::string>*>> ParamService_setstruct_ret_set_param_pargs; typedef apache::thrift::ThriftPresult, ::std::set<::some::valid::ns::MyStruct>*>> ParamService_setstruct_ret_set_param_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int32_t*>> ParamService_union_ret_i32_i32_param_pargs; typedef apache::thrift::ThriftPresult> ParamService_union_ret_i32_i32_param_presult; typedef apache::thrift::ThriftPresult> ParamService_listunion_string_param_pargs; typedef apache::thrift::ThriftPresult, ::std::vector<::some::valid::ns::ComplexUnion>*>> ParamService_listunion_string_param_presult; template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, nullptr, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } if (!req->getShouldStartProcessing()) { apache::thrift::HandlerCallbackBase::releaseRequest(std::move(req), eb); return; } apache::thrift::ServerRequest serverRequest{std::move(req), std::move(serializedRequest), ctx, {}, {}, {}, {}}; executeRequest_void_ret_i16_param(std::move(serverRequest)); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_i16_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int16_t uarg_param1{0}; ParamService_void_ret_i16_param_pargs pargs() { ParamService_void_ret_i16_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_i16_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_i16_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_i16_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_i16_param" , return_void_ret_i16_param , throw_wrapped_void_ret_i16_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , nullptr , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_eb_void_ret_i16_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_i16_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_i16_param_presult result; return serializeResponse("void_ret_i16_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_i16_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_byte_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_byte_i16_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_byte_i16_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int8_t uarg_param1{0}; ::std::int16_t uarg_param2{0}; ParamService_void_ret_byte_i16_param_pargs pargs() { ParamService_void_ret_byte_i16_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_byte_i16_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_byte_i16_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_byte_i16_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_byte_i16_param" , return_void_ret_byte_i16_param , throw_wrapped_void_ret_byte_i16_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_byte_i16_param(std::move(cb), args.uarg_param1, args.uarg_param2); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_byte_i16_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_byte_i16_param_presult result; return serializeResponse("void_ret_byte_i16_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_byte_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_byte_i16_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_map_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_map_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::map<::std::string, ::std::int64_t>> uarg_param1 = std::make_unique<::std::map<::std::string, ::std::int64_t>>(); ParamService_void_ret_map_param_pargs pargs() { ParamService_void_ret_map_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_map_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_map_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_map_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_map_param" , return_void_ret_map_param , throw_wrapped_void_ret_map_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_map_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_map_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_map_param_presult result; return serializeResponse("void_ret_map_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_map_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_map_setlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_map_setlist_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_map_setlist_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::map<::std::string, ::std::int64_t>> uarg_param1 = std::make_unique<::std::map<::std::string, ::std::int64_t>>(); std::unique_ptr<::std::set<::std::vector<::std::string>>> uarg_param2 = std::make_unique<::std::set<::std::vector<::std::string>>>(); ParamService_void_ret_map_setlist_param_pargs pargs() { ParamService_void_ret_map_setlist_param_pargs args; args.get<0>().value = uarg_param1.get(); args.get<1>().value = uarg_param2.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1), std::as_const(*uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_map_setlist_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_map_setlist_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_map_setlist_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_map_setlist_param" , return_void_ret_map_setlist_param , throw_wrapped_void_ret_map_setlist_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_map_setlist_param(std::move(cb), std::move(args.uarg_param1), std::move(args.uarg_param2)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_map_setlist_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_map_setlist_param_presult result; return serializeResponse("void_ret_map_setlist_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_map_setlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_map_setlist_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_map_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_map_typedef_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_map_typedef_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::some::valid::ns::simpleTypeDef uarg_param1{0}; ParamService_void_ret_map_typedef_param_pargs pargs() { ParamService_void_ret_map_typedef_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_map_typedef_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_map_typedef_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_map_typedef_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_map_typedef_param" , return_void_ret_map_typedef_param , throw_wrapped_void_ret_map_typedef_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_map_typedef_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_map_typedef_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_map_typedef_param_presult result; return serializeResponse("void_ret_map_typedef_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_map_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_map_typedef_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_enum_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_enum_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_enum_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::some::valid::ns::MyEnumA uarg_param1{static_cast<::some::valid::ns::MyEnumA>(0)}; ParamService_void_ret_enum_param_pargs pargs() { ParamService_void_ret_enum_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_enum_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_enum_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_enum_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_enum_param" , return_void_ret_enum_param , throw_wrapped_void_ret_enum_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_enum_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_enum_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_enum_param_presult result; return serializeResponse("void_ret_enum_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_enum_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_enum_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_struct_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_struct_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_struct_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::some::valid::ns::MyStruct> uarg_param1 = std::make_unique<::some::valid::ns::MyStruct>(); ParamService_void_ret_struct_param_pargs pargs() { ParamService_void_ret_struct_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_struct_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_struct_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_struct_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_struct_param" , return_void_ret_struct_param , throw_wrapped_void_ret_struct_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_struct_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_struct_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_struct_param_presult result; return serializeResponse("void_ret_struct_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_struct_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_struct_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_void_ret_listunion_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_void_ret_listunion_param, this); } template void ParamServiceAsyncProcessor::executeRequest_void_ret_listunion_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::vector<::some::valid::ns::ComplexUnion>> uarg_param1 = std::make_unique<::std::vector<::some::valid::ns::ComplexUnion>>(); ParamService_void_ret_listunion_param_pargs pargs() { ParamService_void_ret_listunion_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.void_ret_listunion_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "void_ret_listunion_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "void_ret_listunion_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "void_ret_listunion_param" , return_void_ret_listunion_param , throw_wrapped_void_ret_listunion_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_void_ret_listunion_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_void_ret_listunion_param(apache::thrift::ContextStack* ctx) { ProtocolOut_ prot; ::some::valid::ns::ParamService_void_ret_listunion_param_presult result; return serializeResponse("void_ret_listunion_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_void_ret_listunion_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "void_ret_listunion_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_bool_ret_i32_i64_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_bool_ret_i32_i64_param, this); } template void ParamServiceAsyncProcessor::executeRequest_bool_ret_i32_i64_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int32_t uarg_param1{0}; ::std::int64_t uarg_param2{0}; ParamService_bool_ret_i32_i64_param_pargs pargs() { ParamService_bool_ret_i32_i64_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.bool_ret_i32_i64_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "bool_ret_i32_i64_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "bool_ret_i32_i64_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "bool_ret_i32_i64_param" , return_bool_ret_i32_i64_param , throw_wrapped_bool_ret_i32_i64_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_bool_ret_i32_i64_param(std::move(cb), args.uarg_param1, args.uarg_param2); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_bool_ret_i32_i64_param(apache::thrift::ContextStack* ctx, bool const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_bool_ret_i32_i64_param_presult result; result.get<0>().value = const_cast(&_return); result.setIsSet(0, true); return serializeResponse("bool_ret_i32_i64_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_bool_ret_i32_i64_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "bool_ret_i32_i64_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_bool_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_bool_ret_map_param, this); } template void ParamServiceAsyncProcessor::executeRequest_bool_ret_map_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::map<::std::string, ::std::int64_t>> uarg_param1 = std::make_unique<::std::map<::std::string, ::std::int64_t>>(); ParamService_bool_ret_map_param_pargs pargs() { ParamService_bool_ret_map_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.bool_ret_map_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "bool_ret_map_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "bool_ret_map_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "bool_ret_map_param" , return_bool_ret_map_param , throw_wrapped_bool_ret_map_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_bool_ret_map_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_bool_ret_map_param(apache::thrift::ContextStack* ctx, bool const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_bool_ret_map_param_presult result; result.get<0>().value = const_cast(&_return); result.setIsSet(0, true); return serializeResponse("bool_ret_map_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_bool_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "bool_ret_map_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_bool_ret_union_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_bool_ret_union_param, this); } template void ParamServiceAsyncProcessor::executeRequest_bool_ret_union_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::some::valid::ns::ComplexUnion> uarg_param1 = std::make_unique<::some::valid::ns::ComplexUnion>(); ParamService_bool_ret_union_param_pargs pargs() { ParamService_bool_ret_union_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.bool_ret_union_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "bool_ret_union_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "bool_ret_union_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "bool_ret_union_param" , return_bool_ret_union_param , throw_wrapped_bool_ret_union_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_bool_ret_union_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_bool_ret_union_param(apache::thrift::ContextStack* ctx, bool const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_bool_ret_union_param_presult result; result.get<0>().value = const_cast(&_return); result.setIsSet(0, true); return serializeResponse("bool_ret_union_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_bool_ret_union_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "bool_ret_union_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_i64_ret_float_double_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_i64_ret_float_double_param, this); } template void ParamServiceAsyncProcessor::executeRequest_i64_ret_float_double_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { float uarg_param1{0}; double uarg_param2{0}; ParamService_i64_ret_float_double_param_pargs pargs() { ParamService_i64_ret_float_double_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.i64_ret_float_double_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "i64_ret_float_double_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "i64_ret_float_double_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::std::int64_t>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "i64_ret_float_double_param" , return_i64_ret_float_double_param , throw_wrapped_i64_ret_float_double_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_i64_ret_float_double_param(std::move(cb), args.uarg_param1, args.uarg_param2); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_i64_ret_float_double_param(apache::thrift::ContextStack* ctx, ::std::int64_t const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_i64_ret_float_double_param_presult result; result.get<0>().value = const_cast<::std::int64_t*>(&_return); result.setIsSet(0, true); return serializeResponse("i64_ret_float_double_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_i64_ret_float_double_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "i64_ret_float_double_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_i64_ret_string_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_i64_ret_string_typedef_param, this); } template void ParamServiceAsyncProcessor::executeRequest_i64_ret_string_typedef_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::string> uarg_param1 = std::make_unique<::std::string>(); std::unique_ptr<::std::set<::some::valid::ns::mostComplexTypeDef>> uarg_param2 = std::make_unique<::std::set<::some::valid::ns::mostComplexTypeDef>>(); ParamService_i64_ret_string_typedef_param_pargs pargs() { ParamService_i64_ret_string_typedef_param_pargs args; args.get<0>().value = uarg_param1.get(); args.get<1>().value = uarg_param2.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1), std::as_const(*uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.i64_ret_string_typedef_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "i64_ret_string_typedef_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "i64_ret_string_typedef_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::std::int64_t>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "i64_ret_string_typedef_param" , return_i64_ret_string_typedef_param , throw_wrapped_i64_ret_string_typedef_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_i64_ret_string_typedef_param(std::move(cb), std::move(args.uarg_param1), std::move(args.uarg_param2)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_i64_ret_string_typedef_param(apache::thrift::ContextStack* ctx, ::std::int64_t const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_i64_ret_string_typedef_param_presult result; result.get<0>().value = const_cast<::std::int64_t*>(&_return); result.setIsSet(0, true); return serializeResponse("i64_ret_string_typedef_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_i64_ret_string_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "i64_ret_string_typedef_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, nullptr, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } if (!req->getShouldStartProcessing()) { apache::thrift::HandlerCallbackBase::releaseRequest(std::move(req), eb); return; } apache::thrift::ServerRequest serverRequest{std::move(req), std::move(serializedRequest), ctx, {}, {}, {}, {}}; executeRequest_i64_ret_i32_i32_i32_i32_i32_param(std::move(serverRequest)); } template void ParamServiceAsyncProcessor::executeRequest_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int32_t uarg_param1{0}; ::std::int32_t uarg_param2{0}; ::std::int32_t uarg_param3{0}; ::std::int32_t uarg_param4{0}; ::std::int32_t uarg_param5{0}; ParamService_i64_ret_i32_i32_i32_i32_i32_param_pargs pargs() { ParamService_i64_ret_i32_i32_i32_i32_i32_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; args.get<2>().value = &uarg_param3; args.get<3>().value = &uarg_param4; args.get<4>().value = &uarg_param5; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2), std::as_const(uarg_param3), std::as_const(uarg_param4), std::as_const(uarg_param5) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.i64_ret_i32_i32_i32_i32_i32_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "i64_ret_i32_i32_i32_i32_i32_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "i64_ret_i32_i32_i32_i32_i32_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::std::int64_t>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "i64_ret_i32_i32_i32_i32_i32_param" , return_i64_ret_i32_i32_i32_i32_i32_param , throw_wrapped_i64_ret_i32_i32_i32_i32_i32_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , nullptr , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_eb_i64_ret_i32_i32_i32_i32_i32_param(std::move(cb), args.uarg_param1, args.uarg_param2, args.uarg_param3, args.uarg_param4, args.uarg_param5); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::ContextStack* ctx, ::std::int64_t const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_i64_ret_i32_i32_i32_i32_i32_param_presult result; result.get<0>().value = const_cast<::std::int64_t*>(&_return); result.setIsSet(0, true); return serializeResponse("i64_ret_i32_i32_i32_i32_i32_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "i64_ret_i32_i32_i32_i32_i32_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_double_ret_setstruct_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_double_ret_setstruct_param, this); } template void ParamServiceAsyncProcessor::executeRequest_double_ret_setstruct_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::set<::some::valid::ns::MyStruct>> uarg_param1 = std::make_unique<::std::set<::some::valid::ns::MyStruct>>(); ParamService_double_ret_setstruct_param_pargs pargs() { ParamService_double_ret_setstruct_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.double_ret_setstruct_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "double_ret_setstruct_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "double_ret_setstruct_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "double_ret_setstruct_param" , return_double_ret_setstruct_param , throw_wrapped_double_ret_setstruct_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_double_ret_setstruct_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_double_ret_setstruct_param(apache::thrift::ContextStack* ctx, double const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_double_ret_setstruct_param_presult result; result.get<0>().value = const_cast(&_return); result.setIsSet(0, true); return serializeResponse("double_ret_setstruct_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_double_ret_setstruct_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "double_ret_setstruct_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_string_ret_string_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_string_ret_string_param, this); } template void ParamServiceAsyncProcessor::executeRequest_string_ret_string_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::string> uarg_param1 = std::make_unique<::std::string>(); ParamService_string_ret_string_param_pargs pargs() { ParamService_string_ret_string_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.string_ret_string_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "string_ret_string_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "string_ret_string_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "string_ret_string_param" , return_string_ret_string_param , throw_wrapped_string_ret_string_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_string_ret_string_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_string_ret_string_param(apache::thrift::ContextStack* ctx, ::std::string const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_string_ret_string_param_presult result; result.get<0>().value = const_cast<::std::string*>(&_return); result.setIsSet(0, true); return serializeResponse("string_ret_string_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_string_ret_string_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "string_ret_string_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_binary_ret_binary_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_binary_ret_binary_param, this); } template void ParamServiceAsyncProcessor::executeRequest_binary_ret_binary_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::string> uarg_param1 = std::make_unique<::std::string>(); ParamService_binary_ret_binary_param_pargs pargs() { ParamService_binary_ret_binary_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.binary_ret_binary_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "binary_ret_binary_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "binary_ret_binary_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "binary_ret_binary_param" , return_binary_ret_binary_param , throw_wrapped_binary_ret_binary_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_binary_ret_binary_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_binary_ret_binary_param(apache::thrift::ContextStack* ctx, ::std::string const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_binary_ret_binary_param_presult result; result.get<0>().value = const_cast<::std::string*>(&_return); result.setIsSet(0, true); return serializeResponse("binary_ret_binary_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_binary_ret_binary_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "binary_ret_binary_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_map_ret_bool_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_map_ret_bool_param, this); } template void ParamServiceAsyncProcessor::executeRequest_map_ret_bool_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { bool uarg_param1{0}; ParamService_map_ret_bool_param_pargs pargs() { ParamService_map_ret_bool_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.map_ret_bool_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "map_ret_bool_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "map_ret_bool_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "map_ret_bool_param" , return_map_ret_bool_param , throw_wrapped_map_ret_bool_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_map_ret_bool_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_map_ret_bool_param(apache::thrift::ContextStack* ctx, ::std::map<::std::string, ::std::int64_t> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_map_ret_bool_param_presult result; result.get<0>().value = const_cast<::std::map<::std::string, ::std::int64_t>*>(&_return); result.setIsSet(0, true); return serializeResponse("map_ret_bool_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_map_ret_bool_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "map_ret_bool_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_list_ret_map_setlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_list_ret_map_setlist_param, this); } template void ParamServiceAsyncProcessor::executeRequest_list_ret_map_setlist_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::map<::std::int32_t, ::std::vector<::std::string>>> uarg_param1 = std::make_unique<::std::map<::std::int32_t, ::std::vector<::std::string>>>(); std::unique_ptr<::std::vector<::std::string>> uarg_param2 = std::make_unique<::std::vector<::std::string>>(); ParamService_list_ret_map_setlist_param_pargs pargs() { ParamService_list_ret_map_setlist_param_pargs args; args.get<0>().value = uarg_param1.get(); args.get<1>().value = uarg_param2.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1), std::as_const(*uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.list_ret_map_setlist_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "list_ret_map_setlist_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "list_ret_map_setlist_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "list_ret_map_setlist_param" , return_list_ret_map_setlist_param , throw_wrapped_list_ret_map_setlist_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_list_ret_map_setlist_param(std::move(cb), std::move(args.uarg_param1), std::move(args.uarg_param2)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_list_ret_map_setlist_param(apache::thrift::ContextStack* ctx, ::std::vector const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_list_ret_map_setlist_param_presult result; result.get<0>().value = const_cast<::std::vector*>(&_return); result.setIsSet(0, true); return serializeResponse("list_ret_map_setlist_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_list_ret_map_setlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "list_ret_map_setlist_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_mapsetlistmapliststring_ret_listlistlist_param, this); } template void ParamServiceAsyncProcessor::executeRequest_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>> uarg_param1 = std::make_unique<::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>>(); ParamService_mapsetlistmapliststring_ret_listlistlist_param_pargs pargs() { ParamService_mapsetlistmapliststring_ret_listlistlist_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.mapsetlistmapliststring_ret_listlistlist_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "mapsetlistmapliststring_ret_listlistlist_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "mapsetlistmapliststring_ret_listlistlist_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "mapsetlistmapliststring_ret_listlistlist_param" , return_mapsetlistmapliststring_ret_listlistlist_param , throw_wrapped_mapsetlistmapliststring_ret_listlistlist_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_mapsetlistmapliststring_ret_listlistlist_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::ContextStack* ctx, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_mapsetlistmapliststring_ret_listlistlist_param_presult result; result.get<0>().value = const_cast<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>*>(&_return); result.setIsSet(0, true); return serializeResponse("mapsetlistmapliststring_ret_listlistlist_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "mapsetlistmapliststring_ret_listlistlist_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_typedef_ret_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_typedef_ret_i32_param, this); } template void ParamServiceAsyncProcessor::executeRequest_typedef_ret_i32_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int32_t uarg_param1{0}; ParamService_typedef_ret_i32_param_pargs pargs() { ParamService_typedef_ret_i32_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.typedef_ret_i32_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "typedef_ret_i32_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "typedef_ret_i32_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::some::valid::ns::simpleTypeDef>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "typedef_ret_i32_param" , return_typedef_ret_i32_param , throw_wrapped_typedef_ret_i32_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_typedef_ret_i32_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_typedef_ret_i32_param(apache::thrift::ContextStack* ctx, ::some::valid::ns::simpleTypeDef const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_typedef_ret_i32_param_presult result; result.get<0>().value = const_cast<::some::valid::ns::simpleTypeDef*>(&_return); result.setIsSet(0, true); return serializeResponse("typedef_ret_i32_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_typedef_ret_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "typedef_ret_i32_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_listtypedef_ret_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, nullptr, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } if (!req->getShouldStartProcessing()) { apache::thrift::HandlerCallbackBase::releaseRequest(std::move(req), eb); return; } apache::thrift::ServerRequest serverRequest{std::move(req), std::move(serializedRequest), ctx, {}, {}, {}, {}}; executeRequest_listtypedef_ret_typedef_param(std::move(serverRequest)); } template void ParamServiceAsyncProcessor::executeRequest_listtypedef_ret_typedef_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::some::valid::ns::complexStructTypeDef> uarg_param1 = std::make_unique<::some::valid::ns::complexStructTypeDef>(); ParamService_listtypedef_ret_typedef_param_pargs pargs() { ParamService_listtypedef_ret_typedef_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.listtypedef_ret_typedef_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "listtypedef_ret_typedef_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "listtypedef_ret_typedef_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "listtypedef_ret_typedef_param" , return_listtypedef_ret_typedef_param , throw_wrapped_listtypedef_ret_typedef_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , nullptr , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_eb_listtypedef_ret_typedef_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_listtypedef_ret_typedef_param(apache::thrift::ContextStack* ctx, ::std::vector<::some::valid::ns::simpleTypeDef> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_listtypedef_ret_typedef_param_presult result; result.get<0>().value = const_cast<::std::vector<::some::valid::ns::simpleTypeDef>*>(&_return); result.setIsSet(0, true); return serializeResponse("listtypedef_ret_typedef_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_listtypedef_ret_typedef_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "listtypedef_ret_typedef_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_enum_ret_double_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_enum_ret_double_param, this); } template void ParamServiceAsyncProcessor::executeRequest_enum_ret_double_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { double uarg_param1{0}; ParamService_enum_ret_double_param_pargs pargs() { ParamService_enum_ret_double_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.enum_ret_double_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "enum_ret_double_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "enum_ret_double_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::some::valid::ns::MyEnumA>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "enum_ret_double_param" , return_enum_ret_double_param , throw_wrapped_enum_ret_double_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_enum_ret_double_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_enum_ret_double_param(apache::thrift::ContextStack* ctx, ::some::valid::ns::MyEnumA const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_enum_ret_double_param_presult result; result.get<0>().value = const_cast<::some::valid::ns::MyEnumA*>(&_return); result.setIsSet(0, true); return serializeResponse("enum_ret_double_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_enum_ret_double_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "enum_ret_double_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_enum_ret_double_enum_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_enum_ret_double_enum_param, this); } template void ParamServiceAsyncProcessor::executeRequest_enum_ret_double_enum_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { double uarg_param1{0}; ::some::valid::ns::MyEnumA uarg_param2{static_cast<::some::valid::ns::MyEnumA>(0)}; ParamService_enum_ret_double_enum_param_pargs pargs() { ParamService_enum_ret_double_enum_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.enum_ret_double_enum_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "enum_ret_double_enum_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "enum_ret_double_enum_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr<::some::valid::ns::MyEnumA>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "enum_ret_double_enum_param" , return_enum_ret_double_enum_param , throw_wrapped_enum_ret_double_enum_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_enum_ret_double_enum_param(std::move(cb), args.uarg_param1, args.uarg_param2); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_enum_ret_double_enum_param(apache::thrift::ContextStack* ctx, ::some::valid::ns::MyEnumA const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_enum_ret_double_enum_param_presult result; result.get<0>().value = const_cast<::some::valid::ns::MyEnumA*>(&_return); result.setIsSet(0, true); return serializeResponse("enum_ret_double_enum_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_enum_ret_double_enum_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "enum_ret_double_enum_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_listenum_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_listenum_ret_map_param, this); } template void ParamServiceAsyncProcessor::executeRequest_listenum_ret_map_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::map<::std::string, ::std::int64_t>> uarg_param1 = std::make_unique<::std::map<::std::string, ::std::int64_t>>(); ParamService_listenum_ret_map_param_pargs pargs() { ParamService_listenum_ret_map_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.listenum_ret_map_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "listenum_ret_map_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "listenum_ret_map_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "listenum_ret_map_param" , return_listenum_ret_map_param , throw_wrapped_listenum_ret_map_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_listenum_ret_map_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_listenum_ret_map_param(apache::thrift::ContextStack* ctx, ::std::vector<::some::valid::ns::MyEnumA> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_listenum_ret_map_param_presult result; result.get<0>().value = const_cast<::std::vector<::some::valid::ns::MyEnumA>*>(&_return); result.setIsSet(0, true); return serializeResponse("listenum_ret_map_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_listenum_ret_map_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "listenum_ret_map_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_struct_ret_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, nullptr, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } if (!req->getShouldStartProcessing()) { apache::thrift::HandlerCallbackBase::releaseRequest(std::move(req), eb); return; } apache::thrift::ServerRequest serverRequest{std::move(req), std::move(serializedRequest), ctx, {}, {}, {}, {}}; executeRequest_struct_ret_i16_param(std::move(serverRequest)); } template void ParamServiceAsyncProcessor::executeRequest_struct_ret_i16_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int16_t uarg_param1{0}; ParamService_struct_ret_i16_param_pargs pargs() { ParamService_struct_ret_i16_param_pargs args; args.get<0>().value = &uarg_param1; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.struct_ret_i16_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "struct_ret_i16_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "struct_ret_i16_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "struct_ret_i16_param" , return_struct_ret_i16_param , throw_wrapped_struct_ret_i16_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , nullptr , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_eb_struct_ret_i16_param(std::move(cb), args.uarg_param1); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_struct_ret_i16_param(apache::thrift::ContextStack* ctx, ::some::valid::ns::MyStruct const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_struct_ret_i16_param_presult result; result.get<0>().value = const_cast<::some::valid::ns::MyStruct*>(&_return); result.setIsSet(0, true); return serializeResponse("struct_ret_i16_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_struct_ret_i16_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "struct_ret_i16_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_setstruct_ret_set_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_setstruct_ret_set_param, this); } template void ParamServiceAsyncProcessor::executeRequest_setstruct_ret_set_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::set<::std::string>> uarg_param1 = std::make_unique<::std::set<::std::string>>(); ParamService_setstruct_ret_set_param_pargs pargs() { ParamService_setstruct_ret_set_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.setstruct_ret_set_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "setstruct_ret_set_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "setstruct_ret_set_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "setstruct_ret_set_param" , return_setstruct_ret_set_param , throw_wrapped_setstruct_ret_set_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_setstruct_ret_set_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_setstruct_ret_set_param(apache::thrift::ContextStack* ctx, ::std::set<::some::valid::ns::MyStruct> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_setstruct_ret_set_param_presult result; result.get<0>().value = const_cast<::std::set<::some::valid::ns::MyStruct>*>(&_return); result.setIsSet(0, true); return serializeResponse("setstruct_ret_set_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_setstruct_ret_set_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "setstruct_ret_set_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_union_ret_i32_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_union_ret_i32_i32_param, this); } template void ParamServiceAsyncProcessor::executeRequest_union_ret_i32_i32_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { ::std::int32_t uarg_param1{0}; ::std::int32_t uarg_param2{0}; ParamService_union_ret_i32_i32_param_pargs pargs() { ParamService_union_ret_i32_i32_param_pargs args; args.get<0>().value = &uarg_param1; args.get<1>().value = &uarg_param2; return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(uarg_param1), std::as_const(uarg_param2) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.union_ret_i32_i32_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "union_ret_i32_i32_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "union_ret_i32_i32_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "union_ret_i32_i32_param" , return_union_ret_i32_i32_param , throw_wrapped_union_ret_i32_i32_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_union_ret_i32_i32_param(std::move(cb), args.uarg_param1, args.uarg_param2); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_union_ret_i32_i32_param(apache::thrift::ContextStack* ctx, ::some::valid::ns::ComplexUnion const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_union_ret_i32_i32_param_presult result; result.get<0>().value = const_cast<::some::valid::ns::ComplexUnion*>(&_return); result.setIsSet(0, true); return serializeResponse("union_ret_i32_i32_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_union_ret_i32_i32_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "union_ret_i32_i32_param"); return; } } template void ParamServiceAsyncProcessor::setUpAndProcess_listunion_string_param(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, [[maybe_unused]] apache::thrift::concurrency::ThreadManager* tm) { if (!setUpRequestProcessing(req, ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, iface_)) { return; } auto scope = iface_->getRequestExecutionScope(ctx, apache::thrift::concurrency::NORMAL); ctx->setRequestExecutionScope(std::move(scope)); processInThread(std::move(req), std::move(serializedRequest), ctx, eb, tm, apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, &ParamServiceAsyncProcessor::executeRequest_listunion_string_param, this); } template void ParamServiceAsyncProcessor::executeRequest_listunion_string_param(apache::thrift::ServerRequest&& serverRequest) { // make sure getRequestContext is null // so async calls don't accidentally use it iface_->setRequestContext(nullptr); struct ArgsState { std::unique_ptr<::std::string> uarg_param1 = std::make_unique<::std::string>(); ParamService_listunion_string_param_pargs pargs() { ParamService_listunion_string_param_pargs args; args.get<0>().value = uarg_param1.get(); return args; } auto asTupleOfRefs() & { return std::tie( std::as_const(*uarg_param1) ); } } args; auto ctxStack = apache::thrift::ContextStack::create( this->getEventHandlersSharedPtr(), this->getServiceName(), "ParamService.listunion_string_param", serverRequest.requestContext()); try { auto pargs = args.pargs(); deserializeRequest(pargs, "listunion_string_param", apache::thrift::detail::ServerRequestHelper::compressedRequest(std::move(serverRequest)).uncompress(), ctxStack.get()); } catch (...) { folly::exception_wrapper ew(std::current_exception()); apache::thrift::detail::ap::process_handle_exn_deserialization( ew , apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , serverRequest.requestContext() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , "listunion_string_param"); return; } auto requestPileNotification = apache::thrift::detail::ServerRequestHelper::moveRequestPileNotification(serverRequest); auto concurrencyControllerNotification = apache::thrift::detail::ServerRequestHelper::moveConcurrencyControllerNotification(serverRequest); auto callback = apache::thrift::HandlerCallbackPtr>>::make( apache::thrift::detail::ServerRequestHelper::request(std::move(serverRequest)) , std::move(ctxStack) , this->getServiceName() , "listunion_string_param" , return_listunion_string_param , throw_wrapped_listunion_string_param , serverRequest.requestContext()->getProtoSeqId() , apache::thrift::detail::ServerRequestHelper::eventBase(serverRequest) , apache::thrift::detail::ServerRequestHelper::executor(serverRequest) , serverRequest.requestContext() , requestPileNotification , concurrencyControllerNotification, std::move(serverRequest.requestData()) ); const auto makeExecuteHandler = [&] { return [ifacePtr = iface_](auto&& cb, ArgsState args) mutable { (void)args; ifacePtr->async_tm_listunion_string_param(std::move(cb), std::move(args.uarg_param1)); }; }; #if FOLLY_HAS_COROUTINES if (apache::thrift::detail::shouldProcessServiceInterceptorsOnRequest(*callback)) { [](auto callback, auto executeHandler, ArgsState args) -> folly::coro::Task { auto argRefs = args.asTupleOfRefs(); co_await apache::thrift::detail::processServiceInterceptorsOnRequest( *callback, apache::thrift::detail::ServiceInterceptorOnRequestArguments(argRefs)); executeHandler(std::move(callback), std::move(args)); }(std::move(callback), makeExecuteHandler(), std::move(args)) .scheduleOn(apache::thrift::detail::ServerRequestHelper::executor(serverRequest)) .startInlineUnsafe(); } else { makeExecuteHandler()(std::move(callback), std::move(args)); } #else makeExecuteHandler()(std::move(callback), std::move(args)); #endif // FOLLY_HAS_COROUTINES } template apache::thrift::SerializedResponse ParamServiceAsyncProcessor::return_listunion_string_param(apache::thrift::ContextStack* ctx, ::std::vector<::some::valid::ns::ComplexUnion> const& _return) { ProtocolOut_ prot; ::some::valid::ns::ParamService_listunion_string_param_presult result; result.get<0>().value = const_cast<::std::vector<::some::valid::ns::ComplexUnion>*>(&_return); result.setIsSet(0, true); return serializeResponse("listunion_string_param", &prot, ctx, result); } template void ParamServiceAsyncProcessor::throw_wrapped_listunion_string_param(apache::thrift::ResponseChannelRequest::UniquePtr req,[[maybe_unused]] int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx) { if (!ew) { return; } { apache::thrift::detail::ap::process_throw_wrapped_handler_error( ew, std::move(req), reqCtx, ctx, "listunion_string_param"); return; } } } // namespace some::valid::ns