/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/py3/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #include "thrift/compiler/test/fixtures/py3/gen-py3cpp/SimpleServiceAsyncClient.h" #include namespace py3::simple { typedef apache::thrift::ThriftPresult SimpleService_get_five_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_five_presult; typedef apache::thrift::ThriftPresult> SimpleService_add_five_pargs; typedef apache::thrift::ThriftPresult> SimpleService_add_five_presult; typedef apache::thrift::ThriftPresult SimpleService_do_nothing_pargs; typedef apache::thrift::ThriftPresult SimpleService_do_nothing_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::string, ::std::string*>> SimpleService_concat_pargs; typedef apache::thrift::ThriftPresult> SimpleService_concat_presult; typedef apache::thrift::ThriftPresult> SimpleService_get_value_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_value_presult; typedef apache::thrift::ThriftPresult> SimpleService_negate_pargs; typedef apache::thrift::ThriftPresult> SimpleService_negate_presult; typedef apache::thrift::ThriftPresult> SimpleService_tiny_pargs; typedef apache::thrift::ThriftPresult> SimpleService_tiny_presult; typedef apache::thrift::ThriftPresult> SimpleService_small_pargs; typedef apache::thrift::ThriftPresult> SimpleService_small_presult; typedef apache::thrift::ThriftPresult> SimpleService_big_pargs; typedef apache::thrift::ThriftPresult> SimpleService_big_presult; typedef apache::thrift::ThriftPresult> SimpleService_two_pargs; typedef apache::thrift::ThriftPresult> SimpleService_two_presult; typedef apache::thrift::ThriftPresult SimpleService_expected_exception_pargs; typedef apache::thrift::ThriftPresult> SimpleService_expected_exception_presult; typedef apache::thrift::ThriftPresult SimpleService_unexpected_exception_pargs; typedef apache::thrift::ThriftPresult> SimpleService_unexpected_exception_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::int16_t>*>> SimpleService_sum_i16_list_pargs; typedef apache::thrift::ThriftPresult> SimpleService_sum_i16_list_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::int32_t>*>> SimpleService_sum_i32_list_pargs; typedef apache::thrift::ThriftPresult> SimpleService_sum_i32_list_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::int64_t>*>> SimpleService_sum_i64_list_pargs; typedef apache::thrift::ThriftPresult> SimpleService_sum_i64_list_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::string>*>> SimpleService_concat_many_pargs; typedef apache::thrift::ThriftPresult> SimpleService_concat_many_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::py3::simple::SimpleStruct>*>> SimpleService_count_structs_pargs; typedef apache::thrift::ThriftPresult> SimpleService_count_structs_presult; typedef apache::thrift::ThriftPresult, ::std::set<::std::int32_t>*>> SimpleService_sum_set_pargs; typedef apache::thrift::ThriftPresult> SimpleService_sum_set_presult; typedef apache::thrift::ThriftPresult, ::std::set<::std::string>*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::string, ::std::string*>> SimpleService_contains_word_pargs; typedef apache::thrift::ThriftPresult> SimpleService_contains_word_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::string>*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::string, ::std::string*>> SimpleService_get_map_value_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_map_value_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::py3::simple::SimpleStruct>*>> SimpleService_map_length_pargs; typedef apache::thrift::ThriftPresult> SimpleService_map_length_presult; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int16_t>*>> SimpleService_sum_map_values_pargs; typedef apache::thrift::ThriftPresult> SimpleService_sum_map_values_presult; typedef apache::thrift::ThriftPresult> SimpleService_complex_sum_i32_pargs; typedef apache::thrift::ThriftPresult> SimpleService_complex_sum_i32_presult; typedef apache::thrift::ThriftPresult> SimpleService_repeat_name_pargs; typedef apache::thrift::ThriftPresult> SimpleService_repeat_name_presult; typedef apache::thrift::ThriftPresult SimpleService_get_struct_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_struct_presult; typedef apache::thrift::ThriftPresult> SimpleService_fib_pargs; typedef apache::thrift::ThriftPresult, ::std::vector<::std::int32_t>*>> SimpleService_fib_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::string>*>> SimpleService_unique_words_pargs; typedef apache::thrift::ThriftPresult, ::std::set<::std::string>*>> SimpleService_unique_words_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::string>*>> SimpleService_words_count_pargs; typedef apache::thrift::ThriftPresult, ::std::map<::std::string, ::std::int16_t>*>> SimpleService_words_count_presult; typedef apache::thrift::ThriftPresult> SimpleService_set_enum_pargs; typedef apache::thrift::ThriftPresult> SimpleService_set_enum_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int16_t*>> SimpleService_list_of_lists_pargs; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::vector<::std::int32_t>>*>> SimpleService_list_of_lists_presult; typedef apache::thrift::ThriftPresult> SimpleService_word_character_frequency_pargs; typedef apache::thrift::ThriftPresult>, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>*>> SimpleService_word_character_frequency_presult; typedef apache::thrift::ThriftPresult> SimpleService_list_of_sets_pargs; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::set<::std::string>>*>> SimpleService_list_of_sets_presult; typedef apache::thrift::ThriftPresult>, ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>*>> SimpleService_nested_map_argument_pargs; typedef apache::thrift::ThriftPresult> SimpleService_nested_map_argument_presult; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::vector<::std::string>>*>> SimpleService_make_sentence_pargs; typedef apache::thrift::ThriftPresult> SimpleService_make_sentence_presult; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::set<::std::int32_t>>*>> SimpleService_get_union_pargs; typedef apache::thrift::ThriftPresult, ::std::set<::std::int32_t>*>> SimpleService_get_union_presult; typedef apache::thrift::ThriftPresult>, ::std::vector<::std::map<::std::string, ::std::string>>*>> SimpleService_get_keys_pargs; typedef apache::thrift::ThriftPresult, ::std::set<::std::string>*>> SimpleService_get_keys_presult; typedef apache::thrift::ThriftPresult> SimpleService_lookup_double_pargs; typedef apache::thrift::ThriftPresult> SimpleService_lookup_double_presult; typedef apache::thrift::ThriftPresult> SimpleService_retrieve_binary_pargs; typedef apache::thrift::ThriftPresult> SimpleService_retrieve_binary_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::std::string>*>> SimpleService_contain_binary_pargs; typedef apache::thrift::ThriftPresult, ::std::set<::std::string>*>> SimpleService_contain_binary_presult; typedef apache::thrift::ThriftPresult, ::std::vector<::py3::simple::AnEnum>*>> SimpleService_contain_enum_pargs; typedef apache::thrift::ThriftPresult, ::std::vector<::py3::simple::AnEnum>*>> SimpleService_contain_enum_presult; typedef apache::thrift::ThriftPresult> SimpleService_get_binary_union_struct_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_binary_union_struct_presult; typedef apache::thrift::ThriftPresult SimpleService_get_struct_hidden_pargs; typedef apache::thrift::ThriftPresult> SimpleService_get_struct_hidden_presult; } // namespace py3::simple template apache::thrift::SerializedRequest apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_get_five(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_get_five_pargs args; 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, "get_five", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_five(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( "get_five", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_add_five(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int32_t p_num) { ::py3::simple::SimpleService_add_five_pargs args; args.get<0>().value = &p_num; 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, "add_five", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_add_five(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( "add_five", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_do_nothing(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_do_nothing_pargs args; 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, "do_nothing", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_do_nothing(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( "do_nothing", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_concat(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::string& p_first, const ::std::string& p_second) { ::py3::simple::SimpleService_concat_pargs args; args.get<0>().value = const_cast<::std::string*>(&p_first); args.get<1>().value = const_cast<::std::string*>(&p_second); 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, "concat", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_concat(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( "concat", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_value(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::py3::simple::SimpleStruct& p_simple_struct) { ::py3::simple::SimpleService_get_value_pargs args; args.get<0>().value = const_cast<::py3::simple::SimpleStruct*>(&p_simple_struct); 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, "get_value", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_value(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( "get_value", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_negate(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, bool p_input) { ::py3::simple::SimpleService_negate_pargs args; args.get<0>().value = &p_input; 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, "negate", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_negate(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( "negate", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_tiny(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int8_t p_input) { ::py3::simple::SimpleService_tiny_pargs args; args.get<0>().value = &p_input; 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, "tiny", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_tiny(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( "tiny", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_small(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int16_t p_input) { ::py3::simple::SimpleService_small_pargs args; args.get<0>().value = &p_input; 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, "small", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_small(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( "small", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_big(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int64_t p_input) { ::py3::simple::SimpleService_big_pargs args; args.get<0>().value = &p_input; 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, "big", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_big(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( "big", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_two(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, double p_input) { ::py3::simple::SimpleService_two_pargs args; args.get<0>().value = &p_input; 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, "two", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_two(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( "two", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_expected_exception(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_expected_exception_pargs args; 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, "expected_exception", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_expected_exception(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( "expected_exception", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_unexpected_exception(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_unexpected_exception_pargs args; 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, "unexpected_exception", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_unexpected_exception(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( "unexpected_exception", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_sum_i16_list(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::int16_t>& p_numbers) { ::py3::simple::SimpleService_sum_i16_list_pargs args; args.get<0>().value = const_cast<::std::vector<::std::int16_t>*>(&p_numbers); 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, "sum_i16_list", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_sum_i16_list(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( "sum_i16_list", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_sum_i32_list(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::int32_t>& p_numbers) { ::py3::simple::SimpleService_sum_i32_list_pargs args; args.get<0>().value = const_cast<::std::vector<::std::int32_t>*>(&p_numbers); 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, "sum_i32_list", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_sum_i32_list(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( "sum_i32_list", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_sum_i64_list(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::int64_t>& p_numbers) { ::py3::simple::SimpleService_sum_i64_list_pargs args; args.get<0>().value = const_cast<::std::vector<::std::int64_t>*>(&p_numbers); 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, "sum_i64_list", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_sum_i64_list(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( "sum_i64_list", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_concat_many(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::string>& p_words) { ::py3::simple::SimpleService_concat_many_pargs args; args.get<0>().value = const_cast<::std::vector<::std::string>*>(&p_words); 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, "concat_many", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_concat_many(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( "concat_many", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_count_structs(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { ::py3::simple::SimpleService_count_structs_pargs args; args.get<0>().value = const_cast<::std::vector<::py3::simple::SimpleStruct>*>(&p_items); 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, "count_structs", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_count_structs(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( "count_structs", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_sum_set(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::set<::std::int32_t>& p_numbers) { ::py3::simple::SimpleService_sum_set_pargs args; args.get<0>().value = const_cast<::std::set<::std::int32_t>*>(&p_numbers); 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, "sum_set", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_sum_set(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( "sum_set", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_contains_word(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { ::py3::simple::SimpleService_contains_word_pargs args; args.get<0>().value = const_cast<::std::set<::std::string>*>(&p_words); args.get<1>().value = const_cast<::std::string*>(&p_word); 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, "contains_word", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_contains_word(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( "contains_word", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_map_value(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { ::py3::simple::SimpleService_get_map_value_pargs args; args.get<0>().value = const_cast<::std::map<::std::string, ::std::string>*>(&p_words); args.get<1>().value = const_cast<::std::string*>(&p_key); 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, "get_map_value", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_map_value(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( "get_map_value", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_map_length(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { ::py3::simple::SimpleService_map_length_pargs args; args.get<0>().value = const_cast<::std::map<::std::string, ::py3::simple::SimpleStruct>*>(&p_items); 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, "map_length", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_map_length(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( "map_length", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_sum_map_values(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::string, ::std::int16_t>& p_items) { ::py3::simple::SimpleService_sum_map_values_pargs args; args.get<0>().value = const_cast<::std::map<::std::string, ::std::int16_t>*>(&p_items); 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, "sum_map_values", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_sum_map_values(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( "sum_map_values", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_complex_sum_i32(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::py3::simple::ComplexStruct& p_counter) { ::py3::simple::SimpleService_complex_sum_i32_pargs args; args.get<0>().value = const_cast<::py3::simple::ComplexStruct*>(&p_counter); 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, "complex_sum_i32", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_complex_sum_i32(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( "complex_sum_i32", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_repeat_name(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::py3::simple::ComplexStruct& p_counter) { ::py3::simple::SimpleService_repeat_name_pargs args; args.get<0>().value = const_cast<::py3::simple::ComplexStruct*>(&p_counter); 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, "repeat_name", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_repeat_name(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( "repeat_name", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_struct(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_get_struct_pargs args; 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, "get_struct", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_struct(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( "get_struct", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_fib(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int16_t p_n) { ::py3::simple::SimpleService_fib_pargs args; args.get<0>().value = &p_n; 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, "fib", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_fib(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( "fib", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_unique_words(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::string>& p_words) { ::py3::simple::SimpleService_unique_words_pargs args; args.get<0>().value = const_cast<::std::vector<::std::string>*>(&p_words); 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, "unique_words", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_unique_words(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( "unique_words", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_words_count(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::string>& p_words) { ::py3::simple::SimpleService_words_count_pargs args; args.get<0>().value = const_cast<::std::vector<::std::string>*>(&p_words); 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, "words_count", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_words_count(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( "words_count", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_set_enum(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::py3::simple::AnEnum p_in_enum) { ::py3::simple::SimpleService_set_enum_pargs args; args.get<0>().value = &p_in_enum; 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, "set_enum", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_set_enum(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( "set_enum", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_list_of_lists(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { ::py3::simple::SimpleService_list_of_lists_pargs args; args.get<0>().value = &p_num_lists; args.get<1>().value = &p_num_items; 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, "list_of_lists", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_list_of_lists(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( "list_of_lists", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_word_character_frequency(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::string& p_sentence) { ::py3::simple::SimpleService_word_character_frequency_pargs args; args.get<0>().value = const_cast<::std::string*>(&p_sentence); 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, "word_character_frequency", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_word_character_frequency(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( "word_character_frequency", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_list_of_sets(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::string& p_some_words) { ::py3::simple::SimpleService_list_of_sets_pargs args; args.get<0>().value = const_cast<::std::string*>(&p_some_words); 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, "list_of_sets", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_list_of_sets(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( "list_of_sets", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_nested_map_argument(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { ::py3::simple::SimpleService_nested_map_argument_pargs args; args.get<0>().value = const_cast<::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>*>(&p_struct_map); 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, "nested_map_argument", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_nested_map_argument(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( "nested_map_argument", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_make_sentence(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { ::py3::simple::SimpleService_make_sentence_pargs args; args.get<0>().value = const_cast<::std::vector<::std::vector<::std::string>>*>(&p_word_chars); 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, "make_sentence", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_make_sentence(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( "make_sentence", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_union(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { ::py3::simple::SimpleService_get_union_pargs args; args.get<0>().value = const_cast<::std::vector<::std::set<::std::int32_t>>*>(&p_sets); 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, "get_union", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_union(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( "get_union", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_keys(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { ::py3::simple::SimpleService_get_keys_pargs args; args.get<0>().value = const_cast<::std::vector<::std::map<::std::string, ::std::string>>*>(&p_string_map); 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, "get_keys", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_keys(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( "get_keys", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_lookup_double(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, ::std::int32_t p_key) { ::py3::simple::SimpleService_lookup_double_pargs args; args.get<0>().value = &p_key; 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, "lookup_double", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_lookup_double(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( "lookup_double", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_retrieve_binary(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::string& p_something) { ::py3::simple::SimpleService_retrieve_binary_pargs args; args.get<0>().value = const_cast<::std::string*>(&p_something); 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, "retrieve_binary", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_retrieve_binary(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( "retrieve_binary", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_contain_binary(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::std::string>& p_binaries) { ::py3::simple::SimpleService_contain_binary_pargs args; args.get<0>().value = const_cast<::std::vector<::std::string>*>(&p_binaries); 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, "contain_binary", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_contain_binary(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( "contain_binary", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_contain_enum(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { ::py3::simple::SimpleService_contain_enum_pargs args; args.get<0>().value = const_cast<::std::vector<::py3::simple::AnEnum>*>(&p_the_enum); 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, "contain_enum", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_contain_enum(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( "contain_enum", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_binary_union_struct(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack, const ::py3::simple::BinaryUnion& p_u) { ::py3::simple::SimpleService_get_binary_union_struct_pargs args; args.get<0>().value = const_cast<::py3::simple::BinaryUnion*>(&p_u); 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, "get_binary_union_struct", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_binary_union_struct(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( "get_binary_union_struct", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::fbthrift_serialize_get_struct_hidden(Protocol_* prot, const RpcOptions& rpcOptions, apache::thrift::transport::THeader& header, apache::thrift::ContextStack* contextStack) { ::py3::simple::SimpleService_get_struct_hidden_pargs args; 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, "get_struct_hidden", writer, sizer, channel_->getChecksumSamplingRate()); } template void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_send_get_struct_hidden(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( "get_struct_hidden", ::apache::thrift::FunctionQualifier::Unspecified, "SimpleService"); 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<::py3::simple::SimpleService>::get_five(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; get_five(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::get_five(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = get_fiveCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_five(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_five(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_five(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_get_five(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_five(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<::py3::simple::SimpleService>::get_fiveCtx(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(), "SimpleService.get_five", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_get_five() { ::apache::thrift::RpcOptions rpcOptions; return sync_get_five(rpcOptions); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_get_five(apache::thrift::RpcOptions& rpcOptions) { 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 = get_fiveCtx(&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_get_five(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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([&] { return recv_get_five(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_get_five() { ::apache::thrift::RpcOptions rpcOptions; return future_get_five(rpcOptions); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_five() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_five(rpcOptions); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_get_five(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_five, channel_); get_five(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_five(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_five, channel_); auto callback = std::move(callbackAndFuture.first); get_five(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_five(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_five, channel_); get_five(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_five(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_five, channel_); auto callback = std::move(callbackAndFuture.first); get_five(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_five(folly::Function callback) { get_five(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_five(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_get_five_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_get_five(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_get_five(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_five(::apache::thrift::ClientReceiveState& state) { return recv_get_five(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_five(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_five(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::add_five(std::unique_ptr callback, ::std::int32_t p_num) { ::apache::thrift::RpcOptions rpcOptions; add_five(rpcOptions, std::move(callback), p_num); } void apache::thrift::Client<::py3::simple::SimpleService>::add_five(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int32_t p_num) { auto [ctx, header] = add_fiveCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_add_five(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_num); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_add_five(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_num, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_add_five(&writer, rpcOptions, *header, contextStack, p_num); if (stealRpcOptions) { fbthrift_send_add_five(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_add_five(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<::py3::simple::SimpleService>::add_fiveCtx(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(), "SimpleService.add_five", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_add_five(::std::int32_t p_num) { ::apache::thrift::RpcOptions rpcOptions; return sync_add_five(rpcOptions, p_num); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_add_five(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_num) { 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 = add_fiveCtx(&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_add_five(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_num); }); #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([&] { return recv_add_five(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_add_five(::std::int32_t p_num) { ::apache::thrift::RpcOptions rpcOptions; return future_add_five(rpcOptions, p_num); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_add_five(::std::int32_t p_num) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_add_five(rpcOptions, p_num); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_add_five(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_num) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_add_five, channel_); add_five(rpcOptions, std::move(callback), p_num); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_add_five(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_num) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_add_five, channel_); auto callback = std::move(callbackAndFuture.first); add_five(rpcOptions, std::move(callback), p_num); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_add_five(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_num) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_add_five, channel_); add_five(rpcOptions, std::move(callback), p_num); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_add_five(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_num) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_add_five, channel_); auto callback = std::move(callbackAndFuture.first); add_five(rpcOptions, std::move(callback), p_num); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::add_five(folly::Function callback, ::std::int32_t p_num) { add_five(std::make_unique(std::move(callback)), p_num); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_add_five(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_add_five_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_add_five(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_add_five(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_add_five(::apache::thrift::ClientReceiveState& state) { return recv_add_five(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_add_five(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_add_five(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::do_nothing(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; do_nothing(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::do_nothing(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = do_nothingCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_do_nothing(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_do_nothing(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_do_nothing(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_do_nothing(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_do_nothing(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<::py3::simple::SimpleService>::do_nothingCtx(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(), "SimpleService.do_nothing", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_do_nothing() { ::apache::thrift::RpcOptions rpcOptions; sync_do_nothing(rpcOptions); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_do_nothing(apache::thrift::RpcOptions& rpcOptions) { 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 = do_nothingCtx(&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_do_nothing(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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_do_nothing(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_do_nothing() { ::apache::thrift::RpcOptions rpcOptions; return future_do_nothing(rpcOptions); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_do_nothing() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_do_nothing(rpcOptions); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_do_nothing(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_do_nothing, channel_); do_nothing(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_do_nothing(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_do_nothing, channel_); auto callback = std::move(callbackAndFuture.first); do_nothing(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_do_nothing(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_do_nothing, channel_); do_nothing(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_do_nothing(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_do_nothing, channel_); auto callback = std::move(callbackAndFuture.first); do_nothing(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::do_nothing(folly::Function callback) { do_nothing(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_do_nothing(::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 = ::py3::simple::SimpleService_do_nothing_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<::py3::simple::SimpleService>::recv_do_nothing(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_do_nothing(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_do_nothing(::apache::thrift::ClientReceiveState& state) { recv_do_nothing(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_do_nothing(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_do_nothing(state); } void apache::thrift::Client<::py3::simple::SimpleService>::concat(std::unique_ptr callback, const ::std::string& p_first, const ::std::string& p_second) { ::apache::thrift::RpcOptions rpcOptions; concat(rpcOptions, std::move(callback), p_first, p_second); } void apache::thrift::Client<::py3::simple::SimpleService>::concat(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::string& p_first, const ::std::string& p_second) { auto [ctx, header] = concatCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_concat(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_first, p_second); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_concat(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_first, const ::std::string& p_second, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_concat(&writer, rpcOptions, *header, contextStack, p_first, p_second); if (stealRpcOptions) { fbthrift_send_concat(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_concat(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<::py3::simple::SimpleService>::concatCtx(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(), "SimpleService.concat", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_concat(::std::string& _return, const ::std::string& p_first, const ::std::string& p_second) { ::apache::thrift::RpcOptions rpcOptions; sync_concat(rpcOptions, _return, p_first, p_second); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_concat(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_first, const ::std::string& p_second) { 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 = concatCtx(&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_concat(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_first, p_second); }); #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_concat(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_concat(const ::std::string& p_first, const ::std::string& p_second) { ::apache::thrift::RpcOptions rpcOptions; return future_concat(rpcOptions, p_first, p_second); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_concat(const ::std::string& p_first, const ::std::string& p_second) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_concat(rpcOptions, p_first, p_second); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_concat(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_first, const ::std::string& p_second) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_concat, channel_); concat(rpcOptions, std::move(callback), p_first, p_second); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_concat(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_first, const ::std::string& p_second) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_concat, channel_); auto callback = std::move(callbackAndFuture.first); concat(rpcOptions, std::move(callback), p_first, p_second); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_concat(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_first, const ::std::string& p_second) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_concat, channel_); concat(rpcOptions, std::move(callback), p_first, p_second); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_concat(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_first, const ::std::string& p_second) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_concat, channel_); auto callback = std::move(callbackAndFuture.first); concat(rpcOptions, std::move(callback), p_first, p_second); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::concat(folly::Function callback, const ::std::string& p_first, const ::std::string& p_second) { concat(std::make_unique(std::move(callback)), p_first, p_second); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_concat(::std::string& _return, ::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 = ::py3::simple::SimpleService_concat_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_concat(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_concat(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_concat(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_concat(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_concat(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_concat(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_value(std::unique_ptr callback, const ::py3::simple::SimpleStruct& p_simple_struct) { ::apache::thrift::RpcOptions rpcOptions; get_value(rpcOptions, std::move(callback), p_simple_struct); } void apache::thrift::Client<::py3::simple::SimpleService>::get_value(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::py3::simple::SimpleStruct& p_simple_struct) { auto [ctx, header] = get_valueCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_value(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_simple_struct); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_value(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::py3::simple::SimpleStruct& p_simple_struct, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_value(&writer, rpcOptions, *header, contextStack, p_simple_struct); if (stealRpcOptions) { fbthrift_send_get_value(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_value(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<::py3::simple::SimpleService>::get_valueCtx(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(), "SimpleService.get_value", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_get_value(const ::py3::simple::SimpleStruct& p_simple_struct) { ::apache::thrift::RpcOptions rpcOptions; return sync_get_value(rpcOptions, p_simple_struct); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_get_value(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::SimpleStruct& p_simple_struct) { 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 = get_valueCtx(&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_get_value(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_simple_struct); }); #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([&] { return recv_get_value(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_get_value(const ::py3::simple::SimpleStruct& p_simple_struct) { ::apache::thrift::RpcOptions rpcOptions; return future_get_value(rpcOptions, p_simple_struct); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_value(const ::py3::simple::SimpleStruct& p_simple_struct) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_value(rpcOptions, p_simple_struct); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_get_value(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::SimpleStruct& p_simple_struct) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_value, channel_); get_value(rpcOptions, std::move(callback), p_simple_struct); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_value(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::SimpleStruct& p_simple_struct) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_value, channel_); auto callback = std::move(callbackAndFuture.first); get_value(rpcOptions, std::move(callback), p_simple_struct); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_value(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::SimpleStruct& p_simple_struct) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_value, channel_); get_value(rpcOptions, std::move(callback), p_simple_struct); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_value(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::SimpleStruct& p_simple_struct) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_value, channel_); auto callback = std::move(callbackAndFuture.first); get_value(rpcOptions, std::move(callback), p_simple_struct); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_value(folly::Function callback, const ::py3::simple::SimpleStruct& p_simple_struct) { get_value(std::make_unique(std::move(callback)), p_simple_struct); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_value(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_get_value_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_get_value(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_get_value(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_value(::apache::thrift::ClientReceiveState& state) { return recv_get_value(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_value(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_value(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::negate(std::unique_ptr callback, bool p_input) { ::apache::thrift::RpcOptions rpcOptions; negate(rpcOptions, std::move(callback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::negate(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, bool p_input) { auto [ctx, header] = negateCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_negate(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_negate(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool p_input, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_negate(&writer, rpcOptions, *header, contextStack, p_input); if (stealRpcOptions) { fbthrift_send_negate(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_negate(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<::py3::simple::SimpleService>::negateCtx(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(), "SimpleService.negate", *header); return {std::move(ctx), std::move(header)}; } bool apache::thrift::Client<::py3::simple::SimpleService>::sync_negate(bool p_input) { ::apache::thrift::RpcOptions rpcOptions; return sync_negate(rpcOptions, p_input); } bool apache::thrift::Client<::py3::simple::SimpleService>::sync_negate(apache::thrift::RpcOptions& rpcOptions, bool p_input) { 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 = negateCtx(&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_negate(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_input); }); #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([&] { return recv_negate(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_negate(bool p_input) { ::apache::thrift::RpcOptions rpcOptions; return future_negate(rpcOptions, p_input); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_negate(bool p_input) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_negate(rpcOptions, p_input); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_negate(apache::thrift::RpcOptions& rpcOptions, bool p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_negate, channel_); negate(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_negate(apache::thrift::RpcOptions& rpcOptions, bool p_input) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_negate, channel_); auto callback = std::move(callbackAndFuture.first); negate(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_negate(apache::thrift::RpcOptions& rpcOptions, bool p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_negate, channel_); negate(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_negate(apache::thrift::RpcOptions& rpcOptions, bool p_input) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_negate, channel_); auto callback = std::move(callbackAndFuture.first); negate(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::negate(folly::Function callback, bool p_input) { negate(std::make_unique(std::move(callback)), p_input); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_negate(bool& _return, ::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 = ::py3::simple::SimpleService_negate_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } bool apache::thrift::Client<::py3::simple::SimpleService>::recv_negate(::apache::thrift::ClientReceiveState& state) { bool _return; auto ew = recv_wrapped_negate(_return, state); if (ew) { ew.throw_exception(); } return _return; } bool apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_negate(::apache::thrift::ClientReceiveState& state) { return recv_negate(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_negate(bool& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_negate(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::tiny(std::unique_ptr callback, ::std::int8_t p_input) { ::apache::thrift::RpcOptions rpcOptions; tiny(rpcOptions, std::move(callback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::tiny(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int8_t p_input) { auto [ctx, header] = tinyCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_tiny(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_tiny(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int8_t p_input, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_tiny(&writer, rpcOptions, *header, contextStack, p_input); if (stealRpcOptions) { fbthrift_send_tiny(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_tiny(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<::py3::simple::SimpleService>::tinyCtx(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(), "SimpleService.tiny", *header); return {std::move(ctx), std::move(header)}; } ::std::int8_t apache::thrift::Client<::py3::simple::SimpleService>::sync_tiny(::std::int8_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return sync_tiny(rpcOptions, p_input); } ::std::int8_t apache::thrift::Client<::py3::simple::SimpleService>::sync_tiny(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_input) { 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 = tinyCtx(&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_tiny(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_input); }); #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([&] { return recv_tiny(returnState); }); } folly::Future<::std::int8_t> apache::thrift::Client<::py3::simple::SimpleService>::future_tiny(::std::int8_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return future_tiny(rpcOptions, p_input); } folly::SemiFuture<::std::int8_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_tiny(::std::int8_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_tiny(rpcOptions, p_input); } folly::Future<::std::int8_t> apache::thrift::Client<::py3::simple::SimpleService>::future_tiny(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int8_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_tiny, channel_); tiny(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int8_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_tiny(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_input) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_tiny, channel_); auto callback = std::move(callbackAndFuture.first); tiny(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_tiny(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_tiny, channel_); tiny(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_tiny(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_input) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_tiny, channel_); auto callback = std::move(callbackAndFuture.first); tiny(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::tiny(folly::Function callback, ::std::int8_t p_input) { tiny(std::make_unique(std::move(callback)), p_input); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_tiny(::std::int8_t& _return, ::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 = ::py3::simple::SimpleService_tiny_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int8_t apache::thrift::Client<::py3::simple::SimpleService>::recv_tiny(::apache::thrift::ClientReceiveState& state) { ::std::int8_t _return; auto ew = recv_wrapped_tiny(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int8_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_tiny(::apache::thrift::ClientReceiveState& state) { return recv_tiny(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_tiny(::std::int8_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_tiny(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::small(std::unique_ptr callback, ::std::int16_t p_input) { ::apache::thrift::RpcOptions rpcOptions; small(rpcOptions, std::move(callback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::small(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int16_t p_input) { auto [ctx, header] = smallCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_small(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_small(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_input, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_small(&writer, rpcOptions, *header, contextStack, p_input); if (stealRpcOptions) { fbthrift_send_small(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_small(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<::py3::simple::SimpleService>::smallCtx(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(), "SimpleService.small", *header); return {std::move(ctx), std::move(header)}; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_small(::std::int16_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return sync_small(rpcOptions, p_input); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_small(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_input) { 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 = smallCtx(&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_small(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_input); }); #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([&] { return recv_small(returnState); }); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_small(::std::int16_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return future_small(rpcOptions, p_input); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_small(::std::int16_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_small(rpcOptions, p_input); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_small(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int16_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_small, channel_); small(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_small(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_input) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_small, channel_); auto callback = std::move(callbackAndFuture.first); small(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_small(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_small, channel_); small(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_small(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_input) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_small, channel_); auto callback = std::move(callbackAndFuture.first); small(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::small(folly::Function callback, ::std::int16_t p_input) { small(std::make_unique(std::move(callback)), p_input); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_small(::std::int16_t& _return, ::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 = ::py3::simple::SimpleService_small_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_small(::apache::thrift::ClientReceiveState& state) { ::std::int16_t _return; auto ew = recv_wrapped_small(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_small(::apache::thrift::ClientReceiveState& state) { return recv_small(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_small(::std::int16_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_small(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::big(std::unique_ptr callback, ::std::int64_t p_input) { ::apache::thrift::RpcOptions rpcOptions; big(rpcOptions, std::move(callback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::big(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int64_t p_input) { auto [ctx, header] = bigCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_big(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_big(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int64_t p_input, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_big(&writer, rpcOptions, *header, contextStack, p_input); if (stealRpcOptions) { fbthrift_send_big(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_big(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<::py3::simple::SimpleService>::bigCtx(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(), "SimpleService.big", *header); return {std::move(ctx), std::move(header)}; } ::std::int64_t apache::thrift::Client<::py3::simple::SimpleService>::sync_big(::std::int64_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return sync_big(rpcOptions, p_input); } ::std::int64_t apache::thrift::Client<::py3::simple::SimpleService>::sync_big(apache::thrift::RpcOptions& rpcOptions, ::std::int64_t p_input) { 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 = bigCtx(&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_big(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_input); }); #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([&] { return recv_big(returnState); }); } folly::Future<::std::int64_t> apache::thrift::Client<::py3::simple::SimpleService>::future_big(::std::int64_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return future_big(rpcOptions, p_input); } folly::SemiFuture<::std::int64_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_big(::std::int64_t p_input) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_big(rpcOptions, p_input); } folly::Future<::std::int64_t> apache::thrift::Client<::py3::simple::SimpleService>::future_big(apache::thrift::RpcOptions& rpcOptions, ::std::int64_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int64_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_big, channel_); big(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int64_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_big(apache::thrift::RpcOptions& rpcOptions, ::std::int64_t p_input) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_big, channel_); auto callback = std::move(callbackAndFuture.first); big(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_big(apache::thrift::RpcOptions& rpcOptions, ::std::int64_t p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_big, channel_); big(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_big(apache::thrift::RpcOptions& rpcOptions, ::std::int64_t p_input) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_big, channel_); auto callback = std::move(callbackAndFuture.first); big(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::big(folly::Function callback, ::std::int64_t p_input) { big(std::make_unique(std::move(callback)), p_input); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_big(::std::int64_t& _return, ::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 = ::py3::simple::SimpleService_big_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int64_t apache::thrift::Client<::py3::simple::SimpleService>::recv_big(::apache::thrift::ClientReceiveState& state) { ::std::int64_t _return; auto ew = recv_wrapped_big(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int64_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_big(::apache::thrift::ClientReceiveState& state) { return recv_big(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_big(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_big(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::two(std::unique_ptr callback, double p_input) { ::apache::thrift::RpcOptions rpcOptions; two(rpcOptions, std::move(callback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::two(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, double p_input) { auto [ctx, header] = twoCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_two(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_input); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_two(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, double p_input, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_two(&writer, rpcOptions, *header, contextStack, p_input); if (stealRpcOptions) { fbthrift_send_two(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_two(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<::py3::simple::SimpleService>::twoCtx(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(), "SimpleService.two", *header); return {std::move(ctx), std::move(header)}; } double apache::thrift::Client<::py3::simple::SimpleService>::sync_two(double p_input) { ::apache::thrift::RpcOptions rpcOptions; return sync_two(rpcOptions, p_input); } double apache::thrift::Client<::py3::simple::SimpleService>::sync_two(apache::thrift::RpcOptions& rpcOptions, double p_input) { 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 = twoCtx(&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_two(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_input); }); #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([&] { return recv_two(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_two(double p_input) { ::apache::thrift::RpcOptions rpcOptions; return future_two(rpcOptions, p_input); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_two(double p_input) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_two(rpcOptions, p_input); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_two(apache::thrift::RpcOptions& rpcOptions, double p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_two, channel_); two(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_two(apache::thrift::RpcOptions& rpcOptions, double p_input) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_two, channel_); auto callback = std::move(callbackAndFuture.first); two(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_two(apache::thrift::RpcOptions& rpcOptions, double p_input) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_two, channel_); two(rpcOptions, std::move(callback), p_input); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_two(apache::thrift::RpcOptions& rpcOptions, double p_input) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_two, channel_); auto callback = std::move(callbackAndFuture.first); two(rpcOptions, std::move(callback), p_input); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::two(folly::Function callback, double p_input) { two(std::make_unique(std::move(callback)), p_input); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_two(double& _return, ::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 = ::py3::simple::SimpleService_two_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } double apache::thrift::Client<::py3::simple::SimpleService>::recv_two(::apache::thrift::ClientReceiveState& state) { double _return; auto ew = recv_wrapped_two(_return, state); if (ew) { ew.throw_exception(); } return _return; } double apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_two(::apache::thrift::ClientReceiveState& state) { return recv_two(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_two(double& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_two(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::expected_exception(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; expected_exception(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::expected_exception(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = expected_exceptionCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_expected_exception(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_expected_exception(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_expected_exception(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_expected_exception(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_expected_exception(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<::py3::simple::SimpleService>::expected_exceptionCtx(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(), "SimpleService.expected_exception", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_expected_exception() { ::apache::thrift::RpcOptions rpcOptions; sync_expected_exception(rpcOptions); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_expected_exception(apache::thrift::RpcOptions& rpcOptions) { 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 = expected_exceptionCtx(&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_expected_exception(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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_expected_exception(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_expected_exception() { ::apache::thrift::RpcOptions rpcOptions; return future_expected_exception(rpcOptions); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_expected_exception() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_expected_exception(rpcOptions); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_expected_exception(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_expected_exception, channel_); expected_exception(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_expected_exception(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_expected_exception, channel_); auto callback = std::move(callbackAndFuture.first); expected_exception(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_expected_exception(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_expected_exception, channel_); expected_exception(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_expected_exception(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_expected_exception, channel_); auto callback = std::move(callbackAndFuture.first); expected_exception(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::expected_exception(folly::Function callback) { expected_exception(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_expected_exception(::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 = ::py3::simple::SimpleService_expected_exception_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<::py3::simple::SimpleService>::recv_expected_exception(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_expected_exception(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_expected_exception(::apache::thrift::ClientReceiveState& state) { recv_expected_exception(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_expected_exception(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_expected_exception(state); } void apache::thrift::Client<::py3::simple::SimpleService>::unexpected_exception(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; unexpected_exception(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::unexpected_exception(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = unexpected_exceptionCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_unexpected_exception(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_unexpected_exception(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_unexpected_exception(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_unexpected_exception(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_unexpected_exception(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<::py3::simple::SimpleService>::unexpected_exceptionCtx(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(), "SimpleService.unexpected_exception", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_unexpected_exception() { ::apache::thrift::RpcOptions rpcOptions; return sync_unexpected_exception(rpcOptions); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_unexpected_exception(apache::thrift::RpcOptions& rpcOptions) { 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 = unexpected_exceptionCtx(&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_unexpected_exception(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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([&] { return recv_unexpected_exception(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_unexpected_exception() { ::apache::thrift::RpcOptions rpcOptions; return future_unexpected_exception(rpcOptions); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_unexpected_exception() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_unexpected_exception(rpcOptions); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_unexpected_exception(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_unexpected_exception, channel_); unexpected_exception(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_unexpected_exception(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_unexpected_exception, channel_); auto callback = std::move(callbackAndFuture.first); unexpected_exception(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_unexpected_exception(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_unexpected_exception, channel_); unexpected_exception(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_unexpected_exception(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_unexpected_exception, channel_); auto callback = std::move(callbackAndFuture.first); unexpected_exception(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::unexpected_exception(folly::Function callback) { unexpected_exception(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_unexpected_exception(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_unexpected_exception_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_unexpected_exception(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_unexpected_exception(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_unexpected_exception(::apache::thrift::ClientReceiveState& state) { return recv_unexpected_exception(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_unexpected_exception(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_unexpected_exception(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i16_list(std::unique_ptr callback, const ::std::vector<::std::int16_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; sum_i16_list(rpcOptions, std::move(callback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i16_list(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::int16_t>& p_numbers) { auto [ctx, header] = sum_i16_listCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_sum_i16_list(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::int16_t>& p_numbers, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_sum_i16_list(&writer, rpcOptions, *header, contextStack, p_numbers); if (stealRpcOptions) { fbthrift_send_sum_i16_list(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_sum_i16_list(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<::py3::simple::SimpleService>::sum_i16_listCtx(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(), "SimpleService.sum_i16_list", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i16_list(const ::std::vector<::std::int16_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return sync_sum_i16_list(rpcOptions, p_numbers); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int16_t>& p_numbers) { 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 = sum_i16_listCtx(&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_sum_i16_list(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_numbers); }); #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([&] { return recv_sum_i16_list(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i16_list(const ::std::vector<::std::int16_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return future_sum_i16_list(rpcOptions, p_numbers); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i16_list(const ::std::vector<::std::int16_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_sum_i16_list(rpcOptions, p_numbers); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int16_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i16_list, channel_); sum_i16_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int16_t>& p_numbers) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_sum_i16_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i16_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int16_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i16_list, channel_); sum_i16_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_sum_i16_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int16_t>& p_numbers) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_sum_i16_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i16_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i16_list(folly::Function callback, const ::std::vector<::std::int16_t>& p_numbers) { sum_i16_list(std::make_unique(std::move(callback)), p_numbers); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_sum_i16_list(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_sum_i16_list_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_sum_i16_list(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_sum_i16_list(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_sum_i16_list(::apache::thrift::ClientReceiveState& state) { return recv_sum_i16_list(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_sum_i16_list(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_sum_i16_list(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i32_list(std::unique_ptr callback, const ::std::vector<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; sum_i32_list(rpcOptions, std::move(callback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i32_list(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::int32_t>& p_numbers) { auto [ctx, header] = sum_i32_listCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_sum_i32_list(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::int32_t>& p_numbers, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_sum_i32_list(&writer, rpcOptions, *header, contextStack, p_numbers); if (stealRpcOptions) { fbthrift_send_sum_i32_list(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_sum_i32_list(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<::py3::simple::SimpleService>::sum_i32_listCtx(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(), "SimpleService.sum_i32_list", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i32_list(const ::std::vector<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return sync_sum_i32_list(rpcOptions, p_numbers); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int32_t>& p_numbers) { 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 = sum_i32_listCtx(&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_sum_i32_list(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_numbers); }); #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([&] { return recv_sum_i32_list(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i32_list(const ::std::vector<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return future_sum_i32_list(rpcOptions, p_numbers); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i32_list(const ::std::vector<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_sum_i32_list(rpcOptions, p_numbers); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int32_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i32_list, channel_); sum_i32_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int32_t>& p_numbers) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_sum_i32_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i32_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int32_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i32_list, channel_); sum_i32_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_sum_i32_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int32_t>& p_numbers) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_sum_i32_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i32_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i32_list(folly::Function callback, const ::std::vector<::std::int32_t>& p_numbers) { sum_i32_list(std::make_unique(std::move(callback)), p_numbers); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_sum_i32_list(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_sum_i32_list_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_sum_i32_list(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_sum_i32_list(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_sum_i32_list(::apache::thrift::ClientReceiveState& state) { return recv_sum_i32_list(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_sum_i32_list(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_sum_i32_list(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i64_list(std::unique_ptr callback, const ::std::vector<::std::int64_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; sum_i64_list(rpcOptions, std::move(callback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i64_list(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::int64_t>& p_numbers) { auto [ctx, header] = sum_i64_listCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_sum_i64_list(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::int64_t>& p_numbers, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_sum_i64_list(&writer, rpcOptions, *header, contextStack, p_numbers); if (stealRpcOptions) { fbthrift_send_sum_i64_list(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_sum_i64_list(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<::py3::simple::SimpleService>::sum_i64_listCtx(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(), "SimpleService.sum_i64_list", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i64_list(const ::std::vector<::std::int64_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return sync_sum_i64_list(rpcOptions, p_numbers); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int64_t>& p_numbers) { 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 = sum_i64_listCtx(&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_sum_i64_list(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_numbers); }); #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([&] { return recv_sum_i64_list(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i64_list(const ::std::vector<::std::int64_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return future_sum_i64_list(rpcOptions, p_numbers); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i64_list(const ::std::vector<::std::int64_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_sum_i64_list(rpcOptions, p_numbers); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int64_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i64_list, channel_); sum_i64_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int64_t>& p_numbers) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_sum_i64_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i64_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int64_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_i64_list, channel_); sum_i64_list(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_sum_i64_list(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::int64_t>& p_numbers) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_sum_i64_list, channel_); auto callback = std::move(callbackAndFuture.first); sum_i64_list(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_i64_list(folly::Function callback, const ::std::vector<::std::int64_t>& p_numbers) { sum_i64_list(std::make_unique(std::move(callback)), p_numbers); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_sum_i64_list(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_sum_i64_list_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_sum_i64_list(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_sum_i64_list(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_sum_i64_list(::apache::thrift::ClientReceiveState& state) { return recv_sum_i64_list(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_sum_i64_list(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_sum_i64_list(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::concat_many(std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; concat_many(rpcOptions, std::move(callback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::concat_many(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { auto [ctx, header] = concat_manyCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_concat_many(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_concat_many(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_words, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_concat_many(&writer, rpcOptions, *header, contextStack, p_words); if (stealRpcOptions) { fbthrift_send_concat_many(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_concat_many(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<::py3::simple::SimpleService>::concat_manyCtx(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(), "SimpleService.concat_many", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_concat_many(::std::string& _return, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; sync_concat_many(rpcOptions, _return, p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_concat_many(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::vector<::std::string>& p_words) { 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 = concat_manyCtx(&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_concat_many(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_words); }); #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_concat_many(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_concat_many(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return future_concat_many(rpcOptions, p_words); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_concat_many(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_concat_many(rpcOptions, p_words); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_concat_many(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_concat_many, channel_); concat_many(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_concat_many(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_concat_many, channel_); auto callback = std::move(callbackAndFuture.first); concat_many(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_concat_many(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_concat_many, channel_); concat_many(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_concat_many(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_concat_many, channel_); auto callback = std::move(callbackAndFuture.first); concat_many(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::concat_many(folly::Function callback, const ::std::vector<::std::string>& p_words) { concat_many(std::make_unique(std::move(callback)), p_words); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_concat_many(::std::string& _return, ::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 = ::py3::simple::SimpleService_concat_many_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_concat_many(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_concat_many(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_concat_many(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_concat_many(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_concat_many(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_concat_many(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::count_structs(std::unique_ptr callback, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; count_structs(rpcOptions, std::move(callback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::count_structs(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { auto [ctx, header] = count_structsCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_count_structs(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_count_structs(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::py3::simple::SimpleStruct>& p_items, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_count_structs(&writer, rpcOptions, *header, contextStack, p_items); if (stealRpcOptions) { fbthrift_send_count_structs(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_count_structs(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<::py3::simple::SimpleService>::count_structsCtx(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(), "SimpleService.count_structs", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_count_structs(const ::std::vector<::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return sync_count_structs(rpcOptions, p_items); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_count_structs(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { 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 = count_structsCtx(&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_count_structs(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_items); }); #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([&] { return recv_count_structs(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_count_structs(const ::std::vector<::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return future_count_structs(rpcOptions, p_items); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_count_structs(const ::std::vector<::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_count_structs(rpcOptions, p_items); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_count_structs(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_count_structs, channel_); count_structs(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_count_structs(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_count_structs, channel_); auto callback = std::move(callbackAndFuture.first); count_structs(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_count_structs(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_count_structs, channel_); count_structs(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_count_structs(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_count_structs, channel_); auto callback = std::move(callbackAndFuture.first); count_structs(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::count_structs(folly::Function callback, const ::std::vector<::py3::simple::SimpleStruct>& p_items) { count_structs(std::make_unique(std::move(callback)), p_items); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_count_structs(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_count_structs_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_count_structs(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_count_structs(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_count_structs(::apache::thrift::ClientReceiveState& state) { return recv_count_structs(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_count_structs(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_count_structs(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_set(std::unique_ptr callback, const ::std::set<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; sum_set(rpcOptions, std::move(callback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_set(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::set<::std::int32_t>& p_numbers) { auto [ctx, header] = sum_setCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_sum_set(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_numbers); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_sum_set(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::std::int32_t>& p_numbers, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_sum_set(&writer, rpcOptions, *header, contextStack, p_numbers); if (stealRpcOptions) { fbthrift_send_sum_set(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_sum_set(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<::py3::simple::SimpleService>::sum_setCtx(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(), "SimpleService.sum_set", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_set(const ::std::set<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return sync_sum_set(rpcOptions, p_numbers); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_set(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::int32_t>& p_numbers) { 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 = sum_setCtx(&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_sum_set(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_numbers); }); #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([&] { return recv_sum_set(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_set(const ::std::set<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return future_sum_set(rpcOptions, p_numbers); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_set(const ::std::set<::std::int32_t>& p_numbers) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_sum_set(rpcOptions, p_numbers); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_set(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::int32_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_set, channel_); sum_set(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_set(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::int32_t>& p_numbers) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_sum_set, channel_); auto callback = std::move(callbackAndFuture.first); sum_set(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_sum_set(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::int32_t>& p_numbers) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_set, channel_); sum_set(rpcOptions, std::move(callback), p_numbers); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_sum_set(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::int32_t>& p_numbers) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_sum_set, channel_); auto callback = std::move(callbackAndFuture.first); sum_set(rpcOptions, std::move(callback), p_numbers); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_set(folly::Function callback, const ::std::set<::std::int32_t>& p_numbers) { sum_set(std::make_unique(std::move(callback)), p_numbers); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_sum_set(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_sum_set_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_sum_set(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_sum_set(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_sum_set(::apache::thrift::ClientReceiveState& state) { return recv_sum_set(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_sum_set(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_sum_set(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::contains_word(std::unique_ptr callback, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { ::apache::thrift::RpcOptions rpcOptions; contains_word(rpcOptions, std::move(callback), p_words, p_word); } void apache::thrift::Client<::py3::simple::SimpleService>::contains_word(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { auto [ctx, header] = contains_wordCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_contains_word(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_words, p_word); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_contains_word(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::std::string>& p_words, const ::std::string& p_word, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_contains_word(&writer, rpcOptions, *header, contextStack, p_words, p_word); if (stealRpcOptions) { fbthrift_send_contains_word(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_contains_word(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<::py3::simple::SimpleService>::contains_wordCtx(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(), "SimpleService.contains_word", *header); return {std::move(ctx), std::move(header)}; } bool apache::thrift::Client<::py3::simple::SimpleService>::sync_contains_word(const ::std::set<::std::string>& p_words, const ::std::string& p_word) { ::apache::thrift::RpcOptions rpcOptions; return sync_contains_word(rpcOptions, p_words, p_word); } bool apache::thrift::Client<::py3::simple::SimpleService>::sync_contains_word(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { 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 = contains_wordCtx(&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_contains_word(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_words, p_word); }); #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([&] { return recv_contains_word(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_contains_word(const ::std::set<::std::string>& p_words, const ::std::string& p_word) { ::apache::thrift::RpcOptions rpcOptions; return future_contains_word(rpcOptions, p_words, p_word); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contains_word(const ::std::set<::std::string>& p_words, const ::std::string& p_word) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_contains_word(rpcOptions, p_words, p_word); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_contains_word(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_contains_word, channel_); contains_word(rpcOptions, std::move(callback), p_words, p_word); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contains_word(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_contains_word, channel_); auto callback = std::move(callbackAndFuture.first); contains_word(rpcOptions, std::move(callback), p_words, p_word); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_contains_word(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_contains_word, channel_); contains_word(rpcOptions, std::move(callback), p_words, p_word); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_contains_word(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_contains_word, channel_); auto callback = std::move(callbackAndFuture.first); contains_word(rpcOptions, std::move(callback), p_words, p_word); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::contains_word(folly::Function callback, const ::std::set<::std::string>& p_words, const ::std::string& p_word) { contains_word(std::make_unique(std::move(callback)), p_words, p_word); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_contains_word(bool& _return, ::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 = ::py3::simple::SimpleService_contains_word_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } bool apache::thrift::Client<::py3::simple::SimpleService>::recv_contains_word(::apache::thrift::ClientReceiveState& state) { bool _return; auto ew = recv_wrapped_contains_word(_return, state); if (ew) { ew.throw_exception(); } return _return; } bool apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_contains_word(::apache::thrift::ClientReceiveState& state) { return recv_contains_word(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_contains_word(bool& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_contains_word(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_map_value(std::unique_ptr callback, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { ::apache::thrift::RpcOptions rpcOptions; get_map_value(rpcOptions, std::move(callback), p_words, p_key); } void apache::thrift::Client<::py3::simple::SimpleService>::get_map_value(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { auto [ctx, header] = get_map_valueCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_map_value(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_words, p_key); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_map_value(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_map_value(&writer, rpcOptions, *header, contextStack, p_words, p_key); if (stealRpcOptions) { fbthrift_send_get_map_value(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_map_value(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<::py3::simple::SimpleService>::get_map_valueCtx(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(), "SimpleService.get_map_value", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_map_value(::std::string& _return, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { ::apache::thrift::RpcOptions rpcOptions; sync_get_map_value(rpcOptions, _return, p_words, p_key); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_map_value(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { 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 = get_map_valueCtx(&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_get_map_value(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_words, p_key); }); #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_get_map_value(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_get_map_value(const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { ::apache::thrift::RpcOptions rpcOptions; return future_get_map_value(rpcOptions, p_words, p_key); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_map_value(const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_map_value(rpcOptions, p_words, p_key); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_get_map_value(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_map_value, channel_); get_map_value(rpcOptions, std::move(callback), p_words, p_key); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_map_value(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_map_value, channel_); auto callback = std::move(callbackAndFuture.first); get_map_value(rpcOptions, std::move(callback), p_words, p_key); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_map_value(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_map_value, channel_); get_map_value(rpcOptions, std::move(callback), p_words, p_key); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_map_value(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_map_value, channel_); auto callback = std::move(callbackAndFuture.first); get_map_value(rpcOptions, std::move(callback), p_words, p_key); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_map_value(folly::Function callback, const ::std::map<::std::string, ::std::string>& p_words, const ::std::string& p_key) { get_map_value(std::make_unique(std::move(callback)), p_words, p_key); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_map_value(::std::string& _return, ::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 = ::py3::simple::SimpleService_get_map_value_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_map_value(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_map_value(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_map_value(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_map_value(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_map_value(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_map_value(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::map_length(std::unique_ptr callback, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; map_length(rpcOptions, std::move(callback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::map_length(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { auto [ctx, header] = map_lengthCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_map_length(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_map_length(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_map_length(&writer, rpcOptions, *header, contextStack, p_items); if (stealRpcOptions) { fbthrift_send_map_length(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_map_length(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<::py3::simple::SimpleService>::map_lengthCtx(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(), "SimpleService.map_length", *header); return {std::move(ctx), std::move(header)}; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_map_length(const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return sync_map_length(rpcOptions, p_items); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_map_length(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { 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 = map_lengthCtx(&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_map_length(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_items); }); #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([&] { return recv_map_length(returnState); }); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_map_length(const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return future_map_length(rpcOptions, p_items); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_map_length(const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_map_length(rpcOptions, p_items); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_map_length(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int16_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_map_length, channel_); map_length(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_map_length(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_map_length, channel_); auto callback = std::move(callbackAndFuture.first); map_length(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_map_length(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_map_length, channel_); map_length(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_map_length(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_map_length, channel_); auto callback = std::move(callbackAndFuture.first); map_length(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::map_length(folly::Function callback, const ::std::map<::std::string, ::py3::simple::SimpleStruct>& p_items) { map_length(std::make_unique(std::move(callback)), p_items); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_map_length(::std::int16_t& _return, ::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 = ::py3::simple::SimpleService_map_length_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_map_length(::apache::thrift::ClientReceiveState& state) { ::std::int16_t _return; auto ew = recv_wrapped_map_length(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_map_length(::apache::thrift::ClientReceiveState& state) { return recv_map_length(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_map_length(::std::int16_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_map_length(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_map_values(std::unique_ptr callback, const ::std::map<::std::string, ::std::int16_t>& p_items) { ::apache::thrift::RpcOptions rpcOptions; sum_map_values(rpcOptions, std::move(callback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_map_values(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::string, ::std::int16_t>& p_items) { auto [ctx, header] = sum_map_valuesCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_sum_map_values(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_items); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_sum_map_values(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int16_t>& p_items, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_sum_map_values(&writer, rpcOptions, *header, contextStack, p_items); if (stealRpcOptions) { fbthrift_send_sum_map_values(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_sum_map_values(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<::py3::simple::SimpleService>::sum_map_valuesCtx(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(), "SimpleService.sum_map_values", *header); return {std::move(ctx), std::move(header)}; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_map_values(const ::std::map<::std::string, ::std::int16_t>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return sync_sum_map_values(rpcOptions, p_items); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::sync_sum_map_values(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int16_t>& p_items) { 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 = sum_map_valuesCtx(&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_sum_map_values(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_items); }); #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([&] { return recv_sum_map_values(returnState); }); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_map_values(const ::std::map<::std::string, ::std::int16_t>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return future_sum_map_values(rpcOptions, p_items); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_map_values(const ::std::map<::std::string, ::std::int16_t>& p_items) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_sum_map_values(rpcOptions, p_items); } folly::Future<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::future_sum_map_values(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int16_t>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int16_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_map_values, channel_); sum_map_values(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int16_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_sum_map_values(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int16_t>& p_items) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_sum_map_values, channel_); auto callback = std::move(callbackAndFuture.first); sum_map_values(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_sum_map_values(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int16_t>& p_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_sum_map_values, channel_); sum_map_values(rpcOptions, std::move(callback), p_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_sum_map_values(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int16_t>& p_items) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_sum_map_values, channel_); auto callback = std::move(callbackAndFuture.first); sum_map_values(rpcOptions, std::move(callback), p_items); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::sum_map_values(folly::Function callback, const ::std::map<::std::string, ::std::int16_t>& p_items) { sum_map_values(std::make_unique(std::move(callback)), p_items); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_sum_map_values(::std::int16_t& _return, ::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 = ::py3::simple::SimpleService_sum_map_values_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_sum_map_values(::apache::thrift::ClientReceiveState& state) { ::std::int16_t _return; auto ew = recv_wrapped_sum_map_values(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int16_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_sum_map_values(::apache::thrift::ClientReceiveState& state) { return recv_sum_map_values(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_sum_map_values(::std::int16_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_sum_map_values(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::complex_sum_i32(std::unique_ptr callback, const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; complex_sum_i32(rpcOptions, std::move(callback), p_counter); } void apache::thrift::Client<::py3::simple::SimpleService>::complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::py3::simple::ComplexStruct& p_counter) { auto [ctx, header] = complex_sum_i32Ctx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_complex_sum_i32(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_counter); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::py3::simple::ComplexStruct& p_counter, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_complex_sum_i32(&writer, rpcOptions, *header, contextStack, p_counter); if (stealRpcOptions) { fbthrift_send_complex_sum_i32(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_complex_sum_i32(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<::py3::simple::SimpleService>::complex_sum_i32Ctx(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(), "SimpleService.complex_sum_i32", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_complex_sum_i32(const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; return sync_complex_sum_i32(rpcOptions, p_counter); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { 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 = complex_sum_i32Ctx(&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_complex_sum_i32(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_counter); }); #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([&] { return recv_complex_sum_i32(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_complex_sum_i32(const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; return future_complex_sum_i32(rpcOptions, p_counter); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_complex_sum_i32(const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_complex_sum_i32(rpcOptions, p_counter); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_complex_sum_i32, channel_); complex_sum_i32(rpcOptions, std::move(callback), p_counter); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_complex_sum_i32, channel_); auto callback = std::move(callbackAndFuture.first); complex_sum_i32(rpcOptions, std::move(callback), p_counter); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_complex_sum_i32, channel_); complex_sum_i32(rpcOptions, std::move(callback), p_counter); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_complex_sum_i32(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_complex_sum_i32, channel_); auto callback = std::move(callbackAndFuture.first); complex_sum_i32(rpcOptions, std::move(callback), p_counter); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::complex_sum_i32(folly::Function callback, const ::py3::simple::ComplexStruct& p_counter) { complex_sum_i32(std::make_unique(std::move(callback)), p_counter); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_complex_sum_i32(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_complex_sum_i32_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_complex_sum_i32(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_complex_sum_i32(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_complex_sum_i32(::apache::thrift::ClientReceiveState& state) { return recv_complex_sum_i32(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_complex_sum_i32(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_complex_sum_i32(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::repeat_name(std::unique_ptr callback, const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; repeat_name(rpcOptions, std::move(callback), p_counter); } void apache::thrift::Client<::py3::simple::SimpleService>::repeat_name(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::py3::simple::ComplexStruct& p_counter) { auto [ctx, header] = repeat_nameCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_repeat_name(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_counter); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_repeat_name(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::py3::simple::ComplexStruct& p_counter, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_repeat_name(&writer, rpcOptions, *header, contextStack, p_counter); if (stealRpcOptions) { fbthrift_send_repeat_name(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_repeat_name(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<::py3::simple::SimpleService>::repeat_nameCtx(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(), "SimpleService.repeat_name", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_repeat_name(::std::string& _return, const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; sync_repeat_name(rpcOptions, _return, p_counter); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_repeat_name(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::py3::simple::ComplexStruct& p_counter) { 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 = repeat_nameCtx(&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_repeat_name(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_counter); }); #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_repeat_name(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_repeat_name(const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; return future_repeat_name(rpcOptions, p_counter); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_repeat_name(const ::py3::simple::ComplexStruct& p_counter) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_repeat_name(rpcOptions, p_counter); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_repeat_name(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_repeat_name, channel_); repeat_name(rpcOptions, std::move(callback), p_counter); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_repeat_name(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_repeat_name, channel_); auto callback = std::move(callbackAndFuture.first); repeat_name(rpcOptions, std::move(callback), p_counter); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_repeat_name(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_repeat_name, channel_); repeat_name(rpcOptions, std::move(callback), p_counter); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_repeat_name(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::ComplexStruct& p_counter) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_repeat_name, channel_); auto callback = std::move(callbackAndFuture.first); repeat_name(rpcOptions, std::move(callback), p_counter); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::repeat_name(folly::Function callback, const ::py3::simple::ComplexStruct& p_counter) { repeat_name(std::make_unique(std::move(callback)), p_counter); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_repeat_name(::std::string& _return, ::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 = ::py3::simple::SimpleService_repeat_name_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_repeat_name(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_repeat_name(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_repeat_name(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_repeat_name(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_repeat_name(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_repeat_name(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; get_struct(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = get_structCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_struct(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_struct(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_struct(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_get_struct(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_struct(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<::py3::simple::SimpleService>::get_structCtx(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(), "SimpleService.get_struct", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_struct(::py3::simple::SimpleStruct& _return) { ::apache::thrift::RpcOptions rpcOptions; sync_get_struct(rpcOptions, _return); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_struct(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::SimpleStruct& _return) { 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 = get_structCtx(&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_get_struct(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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_get_struct(_return, returnState); }); } folly::Future<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_struct() { ::apache::thrift::RpcOptions rpcOptions; return future_get_struct(rpcOptions); } folly::SemiFuture<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_struct() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_struct(rpcOptions); } folly::Future<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_struct(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::py3::simple::SimpleStruct>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_struct, channel_); get_struct(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_struct(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_struct, channel_); auto callback = std::move(callbackAndFuture.first); get_struct(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_struct(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_struct, channel_); get_struct(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_struct(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_struct, channel_); auto callback = std::move(callbackAndFuture.first); get_struct(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct(folly::Function callback) { get_struct(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_struct(::py3::simple::SimpleStruct& _return, ::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 = ::py3::simple::SimpleService_get_struct_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_struct(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_struct(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_struct(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_struct(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_struct(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_struct(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::fib(std::unique_ptr callback, ::std::int16_t p_n) { ::apache::thrift::RpcOptions rpcOptions; fib(rpcOptions, std::move(callback), p_n); } void apache::thrift::Client<::py3::simple::SimpleService>::fib(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int16_t p_n) { auto [ctx, header] = fibCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_fib(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_n); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_fib(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_n, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_fib(&writer, rpcOptions, *header, contextStack, p_n); if (stealRpcOptions) { fbthrift_send_fib(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_fib(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<::py3::simple::SimpleService>::fibCtx(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(), "SimpleService.fib", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_fib(::std::vector<::std::int32_t>& _return, ::std::int16_t p_n) { ::apache::thrift::RpcOptions rpcOptions; sync_fib(rpcOptions, _return, p_n); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_fib(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::std::int32_t>& _return, ::std::int16_t p_n) { 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 = fibCtx(&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_fib(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_n); }); #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_fib(_return, returnState); }); } folly::Future<::std::vector<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_fib(::std::int16_t p_n) { ::apache::thrift::RpcOptions rpcOptions; return future_fib(rpcOptions, p_n); } folly::SemiFuture<::std::vector<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_fib(::std::int16_t p_n) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_fib(rpcOptions, p_n); } folly::Future<::std::vector<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_fib(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_n) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::vector<::std::int32_t>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_fib, channel_); fib(rpcOptions, std::move(callback), p_n); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::vector<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_fib(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_n) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_fib, channel_); auto callback = std::move(callbackAndFuture.first); fib(rpcOptions, std::move(callback), p_n); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_fib(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_n) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_fib, channel_); fib(rpcOptions, std::move(callback), p_n); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_fib(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_n) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_fib, channel_); auto callback = std::move(callbackAndFuture.first); fib(rpcOptions, std::move(callback), p_n); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::fib(folly::Function callback, ::std::int16_t p_n) { fib(std::make_unique(std::move(callback)), p_n); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_fib(::std::vector<::std::int32_t>& _return, ::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 = ::py3::simple::SimpleService_fib_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_fib(::std::vector<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_fib(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_fib(::std::vector<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_fib(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_fib(::std::vector<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_fib(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::unique_words(std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; unique_words(rpcOptions, std::move(callback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::unique_words(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { auto [ctx, header] = unique_wordsCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_unique_words(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_unique_words(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_words, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_unique_words(&writer, rpcOptions, *header, contextStack, p_words); if (stealRpcOptions) { fbthrift_send_unique_words(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_unique_words(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<::py3::simple::SimpleService>::unique_wordsCtx(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(), "SimpleService.unique_words", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_unique_words(::std::set<::std::string>& _return, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; sync_unique_words(rpcOptions, _return, p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_unique_words(apache::thrift::RpcOptions& rpcOptions, ::std::set<::std::string>& _return, const ::std::vector<::std::string>& p_words) { 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 = unique_wordsCtx(&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_unique_words(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_words); }); #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_unique_words(_return, returnState); }); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_unique_words(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return future_unique_words(rpcOptions, p_words); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_unique_words(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_unique_words(rpcOptions, p_words); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_unique_words(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::set<::std::string>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_unique_words, channel_); unique_words(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_unique_words(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_unique_words, channel_); auto callback = std::move(callbackAndFuture.first); unique_words(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_unique_words(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_unique_words, channel_); unique_words(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_unique_words(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_unique_words, channel_); auto callback = std::move(callbackAndFuture.first); unique_words(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::unique_words(folly::Function callback, const ::std::vector<::std::string>& p_words) { unique_words(std::make_unique(std::move(callback)), p_words); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_unique_words(::std::set<::std::string>& _return, ::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 = ::py3::simple::SimpleService_unique_words_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_unique_words(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_unique_words(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_unique_words(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_unique_words(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_unique_words(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_unique_words(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::words_count(std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; words_count(rpcOptions, std::move(callback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::words_count(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::string>& p_words) { auto [ctx, header] = words_countCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_words_count(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_words_count(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_words, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_words_count(&writer, rpcOptions, *header, contextStack, p_words); if (stealRpcOptions) { fbthrift_send_words_count(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_words_count(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<::py3::simple::SimpleService>::words_countCtx(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(), "SimpleService.words_count", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_words_count(::std::map<::std::string, ::std::int16_t>& _return, const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; sync_words_count(rpcOptions, _return, p_words); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_words_count(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::int16_t>& _return, const ::std::vector<::std::string>& p_words) { 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 = words_countCtx(&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_words_count(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_words); }); #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_words_count(_return, returnState); }); } folly::Future<::std::map<::std::string, ::std::int16_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_words_count(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return future_words_count(rpcOptions, p_words); } folly::SemiFuture<::std::map<::std::string, ::std::int16_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_words_count(const ::std::vector<::std::string>& p_words) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_words_count(rpcOptions, p_words); } folly::Future<::std::map<::std::string, ::std::int16_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_words_count(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::map<::std::string, ::std::int16_t>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_words_count, channel_); words_count(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::map<::std::string, ::std::int16_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_words_count(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_words_count, channel_); auto callback = std::move(callbackAndFuture.first); words_count(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_words_count(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_words_count, channel_); words_count(rpcOptions, std::move(callback), p_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_words_count(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_words) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_words_count, channel_); auto callback = std::move(callbackAndFuture.first); words_count(rpcOptions, std::move(callback), p_words); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::words_count(folly::Function callback, const ::std::vector<::std::string>& p_words) { words_count(std::make_unique(std::move(callback)), p_words); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_words_count(::std::map<::std::string, ::std::int16_t>& _return, ::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 = ::py3::simple::SimpleService_words_count_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_words_count(::std::map<::std::string, ::std::int16_t>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_words_count(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_words_count(::std::map<::std::string, ::std::int16_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_words_count(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_words_count(::std::map<::std::string, ::std::int16_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_words_count(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::set_enum(std::unique_ptr callback, ::py3::simple::AnEnum p_in_enum) { ::apache::thrift::RpcOptions rpcOptions; set_enum(rpcOptions, std::move(callback), p_in_enum); } void apache::thrift::Client<::py3::simple::SimpleService>::set_enum(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::py3::simple::AnEnum p_in_enum) { auto [ctx, header] = set_enumCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_set_enum(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_in_enum); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_set_enum(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::py3::simple::AnEnum p_in_enum, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_set_enum(&writer, rpcOptions, *header, contextStack, p_in_enum); if (stealRpcOptions) { fbthrift_send_set_enum(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_set_enum(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<::py3::simple::SimpleService>::set_enumCtx(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(), "SimpleService.set_enum", *header); return {std::move(ctx), std::move(header)}; } ::py3::simple::AnEnum apache::thrift::Client<::py3::simple::SimpleService>::sync_set_enum(::py3::simple::AnEnum p_in_enum) { ::apache::thrift::RpcOptions rpcOptions; return sync_set_enum(rpcOptions, p_in_enum); } ::py3::simple::AnEnum apache::thrift::Client<::py3::simple::SimpleService>::sync_set_enum(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::AnEnum p_in_enum) { 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 = set_enumCtx(&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_set_enum(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_in_enum); }); #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([&] { return recv_set_enum(returnState); }); } folly::Future<::py3::simple::AnEnum> apache::thrift::Client<::py3::simple::SimpleService>::future_set_enum(::py3::simple::AnEnum p_in_enum) { ::apache::thrift::RpcOptions rpcOptions; return future_set_enum(rpcOptions, p_in_enum); } folly::SemiFuture<::py3::simple::AnEnum> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_set_enum(::py3::simple::AnEnum p_in_enum) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_set_enum(rpcOptions, p_in_enum); } folly::Future<::py3::simple::AnEnum> apache::thrift::Client<::py3::simple::SimpleService>::future_set_enum(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::AnEnum p_in_enum) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::py3::simple::AnEnum>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_set_enum, channel_); set_enum(rpcOptions, std::move(callback), p_in_enum); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::py3::simple::AnEnum> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_set_enum(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::AnEnum p_in_enum) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_set_enum, channel_); auto callback = std::move(callbackAndFuture.first); set_enum(rpcOptions, std::move(callback), p_in_enum); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_set_enum(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::AnEnum p_in_enum) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_set_enum, channel_); set_enum(rpcOptions, std::move(callback), p_in_enum); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_set_enum(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::AnEnum p_in_enum) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_set_enum, channel_); auto callback = std::move(callbackAndFuture.first); set_enum(rpcOptions, std::move(callback), p_in_enum); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::set_enum(folly::Function callback, ::py3::simple::AnEnum p_in_enum) { set_enum(std::make_unique(std::move(callback)), p_in_enum); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_set_enum(::py3::simple::AnEnum& _return, ::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 = ::py3::simple::SimpleService_set_enum_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::py3::simple::AnEnum apache::thrift::Client<::py3::simple::SimpleService>::recv_set_enum(::apache::thrift::ClientReceiveState& state) { ::py3::simple::AnEnum _return; auto ew = recv_wrapped_set_enum(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::py3::simple::AnEnum apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_set_enum(::apache::thrift::ClientReceiveState& state) { return recv_set_enum(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_set_enum(::py3::simple::AnEnum& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_set_enum(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_lists(std::unique_ptr callback, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { ::apache::thrift::RpcOptions rpcOptions; list_of_lists(rpcOptions, std::move(callback), p_num_lists, p_num_items); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_lists(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { auto [ctx, header] = list_of_listsCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_list_of_lists(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_num_lists, p_num_items); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_list_of_lists(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_num_lists, ::std::int16_t p_num_items, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_list_of_lists(&writer, rpcOptions, *header, contextStack, p_num_lists, p_num_items); if (stealRpcOptions) { fbthrift_send_list_of_lists(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_list_of_lists(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<::py3::simple::SimpleService>::list_of_listsCtx(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(), "SimpleService.list_of_lists", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_list_of_lists(::std::vector<::std::vector<::std::int32_t>>& _return, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { ::apache::thrift::RpcOptions rpcOptions; sync_list_of_lists(rpcOptions, _return, p_num_lists, p_num_items); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_list_of_lists(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::std::vector<::std::int32_t>>& _return, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { 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 = list_of_listsCtx(&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_list_of_lists(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_num_lists, p_num_items); }); #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_list_of_lists(_return, returnState); }); } folly::Future<::std::vector<::std::vector<::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::future_list_of_lists(::std::int16_t p_num_lists, ::std::int16_t p_num_items) { ::apache::thrift::RpcOptions rpcOptions; return future_list_of_lists(rpcOptions, p_num_lists, p_num_items); } folly::SemiFuture<::std::vector<::std::vector<::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_list_of_lists(::std::int16_t p_num_lists, ::std::int16_t p_num_items) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_list_of_lists(rpcOptions, p_num_lists, p_num_items); } folly::Future<::std::vector<::std::vector<::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::future_list_of_lists(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::vector<::std::vector<::std::int32_t>>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_list_of_lists, channel_); list_of_lists(rpcOptions, std::move(callback), p_num_lists, p_num_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::vector<::std::vector<::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_list_of_lists(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_list_of_lists, channel_); auto callback = std::move(callbackAndFuture.first); list_of_lists(rpcOptions, std::move(callback), p_num_lists, p_num_items); return std::move(callbackAndFuture.second); } folly::Future>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_list_of_lists(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_list_of_lists, channel_); list_of_lists(rpcOptions, std::move(callback), p_num_lists, p_num_items); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_list_of_lists(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_list_of_lists, channel_); auto callback = std::move(callbackAndFuture.first); list_of_lists(rpcOptions, std::move(callback), p_num_lists, p_num_items); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_lists(folly::Function callback, ::std::int16_t p_num_lists, ::std::int16_t p_num_items) { list_of_lists(std::make_unique(std::move(callback)), p_num_lists, p_num_items); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_list_of_lists(::std::vector<::std::vector<::std::int32_t>>& _return, ::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 = ::py3::simple::SimpleService_list_of_lists_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_list_of_lists(::std::vector<::std::vector<::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_list_of_lists(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_list_of_lists(::std::vector<::std::vector<::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_list_of_lists(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_list_of_lists(::std::vector<::std::vector<::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_list_of_lists(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::word_character_frequency(std::unique_ptr callback, const ::std::string& p_sentence) { ::apache::thrift::RpcOptions rpcOptions; word_character_frequency(rpcOptions, std::move(callback), p_sentence); } void apache::thrift::Client<::py3::simple::SimpleService>::word_character_frequency(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::string& p_sentence) { auto [ctx, header] = word_character_frequencyCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_word_character_frequency(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_sentence); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_sentence, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_word_character_frequency(&writer, rpcOptions, *header, contextStack, p_sentence); if (stealRpcOptions) { fbthrift_send_word_character_frequency(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_word_character_frequency(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<::py3::simple::SimpleService>::word_character_frequencyCtx(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(), "SimpleService.word_character_frequency", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_word_character_frequency(::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, const ::std::string& p_sentence) { ::apache::thrift::RpcOptions rpcOptions; sync_word_character_frequency(rpcOptions, _return, p_sentence); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, const ::std::string& p_sentence) { 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 = word_character_frequencyCtx(&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_word_character_frequency(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_sentence); }); #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_word_character_frequency(_return, returnState); }); } folly::Future<::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::future_word_character_frequency(const ::std::string& p_sentence) { ::apache::thrift::RpcOptions rpcOptions; return future_word_character_frequency(rpcOptions, p_sentence); } folly::SemiFuture<::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_word_character_frequency(const ::std::string& p_sentence) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_word_character_frequency(rpcOptions, p_sentence); } folly::Future<::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::future_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_sentence) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_word_character_frequency, channel_); word_character_frequency(rpcOptions, std::move(callback), p_sentence); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_sentence) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_word_character_frequency, channel_); auto callback = std::move(callbackAndFuture.first); word_character_frequency(rpcOptions, std::move(callback), p_sentence); return std::move(callbackAndFuture.second); } folly::Future>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_sentence) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_word_character_frequency, channel_); word_character_frequency(rpcOptions, std::move(callback), p_sentence); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_word_character_frequency(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_sentence) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_word_character_frequency, channel_); auto callback = std::move(callbackAndFuture.first); word_character_frequency(rpcOptions, std::move(callback), p_sentence); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::word_character_frequency(folly::Function callback, const ::std::string& p_sentence) { word_character_frequency(std::make_unique(std::move(callback)), p_sentence); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_word_character_frequency(::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, ::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 = ::py3::simple::SimpleService_word_character_frequency_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_word_character_frequency(::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_word_character_frequency(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_word_character_frequency(::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_word_character_frequency(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_word_character_frequency(::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_word_character_frequency(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_sets(std::unique_ptr callback, const ::std::string& p_some_words) { ::apache::thrift::RpcOptions rpcOptions; list_of_sets(rpcOptions, std::move(callback), p_some_words); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_sets(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::string& p_some_words) { auto [ctx, header] = list_of_setsCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_list_of_sets(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_some_words); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_list_of_sets(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_some_words, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_list_of_sets(&writer, rpcOptions, *header, contextStack, p_some_words); if (stealRpcOptions) { fbthrift_send_list_of_sets(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_list_of_sets(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<::py3::simple::SimpleService>::list_of_setsCtx(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(), "SimpleService.list_of_sets", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_list_of_sets(::std::vector<::std::set<::std::string>>& _return, const ::std::string& p_some_words) { ::apache::thrift::RpcOptions rpcOptions; sync_list_of_sets(rpcOptions, _return, p_some_words); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_list_of_sets(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::std::set<::std::string>>& _return, const ::std::string& p_some_words) { 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 = list_of_setsCtx(&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_list_of_sets(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_some_words); }); #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_list_of_sets(_return, returnState); }); } folly::Future<::std::vector<::std::set<::std::string>>> apache::thrift::Client<::py3::simple::SimpleService>::future_list_of_sets(const ::std::string& p_some_words) { ::apache::thrift::RpcOptions rpcOptions; return future_list_of_sets(rpcOptions, p_some_words); } folly::SemiFuture<::std::vector<::std::set<::std::string>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_list_of_sets(const ::std::string& p_some_words) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_list_of_sets(rpcOptions, p_some_words); } folly::Future<::std::vector<::std::set<::std::string>>> apache::thrift::Client<::py3::simple::SimpleService>::future_list_of_sets(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_some_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::vector<::std::set<::std::string>>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_list_of_sets, channel_); list_of_sets(rpcOptions, std::move(callback), p_some_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::vector<::std::set<::std::string>>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_list_of_sets(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_some_words) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_list_of_sets, channel_); auto callback = std::move(callbackAndFuture.first); list_of_sets(rpcOptions, std::move(callback), p_some_words); return std::move(callbackAndFuture.second); } folly::Future>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_list_of_sets(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_some_words) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>>(std::move(promise), recv_wrapped_list_of_sets, channel_); list_of_sets(rpcOptions, std::move(callback), p_some_words); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_list_of_sets(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_some_words) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_list_of_sets, channel_); auto callback = std::move(callbackAndFuture.first); list_of_sets(rpcOptions, std::move(callback), p_some_words); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::list_of_sets(folly::Function callback, const ::std::string& p_some_words) { list_of_sets(std::make_unique(std::move(callback)), p_some_words); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_list_of_sets(::std::vector<::std::set<::std::string>>& _return, ::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 = ::py3::simple::SimpleService_list_of_sets_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_list_of_sets(::std::vector<::std::set<::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_list_of_sets(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_list_of_sets(::std::vector<::std::set<::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_list_of_sets(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_list_of_sets(::std::vector<::std::set<::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_list_of_sets(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::nested_map_argument(std::unique_ptr callback, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { ::apache::thrift::RpcOptions rpcOptions; nested_map_argument(rpcOptions, std::move(callback), p_struct_map); } void apache::thrift::Client<::py3::simple::SimpleService>::nested_map_argument(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { auto [ctx, header] = nested_map_argumentCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_nested_map_argument(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_struct_map); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_nested_map_argument(&writer, rpcOptions, *header, contextStack, p_struct_map); if (stealRpcOptions) { fbthrift_send_nested_map_argument(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_nested_map_argument(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<::py3::simple::SimpleService>::nested_map_argumentCtx(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(), "SimpleService.nested_map_argument", *header); return {std::move(ctx), std::move(header)}; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_nested_map_argument(const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { ::apache::thrift::RpcOptions rpcOptions; return sync_nested_map_argument(rpcOptions, p_struct_map); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::sync_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { 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 = nested_map_argumentCtx(&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_nested_map_argument(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_struct_map); }); #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([&] { return recv_nested_map_argument(returnState); }); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_nested_map_argument(const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { ::apache::thrift::RpcOptions rpcOptions; return future_nested_map_argument(rpcOptions, p_struct_map); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_nested_map_argument(const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_nested_map_argument(rpcOptions, p_struct_map); } folly::Future<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::future_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::int32_t>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_nested_map_argument, channel_); nested_map_argument(rpcOptions, std::move(callback), p_struct_map); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::int32_t> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_nested_map_argument, channel_); auto callback = std::move(callbackAndFuture.first); nested_map_argument(rpcOptions, std::move(callback), p_struct_map); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_nested_map_argument, channel_); nested_map_argument(rpcOptions, std::move(callback), p_struct_map); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_nested_map_argument(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_nested_map_argument, channel_); auto callback = std::move(callbackAndFuture.first); nested_map_argument(rpcOptions, std::move(callback), p_struct_map); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::nested_map_argument(folly::Function callback, const ::std::map<::std::string, ::std::vector<::py3::simple::SimpleStruct>>& p_struct_map) { nested_map_argument(std::make_unique(std::move(callback)), p_struct_map); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_nested_map_argument(::std::int32_t& _return, ::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 = ::py3::simple::SimpleService_nested_map_argument_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_nested_map_argument(::apache::thrift::ClientReceiveState& state) { ::std::int32_t _return; auto ew = recv_wrapped_nested_map_argument(_return, state); if (ew) { ew.throw_exception(); } return _return; } ::std::int32_t apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_nested_map_argument(::apache::thrift::ClientReceiveState& state) { return recv_nested_map_argument(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_nested_map_argument(::std::int32_t& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_nested_map_argument(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::make_sentence(std::unique_ptr callback, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { ::apache::thrift::RpcOptions rpcOptions; make_sentence(rpcOptions, std::move(callback), p_word_chars); } void apache::thrift::Client<::py3::simple::SimpleService>::make_sentence(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { auto [ctx, header] = make_sentenceCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_make_sentence(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_word_chars); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_make_sentence(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::vector<::std::string>>& p_word_chars, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_make_sentence(&writer, rpcOptions, *header, contextStack, p_word_chars); if (stealRpcOptions) { fbthrift_send_make_sentence(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_make_sentence(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<::py3::simple::SimpleService>::make_sentenceCtx(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(), "SimpleService.make_sentence", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_make_sentence(::std::string& _return, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { ::apache::thrift::RpcOptions rpcOptions; sync_make_sentence(rpcOptions, _return, p_word_chars); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_make_sentence(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { 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 = make_sentenceCtx(&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_make_sentence(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_word_chars); }); #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_make_sentence(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_make_sentence(const ::std::vector<::std::vector<::std::string>>& p_word_chars) { ::apache::thrift::RpcOptions rpcOptions; return future_make_sentence(rpcOptions, p_word_chars); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_make_sentence(const ::std::vector<::std::vector<::std::string>>& p_word_chars) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_make_sentence(rpcOptions, p_word_chars); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_make_sentence(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_make_sentence, channel_); make_sentence(rpcOptions, std::move(callback), p_word_chars); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_make_sentence(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_make_sentence, channel_); auto callback = std::move(callbackAndFuture.first); make_sentence(rpcOptions, std::move(callback), p_word_chars); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_make_sentence(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_make_sentence, channel_); make_sentence(rpcOptions, std::move(callback), p_word_chars); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_make_sentence(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_make_sentence, channel_); auto callback = std::move(callbackAndFuture.first); make_sentence(rpcOptions, std::move(callback), p_word_chars); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::make_sentence(folly::Function callback, const ::std::vector<::std::vector<::std::string>>& p_word_chars) { make_sentence(std::make_unique(std::move(callback)), p_word_chars); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_make_sentence(::std::string& _return, ::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 = ::py3::simple::SimpleService_make_sentence_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_make_sentence(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_make_sentence(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_make_sentence(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_make_sentence(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_make_sentence(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_make_sentence(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_union(std::unique_ptr callback, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { ::apache::thrift::RpcOptions rpcOptions; get_union(rpcOptions, std::move(callback), p_sets); } void apache::thrift::Client<::py3::simple::SimpleService>::get_union(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { auto [ctx, header] = get_unionCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_union(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_sets); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_union(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_sets, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_union(&writer, rpcOptions, *header, contextStack, p_sets); if (stealRpcOptions) { fbthrift_send_get_union(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_union(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<::py3::simple::SimpleService>::get_unionCtx(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(), "SimpleService.get_union", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_union(::std::set<::std::int32_t>& _return, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { ::apache::thrift::RpcOptions rpcOptions; sync_get_union(rpcOptions, _return, p_sets); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_union(apache::thrift::RpcOptions& rpcOptions, ::std::set<::std::int32_t>& _return, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { 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 = get_unionCtx(&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_get_union(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_sets); }); #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_get_union(_return, returnState); }); } folly::Future<::std::set<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_get_union(const ::std::vector<::std::set<::std::int32_t>>& p_sets) { ::apache::thrift::RpcOptions rpcOptions; return future_get_union(rpcOptions, p_sets); } folly::SemiFuture<::std::set<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_union(const ::std::vector<::std::set<::std::int32_t>>& p_sets) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_union(rpcOptions, p_sets); } folly::Future<::std::set<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::future_get_union(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::set<::std::int32_t>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_get_union, channel_); get_union(rpcOptions, std::move(callback), p_sets); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::set<::std::int32_t>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_union(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_union, channel_); auto callback = std::move(callbackAndFuture.first); get_union(rpcOptions, std::move(callback), p_sets); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_union(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_get_union, channel_); get_union(rpcOptions, std::move(callback), p_sets); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_union(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_union, channel_); auto callback = std::move(callbackAndFuture.first); get_union(rpcOptions, std::move(callback), p_sets); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_union(folly::Function callback, const ::std::vector<::std::set<::std::int32_t>>& p_sets) { get_union(std::make_unique(std::move(callback)), p_sets); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_union(::std::set<::std::int32_t>& _return, ::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 = ::py3::simple::SimpleService_get_union_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_union(::std::set<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_union(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_union(::std::set<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_union(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_union(::std::set<::std::int32_t>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_union(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_keys(std::unique_ptr callback, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { ::apache::thrift::RpcOptions rpcOptions; get_keys(rpcOptions, std::move(callback), p_string_map); } void apache::thrift::Client<::py3::simple::SimpleService>::get_keys(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { auto [ctx, header] = get_keysCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_keys(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_string_map); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_keys(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_keys(&writer, rpcOptions, *header, contextStack, p_string_map); if (stealRpcOptions) { fbthrift_send_get_keys(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_keys(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<::py3::simple::SimpleService>::get_keysCtx(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(), "SimpleService.get_keys", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_keys(::std::set<::std::string>& _return, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { ::apache::thrift::RpcOptions rpcOptions; sync_get_keys(rpcOptions, _return, p_string_map); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_keys(apache::thrift::RpcOptions& rpcOptions, ::std::set<::std::string>& _return, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { 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 = get_keysCtx(&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_get_keys(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_string_map); }); #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_get_keys(_return, returnState); }); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_get_keys(const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { ::apache::thrift::RpcOptions rpcOptions; return future_get_keys(rpcOptions, p_string_map); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_keys(const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_keys(rpcOptions, p_string_map); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_get_keys(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::set<::std::string>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_get_keys, channel_); get_keys(rpcOptions, std::move(callback), p_string_map); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_keys(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_keys, channel_); auto callback = std::move(callbackAndFuture.first); get_keys(rpcOptions, std::move(callback), p_string_map); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_keys(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_get_keys, channel_); get_keys(rpcOptions, std::move(callback), p_string_map); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_keys(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_keys, channel_); auto callback = std::move(callbackAndFuture.first); get_keys(rpcOptions, std::move(callback), p_string_map); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_keys(folly::Function callback, const ::std::vector<::std::map<::std::string, ::std::string>>& p_string_map) { get_keys(std::make_unique(std::move(callback)), p_string_map); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_keys(::std::set<::std::string>& _return, ::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 = ::py3::simple::SimpleService_get_keys_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_keys(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_keys(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_keys(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_keys(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_keys(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_keys(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::lookup_double(std::unique_ptr callback, ::std::int32_t p_key) { ::apache::thrift::RpcOptions rpcOptions; lookup_double(rpcOptions, std::move(callback), p_key); } void apache::thrift::Client<::py3::simple::SimpleService>::lookup_double(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int32_t p_key) { auto [ctx, header] = lookup_doubleCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_lookup_double(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_key); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_lookup_double(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_key, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_lookup_double(&writer, rpcOptions, *header, contextStack, p_key); if (stealRpcOptions) { fbthrift_send_lookup_double(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_lookup_double(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<::py3::simple::SimpleService>::lookup_doubleCtx(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(), "SimpleService.lookup_double", *header); return {std::move(ctx), std::move(header)}; } double apache::thrift::Client<::py3::simple::SimpleService>::sync_lookup_double(::std::int32_t p_key) { ::apache::thrift::RpcOptions rpcOptions; return sync_lookup_double(rpcOptions, p_key); } double apache::thrift::Client<::py3::simple::SimpleService>::sync_lookup_double(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_key) { 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 = lookup_doubleCtx(&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_lookup_double(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_key); }); #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([&] { return recv_lookup_double(returnState); }); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_lookup_double(::std::int32_t p_key) { ::apache::thrift::RpcOptions rpcOptions; return future_lookup_double(rpcOptions, p_key); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_lookup_double(::std::int32_t p_key) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_lookup_double(rpcOptions, p_key); } folly::Future apache::thrift::Client<::py3::simple::SimpleService>::future_lookup_double(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_key) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_lookup_double, channel_); lookup_double(rpcOptions, std::move(callback), p_key); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture apache::thrift::Client<::py3::simple::SimpleService>::semifuture_lookup_double(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_key) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_lookup_double, channel_); auto callback = std::move(callbackAndFuture.first); lookup_double(rpcOptions, std::move(callback), p_key); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_lookup_double(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_key) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_lookup_double, channel_); lookup_double(rpcOptions, std::move(callback), p_key); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_lookup_double(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_key) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_lookup_double, channel_); auto callback = std::move(callbackAndFuture.first); lookup_double(rpcOptions, std::move(callback), p_key); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::lookup_double(folly::Function callback, ::std::int32_t p_key) { lookup_double(std::make_unique(std::move(callback)), p_key); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_lookup_double(double& _return, ::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 = ::py3::simple::SimpleService_lookup_double_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } double apache::thrift::Client<::py3::simple::SimpleService>::recv_lookup_double(::apache::thrift::ClientReceiveState& state) { double _return; auto ew = recv_wrapped_lookup_double(_return, state); if (ew) { ew.throw_exception(); } return _return; } double apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_lookup_double(::apache::thrift::ClientReceiveState& state) { return recv_lookup_double(state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_lookup_double(double& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_lookup_double(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::retrieve_binary(std::unique_ptr callback, const ::std::string& p_something) { ::apache::thrift::RpcOptions rpcOptions; retrieve_binary(rpcOptions, std::move(callback), p_something); } void apache::thrift::Client<::py3::simple::SimpleService>::retrieve_binary(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::string& p_something) { auto [ctx, header] = retrieve_binaryCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_retrieve_binary(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_something); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_something, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_retrieve_binary(&writer, rpcOptions, *header, contextStack, p_something); if (stealRpcOptions) { fbthrift_send_retrieve_binary(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_retrieve_binary(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<::py3::simple::SimpleService>::retrieve_binaryCtx(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(), "SimpleService.retrieve_binary", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_retrieve_binary(::std::string& _return, const ::std::string& p_something) { ::apache::thrift::RpcOptions rpcOptions; sync_retrieve_binary(rpcOptions, _return, p_something); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_something) { 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 = retrieve_binaryCtx(&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_retrieve_binary(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_something); }); #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_retrieve_binary(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_retrieve_binary(const ::std::string& p_something) { ::apache::thrift::RpcOptions rpcOptions; return future_retrieve_binary(rpcOptions, p_something); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_retrieve_binary(const ::std::string& p_something) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_retrieve_binary(rpcOptions, p_something); } folly::Future<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::future_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_something) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::string>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_retrieve_binary, channel_); retrieve_binary(rpcOptions, std::move(callback), p_something); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::string> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_something) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_retrieve_binary, channel_); auto callback = std::move(callbackAndFuture.first); retrieve_binary(rpcOptions, std::move(callback), p_something); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_something) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_retrieve_binary, channel_); retrieve_binary(rpcOptions, std::move(callback), p_something); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_retrieve_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_something) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_retrieve_binary, channel_); auto callback = std::move(callbackAndFuture.first); retrieve_binary(rpcOptions, std::move(callback), p_something); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::retrieve_binary(folly::Function callback, const ::std::string& p_something) { retrieve_binary(std::make_unique(std::move(callback)), p_something); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_retrieve_binary(::std::string& _return, ::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 = ::py3::simple::SimpleService_retrieve_binary_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_retrieve_binary(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_retrieve_binary(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_retrieve_binary(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_retrieve_binary(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_retrieve_binary(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_retrieve_binary(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_binary(std::unique_ptr callback, const ::std::vector<::std::string>& p_binaries) { ::apache::thrift::RpcOptions rpcOptions; contain_binary(rpcOptions, std::move(callback), p_binaries); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_binary(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::std::string>& p_binaries) { auto [ctx, header] = contain_binaryCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_contain_binary(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_binaries); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_contain_binary(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_binaries, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_contain_binary(&writer, rpcOptions, *header, contextStack, p_binaries); if (stealRpcOptions) { fbthrift_send_contain_binary(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_contain_binary(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<::py3::simple::SimpleService>::contain_binaryCtx(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(), "SimpleService.contain_binary", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_contain_binary(::std::set<::std::string>& _return, const ::std::vector<::std::string>& p_binaries) { ::apache::thrift::RpcOptions rpcOptions; sync_contain_binary(rpcOptions, _return, p_binaries); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_contain_binary(apache::thrift::RpcOptions& rpcOptions, ::std::set<::std::string>& _return, const ::std::vector<::std::string>& p_binaries) { 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 = contain_binaryCtx(&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_contain_binary(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_binaries); }); #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_contain_binary(_return, returnState); }); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_contain_binary(const ::std::vector<::std::string>& p_binaries) { ::apache::thrift::RpcOptions rpcOptions; return future_contain_binary(rpcOptions, p_binaries); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contain_binary(const ::std::vector<::std::string>& p_binaries) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_contain_binary(rpcOptions, p_binaries); } folly::Future<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::future_contain_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_binaries) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::set<::std::string>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_contain_binary, channel_); contain_binary(rpcOptions, std::move(callback), p_binaries); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::set<::std::string>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contain_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_binaries) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_contain_binary, channel_); auto callback = std::move(callbackAndFuture.first); contain_binary(rpcOptions, std::move(callback), p_binaries); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_contain_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_binaries) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_contain_binary, channel_); contain_binary(rpcOptions, std::move(callback), p_binaries); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_contain_binary(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_binaries) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_contain_binary, channel_); auto callback = std::move(callbackAndFuture.first); contain_binary(rpcOptions, std::move(callback), p_binaries); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_binary(folly::Function callback, const ::std::vector<::std::string>& p_binaries) { contain_binary(std::make_unique(std::move(callback)), p_binaries); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_contain_binary(::std::set<::std::string>& _return, ::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 = ::py3::simple::SimpleService_contain_binary_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_contain_binary(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_contain_binary(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_contain_binary(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_contain_binary(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_contain_binary(::std::set<::std::string>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_contain_binary(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_enum(std::unique_ptr callback, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { ::apache::thrift::RpcOptions rpcOptions; contain_enum(rpcOptions, std::move(callback), p_the_enum); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_enum(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { auto [ctx, header] = contain_enumCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_contain_enum(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_the_enum); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_contain_enum(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::py3::simple::AnEnum>& p_the_enum, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_contain_enum(&writer, rpcOptions, *header, contextStack, p_the_enum); if (stealRpcOptions) { fbthrift_send_contain_enum(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_contain_enum(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<::py3::simple::SimpleService>::contain_enumCtx(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(), "SimpleService.contain_enum", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_contain_enum(::std::vector<::py3::simple::AnEnum>& _return, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { ::apache::thrift::RpcOptions rpcOptions; sync_contain_enum(rpcOptions, _return, p_the_enum); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_contain_enum(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::py3::simple::AnEnum>& _return, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { 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 = contain_enumCtx(&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_contain_enum(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_the_enum); }); #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_contain_enum(_return, returnState); }); } folly::Future<::std::vector<::py3::simple::AnEnum>> apache::thrift::Client<::py3::simple::SimpleService>::future_contain_enum(const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { ::apache::thrift::RpcOptions rpcOptions; return future_contain_enum(rpcOptions, p_the_enum); } folly::SemiFuture<::std::vector<::py3::simple::AnEnum>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contain_enum(const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_contain_enum(rpcOptions, p_the_enum); } folly::Future<::std::vector<::py3::simple::AnEnum>> apache::thrift::Client<::py3::simple::SimpleService>::future_contain_enum(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::std::vector<::py3::simple::AnEnum>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_contain_enum, channel_); contain_enum(rpcOptions, std::move(callback), p_the_enum); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::std::vector<::py3::simple::AnEnum>> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_contain_enum(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_contain_enum, channel_); auto callback = std::move(callbackAndFuture.first); contain_enum(rpcOptions, std::move(callback), p_the_enum); return std::move(callbackAndFuture.second); } folly::Future, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_contain_enum(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper, std::unique_ptr>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>>(std::move(promise), recv_wrapped_contain_enum, channel_); contain_enum(rpcOptions, std::move(callback), p_the_enum); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_contain_enum(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_contain_enum, channel_); auto callback = std::move(callbackAndFuture.first); contain_enum(rpcOptions, std::move(callback), p_the_enum); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::contain_enum(folly::Function callback, const ::std::vector<::py3::simple::AnEnum>& p_the_enum) { contain_enum(std::make_unique(std::move(callback)), p_the_enum); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_contain_enum(::std::vector<::py3::simple::AnEnum>& _return, ::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 = ::py3::simple::SimpleService_contain_enum_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_contain_enum(::std::vector<::py3::simple::AnEnum>& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_contain_enum(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_contain_enum(::std::vector<::py3::simple::AnEnum>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_contain_enum(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_contain_enum(::std::vector<::py3::simple::AnEnum>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_contain_enum(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_binary_union_struct(std::unique_ptr callback, const ::py3::simple::BinaryUnion& p_u) { ::apache::thrift::RpcOptions rpcOptions; get_binary_union_struct(rpcOptions, std::move(callback), p_u); } void apache::thrift::Client<::py3::simple::SimpleService>::get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, const ::py3::simple::BinaryUnion& p_u) { auto [ctx, header] = get_binary_union_structCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_binary_union_struct(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_u); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::py3::simple::BinaryUnion& p_u, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_binary_union_struct(&writer, rpcOptions, *header, contextStack, p_u); if (stealRpcOptions) { fbthrift_send_get_binary_union_struct(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_binary_union_struct(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<::py3::simple::SimpleService>::get_binary_union_structCtx(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(), "SimpleService.get_binary_union_struct", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_binary_union_struct(::py3::simple::BinaryUnionStruct& _return, const ::py3::simple::BinaryUnion& p_u) { ::apache::thrift::RpcOptions rpcOptions; sync_get_binary_union_struct(rpcOptions, _return, p_u); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::BinaryUnionStruct& _return, const ::py3::simple::BinaryUnion& p_u) { 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 = get_binary_union_structCtx(&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_get_binary_union_struct(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_u); }); #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_get_binary_union_struct(_return, returnState); }); } folly::Future<::py3::simple::BinaryUnionStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_binary_union_struct(const ::py3::simple::BinaryUnion& p_u) { ::apache::thrift::RpcOptions rpcOptions; return future_get_binary_union_struct(rpcOptions, p_u); } folly::SemiFuture<::py3::simple::BinaryUnionStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_binary_union_struct(const ::py3::simple::BinaryUnion& p_u) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_binary_union_struct(rpcOptions, p_u); } folly::Future<::py3::simple::BinaryUnionStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::BinaryUnion& p_u) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::py3::simple::BinaryUnionStruct>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_binary_union_struct, channel_); get_binary_union_struct(rpcOptions, std::move(callback), p_u); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::py3::simple::BinaryUnionStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::BinaryUnion& p_u) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_binary_union_struct, channel_); auto callback = std::move(callbackAndFuture.first); get_binary_union_struct(rpcOptions, std::move(callback), p_u); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::BinaryUnion& p_u) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_binary_union_struct, channel_); get_binary_union_struct(rpcOptions, std::move(callback), p_u); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_binary_union_struct(apache::thrift::RpcOptions& rpcOptions, const ::py3::simple::BinaryUnion& p_u) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_binary_union_struct, channel_); auto callback = std::move(callbackAndFuture.first); get_binary_union_struct(rpcOptions, std::move(callback), p_u); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_binary_union_struct(folly::Function callback, const ::py3::simple::BinaryUnion& p_u) { get_binary_union_struct(std::make_unique(std::move(callback)), p_u); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_binary_union_struct(::py3::simple::BinaryUnionStruct& _return, ::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 = ::py3::simple::SimpleService_get_binary_union_struct_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_binary_union_struct(::py3::simple::BinaryUnionStruct& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_binary_union_struct(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_binary_union_struct(::py3::simple::BinaryUnionStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_binary_union_struct(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_binary_union_struct(::py3::simple::BinaryUnionStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_binary_union_struct(_return, state); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct_hidden(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; get_struct_hidden(rpcOptions, std::move(callback)); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct_hidden(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = get_struct_hiddenCtx(&rpcOptions); auto [wrappedCallback, contextStack] = apache::thrift::GeneratedAsyncClient::template prepareRequestClientCallback(std::move(callback), std::move(ctx)); fbthrift_serialize_and_send_get_struct_hidden(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::py3::simple::SimpleService>::fbthrift_serialize_and_send_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { apache::thrift::detail::ac::withProtocolWriter(apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(), [&](auto&& writer) { apache::thrift::SerializedRequest request = fbthrift_serialize_get_struct_hidden(&writer, rpcOptions, *header, contextStack); if (stealRpcOptions) { fbthrift_send_get_struct_hidden(std::move(request), std::move(rpcOptions), std::move(header), std::move(callback)); } else { fbthrift_send_get_struct_hidden(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<::py3::simple::SimpleService>::get_struct_hiddenCtx(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(), "SimpleService.get_struct_hidden", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_struct_hidden(::py3::simple::SimpleStruct& _return) { ::apache::thrift::RpcOptions rpcOptions; sync_get_struct_hidden(rpcOptions, _return); } void apache::thrift::Client<::py3::simple::SimpleService>::sync_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions, ::py3::simple::SimpleStruct& _return) { 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 = get_struct_hiddenCtx(&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_get_struct_hidden(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); #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_get_struct_hidden(_return, returnState); }); } folly::Future<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_struct_hidden() { ::apache::thrift::RpcOptions rpcOptions; return future_get_struct_hidden(rpcOptions); } folly::SemiFuture<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_struct_hidden() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_get_struct_hidden(rpcOptions); } folly::Future<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::future_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper<::py3::simple::SimpleStruct>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_struct_hidden, channel_); get_struct_hidden(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture<::py3::simple::SimpleStruct> apache::thrift::Client<::py3::simple::SimpleService>::semifuture_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_get_struct_hidden, channel_); auto callback = std::move(callbackAndFuture.first); get_struct_hidden(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::py3::simple::SimpleService>::header_future_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions) { using CallbackHelper = apache::thrift::detail::FutureCallbackHelper>>; folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_get_struct_hidden, channel_); get_struct_hidden(rpcOptions, std::move(callback)); return std::move(future).thenValue(CallbackHelper::extractResult); } folly::SemiFuture>> apache::thrift::Client<::py3::simple::SimpleService>::header_semifuture_get_struct_hidden(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_get_struct_hidden, channel_); auto callback = std::move(callbackAndFuture.first); get_struct_hidden(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::py3::simple::SimpleService>::get_struct_hidden(folly::Function callback) { get_struct_hidden(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_wrapped_get_struct_hidden(::py3::simple::SimpleStruct& _return, ::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 = ::py3::simple::SimpleService_get_struct_hidden_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::py3::simple::SimpleService>::recv_get_struct_hidden(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_get_struct_hidden(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_get_struct_hidden(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_get_struct_hidden(_return, state); } folly::exception_wrapper apache::thrift::Client<::py3::simple::SimpleService>::recv_instance_wrapped_get_struct_hidden(::py3::simple::SimpleStruct& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_get_struct_hidden(_return, state); }