/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/params/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #include "thrift/compiler/test/fixtures/params/gen-cpp2/NestedContainersAsyncClient.h" #include namespace cpp2 { typedef apache::thrift::ThriftPresult>, ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>*>> NestedContainers_mapList_pargs; typedef apache::thrift::ThriftPresult NestedContainers_mapList_presult; typedef apache::thrift::ThriftPresult>, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>*>> NestedContainers_mapSet_pargs; typedef apache::thrift::ThriftPresult NestedContainers_mapSet_presult; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>*>> NestedContainers_listMap_pargs; typedef apache::thrift::ThriftPresult NestedContainers_listMap_presult; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::set<::std::int32_t>>*>> NestedContainers_listSet_pargs; typedef apache::thrift::ThriftPresult NestedContainers_listSet_presult; typedef apache::thrift::ThriftPresult>>>>, ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>*>> NestedContainers_turtles_pargs; typedef apache::thrift::ThriftPresult NestedContainers_turtles_presult; } // namespace cpp2 template apache::thrift::SerializedRequest apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_mapList(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { ::cpp2::NestedContainers_mapList_pargs args; args.get<0>().value = const_cast<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>*>(&p_foo); const auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; const auto writer = [&](Protocol_* p) { args.write(p); }; return apache::thrift::preprocessSendT( prot, rpcOptions, contextStack, header, "mapList", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_send_mapList(apache::thrift::SerializedRequest&& request, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::RequestClientCallback::Ptr callback) { static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "mapList", ::apache::thrift::FunctionQualifier::Unspecified, "NestedContainers"); apache::thrift::clientSendT(std::move(request), std::forward(rpcOptions), std::move(callback), std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata)); } template apache::thrift::SerializedRequest apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_mapSet(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { ::cpp2::NestedContainers_mapSet_pargs args; args.get<0>().value = const_cast<::std::map<::std::int32_t, ::std::set<::std::int32_t>>*>(&p_foo); const auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; const auto writer = [&](Protocol_* p) { args.write(p); }; return apache::thrift::preprocessSendT( prot, rpcOptions, contextStack, header, "mapSet", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_send_mapSet(apache::thrift::SerializedRequest&& request, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::RequestClientCallback::Ptr callback) { static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "mapSet", ::apache::thrift::FunctionQualifier::Unspecified, "NestedContainers"); apache::thrift::clientSendT(std::move(request), std::forward(rpcOptions), std::move(callback), std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata)); } template apache::thrift::SerializedRequest apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_listMap(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { ::cpp2::NestedContainers_listMap_pargs args; args.get<0>().value = const_cast<::std::vector<::std::map<::std::int32_t, ::std::int32_t>>*>(&p_foo); const auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; const auto writer = [&](Protocol_* p) { args.write(p); }; return apache::thrift::preprocessSendT( prot, rpcOptions, contextStack, header, "listMap", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_send_listMap(apache::thrift::SerializedRequest&& request, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::RequestClientCallback::Ptr callback) { static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "listMap", ::apache::thrift::FunctionQualifier::Unspecified, "NestedContainers"); apache::thrift::clientSendT(std::move(request), std::forward(rpcOptions), std::move(callback), std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata)); } template apache::thrift::SerializedRequest apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_listSet(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { ::cpp2::NestedContainers_listSet_pargs args; args.get<0>().value = const_cast<::std::vector<::std::set<::std::int32_t>>*>(&p_foo); const auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; const auto writer = [&](Protocol_* p) { args.write(p); }; return apache::thrift::preprocessSendT( prot, rpcOptions, contextStack, header, "listSet", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_send_listSet(apache::thrift::SerializedRequest&& request, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::RequestClientCallback::Ptr callback) { static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "listSet", ::apache::thrift::FunctionQualifier::Unspecified, "NestedContainers"); apache::thrift::clientSendT(std::move(request), std::forward(rpcOptions), std::move(callback), std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata)); } template apache::thrift::SerializedRequest apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_turtles(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { ::cpp2::NestedContainers_turtles_pargs args; args.get<0>().value = const_cast<::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>*>(&p_foo); const auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; const auto writer = [&](Protocol_* p) { args.write(p); }; return apache::thrift::preprocessSendT( prot, rpcOptions, contextStack, header, "turtles", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_send_turtles(apache::thrift::SerializedRequest&& request, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::RequestClientCallback::Ptr callback) { static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "turtles", ::apache::thrift::FunctionQualifier::Unspecified, "NestedContainers"); apache::thrift::clientSendT(std::move(request), std::forward(rpcOptions), std::move(callback), std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata)); } void apache::thrift::Client<::cpp2::NestedContainers>::mapList(std::unique_ptr callback, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; mapList(rpcOptions, std::move(callback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::mapList(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { auto [ctx, header] = mapListCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_mapList(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_and_send_mapList(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_mapList(&writer, rpcOptions, *header, contextStack, p_foo); if (stealRpcOptions) { fbthrift_send_mapList(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_mapList(std::move(request), rpcOptions, std::move(header), std::move(callback)); } }); } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::NestedContainers>::mapListCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, interceptors_, getServiceName(), "NestedContainers.mapList", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::NestedContainers>::sync_mapList(const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; sync_mapList(rpcOptions, p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::sync_mapList(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = mapListCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); #if FOLLY_HAS_COROUTINES const bool shouldProcessClientInterceptors = ctxAndHeader.first && ctxAndHeader.first->shouldProcessClientInterceptors(); if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnRequest()); } #endif callback.waitUntilDone( evb, [&] { fbthrift_serialize_and_send_mapList(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_foo); }); #if FOLLY_HAS_COROUTINES if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnResponse()); } #endif if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_mapList(returnState); }); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_mapList(const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return future_mapList(rpcOptions, p_foo); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_mapList(const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_mapList(rpcOptions, p_foo); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_mapList(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_mapList, channel_); mapList(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_mapList(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_mapList, channel_); auto callback = std::move(callbackAndFuture.first); mapList(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::NestedContainers>::header_future_mapList(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_mapList, channel_); mapList(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::cpp2::NestedContainers>::header_semifuture_mapList(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_mapList, channel_); auto callback = std::move(callbackAndFuture.first); mapList(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::NestedContainers>::mapList(folly::Function callback, const ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>& p_foo) { mapList(std::make_unique(std::move(callback)), p_foo); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_wrapped_mapList(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::NestedContainers_mapList_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::NestedContainers>::recv_mapList(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_mapList(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_mapList(::apache::thrift::ClientReceiveState& state) { recv_mapList(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_wrapped_mapList(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_mapList(state); } void apache::thrift::Client<::cpp2::NestedContainers>::mapSet(std::unique_ptr callback, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; mapSet(rpcOptions, std::move(callback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::mapSet(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { auto [ctx, header] = mapSetCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_mapSet(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_and_send_mapSet(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_mapSet(&writer, rpcOptions, *header, contextStack, p_foo); if (stealRpcOptions) { fbthrift_send_mapSet(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_mapSet(std::move(request), rpcOptions, std::move(header), std::move(callback)); } }); } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::NestedContainers>::mapSetCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, interceptors_, getServiceName(), "NestedContainers.mapSet", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::NestedContainers>::sync_mapSet(const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; sync_mapSet(rpcOptions, p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::sync_mapSet(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = mapSetCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); #if FOLLY_HAS_COROUTINES const bool shouldProcessClientInterceptors = ctxAndHeader.first && ctxAndHeader.first->shouldProcessClientInterceptors(); if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnRequest()); } #endif callback.waitUntilDone( evb, [&] { fbthrift_serialize_and_send_mapSet(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_foo); }); #if FOLLY_HAS_COROUTINES if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnResponse()); } #endif if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_mapSet(returnState); }); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_mapSet(const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return future_mapSet(rpcOptions, p_foo); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_mapSet(const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_mapSet(rpcOptions, p_foo); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_mapSet(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_mapSet, channel_); mapSet(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_mapSet(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_mapSet, channel_); auto callback = std::move(callbackAndFuture.first); mapSet(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::NestedContainers>::header_future_mapSet(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_mapSet, channel_); mapSet(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::cpp2::NestedContainers>::header_semifuture_mapSet(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_mapSet, channel_); auto callback = std::move(callbackAndFuture.first); mapSet(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::NestedContainers>::mapSet(folly::Function callback, const ::std::map<::std::int32_t, ::std::set<::std::int32_t>>& p_foo) { mapSet(std::make_unique(std::move(callback)), p_foo); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_wrapped_mapSet(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::NestedContainers_mapSet_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::NestedContainers>::recv_mapSet(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_mapSet(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_mapSet(::apache::thrift::ClientReceiveState& state) { recv_mapSet(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_wrapped_mapSet(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_mapSet(state); } void apache::thrift::Client<::cpp2::NestedContainers>::listMap(std::unique_ptr callback, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; listMap(rpcOptions, std::move(callback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::listMap(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { auto [ctx, header] = listMapCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_listMap(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_and_send_listMap(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_listMap(&writer, rpcOptions, *header, contextStack, p_foo); if (stealRpcOptions) { fbthrift_send_listMap(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_listMap(std::move(request), rpcOptions, std::move(header), std::move(callback)); } }); } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::NestedContainers>::listMapCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, interceptors_, getServiceName(), "NestedContainers.listMap", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::NestedContainers>::sync_listMap(const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; sync_listMap(rpcOptions, p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::sync_listMap(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = listMapCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); #if FOLLY_HAS_COROUTINES const bool shouldProcessClientInterceptors = ctxAndHeader.first && ctxAndHeader.first->shouldProcessClientInterceptors(); if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnRequest()); } #endif callback.waitUntilDone( evb, [&] { fbthrift_serialize_and_send_listMap(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_foo); }); #if FOLLY_HAS_COROUTINES if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnResponse()); } #endif if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_listMap(returnState); }); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_listMap(const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return future_listMap(rpcOptions, p_foo); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_listMap(const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_listMap(rpcOptions, p_foo); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_listMap(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_listMap, channel_); listMap(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_listMap(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_listMap, channel_); auto callback = std::move(callbackAndFuture.first); listMap(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::NestedContainers>::header_future_listMap(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_listMap, channel_); listMap(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::cpp2::NestedContainers>::header_semifuture_listMap(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_listMap, channel_); auto callback = std::move(callbackAndFuture.first); listMap(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::NestedContainers>::listMap(folly::Function callback, const ::std::vector<::std::map<::std::int32_t, ::std::int32_t>>& p_foo) { listMap(std::make_unique(std::move(callback)), p_foo); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_wrapped_listMap(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::NestedContainers_listMap_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::NestedContainers>::recv_listMap(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_listMap(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_listMap(::apache::thrift::ClientReceiveState& state) { recv_listMap(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_wrapped_listMap(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_listMap(state); } void apache::thrift::Client<::cpp2::NestedContainers>::listSet(std::unique_ptr callback, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; listSet(rpcOptions, std::move(callback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::listSet(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { auto [ctx, header] = listSetCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_listSet(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_and_send_listSet(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::set<::std::int32_t>>& p_foo, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_listSet(&writer, rpcOptions, *header, contextStack, p_foo); if (stealRpcOptions) { fbthrift_send_listSet(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_listSet(std::move(request), rpcOptions, std::move(header), std::move(callback)); } }); } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::NestedContainers>::listSetCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, interceptors_, getServiceName(), "NestedContainers.listSet", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::NestedContainers>::sync_listSet(const ::std::vector<::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; sync_listSet(rpcOptions, p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::sync_listSet(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = listSetCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); #if FOLLY_HAS_COROUTINES const bool shouldProcessClientInterceptors = ctxAndHeader.first && ctxAndHeader.first->shouldProcessClientInterceptors(); if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnRequest()); } #endif callback.waitUntilDone( evb, [&] { fbthrift_serialize_and_send_listSet(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_foo); }); #if FOLLY_HAS_COROUTINES if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnResponse()); } #endif if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_listSet(returnState); }); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_listSet(const ::std::vector<::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return future_listSet(rpcOptions, p_foo); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_listSet(const ::std::vector<::std::set<::std::int32_t>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_listSet(rpcOptions, p_foo); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_listSet(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_listSet, channel_); listSet(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_listSet(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_listSet, channel_); auto callback = std::move(callbackAndFuture.first); listSet(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::NestedContainers>::header_future_listSet(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_listSet, channel_); listSet(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::cpp2::NestedContainers>::header_semifuture_listSet(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_listSet, channel_); auto callback = std::move(callbackAndFuture.first); listSet(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::NestedContainers>::listSet(folly::Function callback, const ::std::vector<::std::set<::std::int32_t>>& p_foo) { listSet(std::make_unique(std::move(callback)), p_foo); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_wrapped_listSet(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::NestedContainers_listSet_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::NestedContainers>::recv_listSet(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_listSet(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_listSet(::apache::thrift::ClientReceiveState& state) { recv_listSet(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_wrapped_listSet(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_listSet(state); } void apache::thrift::Client<::cpp2::NestedContainers>::turtles(std::unique_ptr callback, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; turtles(rpcOptions, std::move(callback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::turtles(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { auto [ctx, header] = turtlesCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_turtles(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::fbthrift_serialize_and_send_turtles(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_turtles(&writer, rpcOptions, *header, contextStack, p_foo); if (stealRpcOptions) { fbthrift_send_turtles(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_turtles(std::move(request), rpcOptions, std::move(header), std::move(callback)); } }); } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::NestedContainers>::turtlesCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, interceptors_, getServiceName(), "NestedContainers.turtles", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::NestedContainers>::sync_turtles(const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; sync_turtles(rpcOptions, p_foo); } void apache::thrift::Client<::cpp2::NestedContainers>::sync_turtles(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = turtlesCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); #if FOLLY_HAS_COROUTINES const bool shouldProcessClientInterceptors = ctxAndHeader.first && ctxAndHeader.first->shouldProcessClientInterceptors(); if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnRequest()); } #endif callback.waitUntilDone( evb, [&] { fbthrift_serialize_and_send_turtles(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_foo); }); #if FOLLY_HAS_COROUTINES if (shouldProcessClientInterceptors) { folly::coro::blockingWait(ctxAndHeader.first->processClientInterceptorsOnResponse()); } #endif if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_turtles(returnState); }); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_turtles(const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return future_turtles(rpcOptions, p_foo); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_turtles(const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_turtles(rpcOptions, p_foo); } folly::Future apache::thrift::Client<::cpp2::NestedContainers>::future_turtles(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_turtles, channel_); turtles(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::cpp2::NestedContainers>::semifuture_turtles(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_turtles, channel_); auto callback = std::move(callbackAndFuture.first); turtles(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::NestedContainers>::header_future_turtles(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_turtles, channel_); turtles(rpcOptions, std::move(callback), p_foo); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::cpp2::NestedContainers>::header_semifuture_turtles(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_turtles, channel_); auto callback = std::move(callbackAndFuture.first); turtles(rpcOptions, std::move(callback), p_foo); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::NestedContainers>::turtles(folly::Function callback, const ::std::vector<::std::vector<::std::map<::std::int32_t, ::std::map<::std::int32_t, ::std::set<::std::int32_t>>>>>& p_foo) { turtles(std::make_unique(std::move(callback)), p_foo); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_wrapped_turtles(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::NestedContainers_turtles_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::NestedContainers>::recv_turtles(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_turtles(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_turtles(::apache::thrift::ClientReceiveState& state) { recv_turtles(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::NestedContainers>::recv_instance_wrapped_turtles(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_turtles(state); }