1 /**
2 * Autogenerated by Thrift for src/module.thrift
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated @nocommit
6 */
7
8 #include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/ParamServiceAsyncClient.h"
9
10 #include <thrift/lib/cpp2/gen/client_cpp.h>
11
12 namespace some { namespace valid { namespace ns {
13 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int16_t*>> ParamService_void_ret_i16_param_pargs;
14 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_i16_param_presult;
15 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int8_t*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int16_t*>> ParamService_void_ret_byte_i16_param_pargs;
16 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_byte_i16_param_presult;
17 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, ::std::int64_t>*>> ParamService_void_ret_map_param_pargs;
18 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_map_param_presult;
19 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, ::std::int64_t>*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, ::std::set<::std::vector<::std::string>>*>> ParamService_void_ret_map_setlist_param_pargs;
20 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_map_setlist_param_presult;
21 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::some::valid::ns::simpleTypeDef*>> ParamService_void_ret_map_typedef_param_pargs;
22 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_map_typedef_param_presult;
23 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::enumeration, ::some::valid::ns::MyEnumA*>> ParamService_void_ret_enum_param_pargs;
24 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_enum_param_presult;
25 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::some::valid::ns::MyStruct*>> ParamService_void_ret_struct_param_pargs;
26 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_struct_param_presult;
27 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::list<::apache::thrift::type_class::variant>, ::std::vector<::some::valid::ns::ComplexUnion>*>> ParamService_void_ret_listunion_param_pargs;
28 typedef apache::thrift::ThriftPresult<true> ParamService_void_ret_listunion_param_presult;
29 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::integral, ::std::int64_t*>> ParamService_bool_ret_i32_i64_param_pargs;
30 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, bool*>> ParamService_bool_ret_i32_i64_param_presult;
31 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, ::std::int64_t>*>> ParamService_bool_ret_map_param_pargs;
32 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, bool*>> ParamService_bool_ret_map_param_presult;
33 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::variant, ::some::valid::ns::ComplexUnion*>> ParamService_bool_ret_union_param_pargs;
34 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, bool*>> ParamService_bool_ret_union_param_presult;
35 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::floating_point, float*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::floating_point, double*>> ParamService_i64_ret_float_double_param_pargs;
36 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, ::std::int64_t*>> ParamService_i64_ret_float_double_param_presult;
37 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::string, ::std::string*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::map<::apache::thrift::type_class::structure, ::apache::thrift::type_class::structure>>>>, ::std::set<::some::valid::ns::mostComplexTypeDef>*>> ParamService_i64_ret_string_typedef_param_pargs;
38 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, ::std::int64_t*>> ParamService_i64_ret_string_typedef_param_presult;
39 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<4, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<5, ::apache::thrift::type_class::integral, ::std::int32_t*>> ParamService_i64_ret_i32_i32_i32_i32_i32_param_pargs;
40 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, ::std::int64_t*>> ParamService_i64_ret_i32_i32_i32_i32_i32_param_presult;
41 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<4, ::apache::thrift::type_class::set<::apache::thrift::type_class::structure>, ::std::set<::some::valid::ns::MyStruct>*>> ParamService_double_ret_setstruct_param_pargs;
42 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::floating_point, double*>> ParamService_double_ret_setstruct_param_presult;
43 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::string, ::std::string*>> ParamService_string_ret_string_param_pargs;
44 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::string, ::std::string*>> ParamService_string_ret_string_param_presult;
45 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::binary, ::std::string*>> ParamService_binary_ret_binary_param_pargs;
46 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::binary, ::std::string*>> ParamService_binary_ret_binary_param_presult;
47 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, bool*>> ParamService_map_ret_bool_param_pargs;
48 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, ::std::int64_t>*>> ParamService_map_ret_bool_param_presult;
49 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, ::std::map<::std::int32_t, ::std::vector<::std::string>>*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, ::std::vector<::std::string>*>> ParamService_list_ret_map_setlist_param_pargs;
50 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<bool>*>> ParamService_list_ret_map_setlist_param_presult;
51 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>>>, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>*>> ParamService_mapsetlistmapliststring_ret_listlistlist_param_pargs;
52 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::map<::apache::thrift::type_class::set<::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, ::apache::thrift::type_class::map<::apache::thrift::type_class::list<::apache::thrift::type_class::set<::apache::thrift::type_class::string>>, ::apache::thrift::type_class::string>>, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>*>> ParamService_mapsetlistmapliststring_ret_listlistlist_param_presult;
53 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int32_t*>> ParamService_typedef_ret_i32_param_pargs;
54 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::integral, ::some::valid::ns::simpleTypeDef*>> ParamService_typedef_ret_i32_param_presult;
55 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::list<::apache::thrift::type_class::map<::apache::thrift::type_class::structure, ::apache::thrift::type_class::structure>>, ::some::valid::ns::complexStructTypeDef*>> ParamService_listtypedef_ret_typedef_param_pargs;
56 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, ::std::vector<::some::valid::ns::simpleTypeDef>*>> ParamService_listtypedef_ret_typedef_param_presult;
57 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<3, ::apache::thrift::type_class::floating_point, double*>> ParamService_enum_ret_double_param_pargs;
58 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::enumeration, ::some::valid::ns::MyEnumA*>> ParamService_enum_ret_double_param_presult;
59 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<3, ::apache::thrift::type_class::floating_point, double*>, apache::thrift::FieldData<5, ::apache::thrift::type_class::enumeration, ::some::valid::ns::MyEnumA*>> ParamService_enum_ret_double_enum_param_pargs;
60 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::enumeration, ::some::valid::ns::MyEnumA*>> ParamService_enum_ret_double_enum_param_presult;
61 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::integral>, ::std::map<::std::string, ::std::int64_t>*>> ParamService_listenum_ret_map_param_pargs;
62 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, ::std::vector<::some::valid::ns::MyEnumA>*>> ParamService_listenum_ret_map_param_presult;
63 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::integral, ::std::int16_t*>> ParamService_struct_ret_i16_param_pargs;
64 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::structure, ::some::valid::ns::MyStruct*>> ParamService_struct_ret_i16_param_presult;
65 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<8, ::apache::thrift::type_class::set<::apache::thrift::type_class::string>, ::std::set<::std::string>*>> ParamService_setstruct_ret_set_param_pargs;
66 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::set<::apache::thrift::type_class::structure>, ::std::set<::some::valid::ns::MyStruct>*>> ParamService_setstruct_ret_set_param_presult;
67 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<4, ::apache::thrift::type_class::integral, ::std::int32_t*>, apache::thrift::FieldData<2, ::apache::thrift::type_class::integral, ::std::int32_t*>> ParamService_union_ret_i32_i32_param_pargs;
68 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::variant, ::some::valid::ns::ComplexUnion*>> ParamService_union_ret_i32_i32_param_presult;
69 typedef apache::thrift::ThriftPresult<false, apache::thrift::FieldData<1, ::apache::thrift::type_class::string, ::std::string*>> ParamService_listunion_string_param_pargs;
70 typedef apache::thrift::ThriftPresult<true, apache::thrift::FieldData<0, ::apache::thrift::type_class::list<::apache::thrift::type_class::variant>, ::std::vector<::some::valid::ns::ComplexUnion>*>> ParamService_listunion_string_param_presult;
71
72 template <typename Protocol_, typename RpcOptions>
void_ret_i16_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int16_t p_param1)73 void ParamServiceAsyncClient::void_ret_i16_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_param1) {
74
75 ParamService_void_ret_i16_param_pargs args;
76 args.get<0>().value = &p_param1;
77 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
78 auto writer = [&](Protocol_* p) { args.write(p); };
79
80 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
81 new ::apache::thrift::MethodMetadata::Data(
82 "void_ret_i16_param",
83 ::apache::thrift::FunctionQualifier::Unspecified);
84 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
85 }
86
87 template <typename Protocol_, typename RpcOptions>
void_ret_byte_i16_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int8_t p_param1,::std::int16_t p_param2)88 void ParamServiceAsyncClient::void_ret_byte_i16_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int8_t p_param1, ::std::int16_t p_param2) {
89
90 ParamService_void_ret_byte_i16_param_pargs args;
91 args.get<0>().value = &p_param1;
92 args.get<1>().value = &p_param2;
93 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
94 auto writer = [&](Protocol_* p) { args.write(p); };
95
96 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
97 new ::apache::thrift::MethodMetadata::Data(
98 "void_ret_byte_i16_param",
99 ::apache::thrift::FunctionQualifier::Unspecified);
100 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
101 }
102
103 template <typename Protocol_, typename RpcOptions>
void_ret_map_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1)104 void ParamServiceAsyncClient::void_ret_map_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
105
106 ParamService_void_ret_map_param_pargs args;
107 args.get<0>().value = const_cast<::std::map<::std::string, ::std::int64_t>*>(&p_param1);
108 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
109 auto writer = [&](Protocol_* p) { args.write(p); };
110
111 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
112 new ::apache::thrift::MethodMetadata::Data(
113 "void_ret_map_param",
114 ::apache::thrift::FunctionQualifier::Unspecified);
115 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
116 }
117
118 template <typename Protocol_, typename RpcOptions>
void_ret_map_setlist_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)119 void ParamServiceAsyncClient::void_ret_map_setlist_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
120
121 ParamService_void_ret_map_setlist_param_pargs args;
122 args.get<0>().value = const_cast<::std::map<::std::string, ::std::int64_t>*>(&p_param1);
123 args.get<1>().value = const_cast<::std::set<::std::vector<::std::string>>*>(&p_param2);
124 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
125 auto writer = [&](Protocol_* p) { args.write(p); };
126
127 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
128 new ::apache::thrift::MethodMetadata::Data(
129 "void_ret_map_setlist_param",
130 ::apache::thrift::FunctionQualifier::Unspecified);
131 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
132 }
133
134 template <typename Protocol_, typename RpcOptions>
void_ret_map_typedef_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::some::valid::ns::simpleTypeDef p_param1)135 void ParamServiceAsyncClient::void_ret_map_typedef_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::some::valid::ns::simpleTypeDef p_param1) {
136
137 ParamService_void_ret_map_typedef_param_pargs args;
138 args.get<0>().value = &p_param1;
139 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
140 auto writer = [&](Protocol_* p) { args.write(p); };
141
142 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
143 new ::apache::thrift::MethodMetadata::Data(
144 "void_ret_map_typedef_param",
145 ::apache::thrift::FunctionQualifier::Unspecified);
146 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
147 }
148
149 template <typename Protocol_, typename RpcOptions>
void_ret_enum_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::some::valid::ns::MyEnumA p_param1)150 void ParamServiceAsyncClient::void_ret_enum_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::some::valid::ns::MyEnumA p_param1) {
151
152 ParamService_void_ret_enum_param_pargs args;
153 args.get<0>().value = &p_param1;
154 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
155 auto writer = [&](Protocol_* p) { args.write(p); };
156
157 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
158 new ::apache::thrift::MethodMetadata::Data(
159 "void_ret_enum_param",
160 ::apache::thrift::FunctionQualifier::Unspecified);
161 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
162 }
163
164 template <typename Protocol_, typename RpcOptions>
void_ret_struct_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::MyStruct & p_param1)165 void ParamServiceAsyncClient::void_ret_struct_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::MyStruct& p_param1) {
166
167 ParamService_void_ret_struct_param_pargs args;
168 args.get<0>().value = const_cast<::some::valid::ns::MyStruct*>(&p_param1);
169 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
170 auto writer = [&](Protocol_* p) { args.write(p); };
171
172 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
173 new ::apache::thrift::MethodMetadata::Data(
174 "void_ret_struct_param",
175 ::apache::thrift::FunctionQualifier::Unspecified);
176 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
177 }
178
179 template <typename Protocol_, typename RpcOptions>
void_ret_listunion_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)180 void ParamServiceAsyncClient::void_ret_listunion_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
181
182 ParamService_void_ret_listunion_param_pargs args;
183 args.get<0>().value = const_cast<::std::vector<::some::valid::ns::ComplexUnion>*>(&p_param1);
184 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
185 auto writer = [&](Protocol_* p) { args.write(p); };
186
187 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
188 new ::apache::thrift::MethodMetadata::Data(
189 "void_ret_listunion_param",
190 ::apache::thrift::FunctionQualifier::Unspecified);
191 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
192 }
193
194 template <typename Protocol_, typename RpcOptions>
bool_ret_i32_i64_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int64_t p_param2)195 void ParamServiceAsyncClient::bool_ret_i32_i64_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int64_t p_param2) {
196
197 ParamService_bool_ret_i32_i64_param_pargs args;
198 args.get<0>().value = &p_param1;
199 args.get<1>().value = &p_param2;
200 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
201 auto writer = [&](Protocol_* p) { args.write(p); };
202
203 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
204 new ::apache::thrift::MethodMetadata::Data(
205 "bool_ret_i32_i64_param",
206 ::apache::thrift::FunctionQualifier::Unspecified);
207 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
208 }
209
210 template <typename Protocol_, typename RpcOptions>
bool_ret_map_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1)211 void ParamServiceAsyncClient::bool_ret_map_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
212
213 ParamService_bool_ret_map_param_pargs args;
214 args.get<0>().value = const_cast<::std::map<::std::string, ::std::int64_t>*>(&p_param1);
215 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
216 auto writer = [&](Protocol_* p) { args.write(p); };
217
218 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
219 new ::apache::thrift::MethodMetadata::Data(
220 "bool_ret_map_param",
221 ::apache::thrift::FunctionQualifier::Unspecified);
222 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
223 }
224
225 template <typename Protocol_, typename RpcOptions>
bool_ret_union_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::ComplexUnion & p_param1)226 void ParamServiceAsyncClient::bool_ret_union_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::ComplexUnion& p_param1) {
227
228 ParamService_bool_ret_union_param_pargs args;
229 args.get<0>().value = const_cast<::some::valid::ns::ComplexUnion*>(&p_param1);
230 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
231 auto writer = [&](Protocol_* p) { args.write(p); };
232
233 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
234 new ::apache::thrift::MethodMetadata::Data(
235 "bool_ret_union_param",
236 ::apache::thrift::FunctionQualifier::Unspecified);
237 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
238 }
239
240 template <typename Protocol_, typename RpcOptions>
i64_ret_float_double_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,float p_param1,double p_param2)241 void ParamServiceAsyncClient::i64_ret_float_double_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, float p_param1, double p_param2) {
242
243 ParamService_i64_ret_float_double_param_pargs args;
244 args.get<0>().value = &p_param1;
245 args.get<1>().value = &p_param2;
246 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
247 auto writer = [&](Protocol_* p) { args.write(p); };
248
249 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
250 new ::apache::thrift::MethodMetadata::Data(
251 "i64_ret_float_double_param",
252 ::apache::thrift::FunctionQualifier::Unspecified);
253 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
254 }
255
256 template <typename Protocol_, typename RpcOptions>
i64_ret_string_typedef_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)257 void ParamServiceAsyncClient::i64_ret_string_typedef_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
258
259 ParamService_i64_ret_string_typedef_param_pargs args;
260 args.get<0>().value = const_cast<::std::string*>(&p_param1);
261 args.get<1>().value = const_cast<::std::set<::some::valid::ns::mostComplexTypeDef>*>(&p_param2);
262 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
263 auto writer = [&](Protocol_* p) { args.write(p); };
264
265 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
266 new ::apache::thrift::MethodMetadata::Data(
267 "i64_ret_string_typedef_param",
268 ::apache::thrift::FunctionQualifier::Unspecified);
269 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
270 }
271
272 template <typename Protocol_, typename RpcOptions>
i64_ret_i32_i32_i32_i32_i32_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)273 void ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
274
275 ParamService_i64_ret_i32_i32_i32_i32_i32_param_pargs args;
276 args.get<0>().value = &p_param1;
277 args.get<1>().value = &p_param2;
278 args.get<2>().value = &p_param3;
279 args.get<3>().value = &p_param4;
280 args.get<4>().value = &p_param5;
281 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
282 auto writer = [&](Protocol_* p) { args.write(p); };
283
284 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
285 new ::apache::thrift::MethodMetadata::Data(
286 "i64_ret_i32_i32_i32_i32_i32_param",
287 ::apache::thrift::FunctionQualifier::Unspecified);
288 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
289 }
290
291 template <typename Protocol_, typename RpcOptions>
double_ret_setstruct_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::set<::some::valid::ns::MyStruct> & p_param1)292 void ParamServiceAsyncClient::double_ret_setstruct_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
293
294 ParamService_double_ret_setstruct_param_pargs args;
295 args.get<0>().value = const_cast<::std::set<::some::valid::ns::MyStruct>*>(&p_param1);
296 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
297 auto writer = [&](Protocol_* p) { args.write(p); };
298
299 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
300 new ::apache::thrift::MethodMetadata::Data(
301 "double_ret_setstruct_param",
302 ::apache::thrift::FunctionQualifier::Unspecified);
303 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
304 }
305
306 template <typename Protocol_, typename RpcOptions>
string_ret_string_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1)307 void ParamServiceAsyncClient::string_ret_string_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1) {
308
309 ParamService_string_ret_string_param_pargs args;
310 args.get<0>().value = const_cast<::std::string*>(&p_param1);
311 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
312 auto writer = [&](Protocol_* p) { args.write(p); };
313
314 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
315 new ::apache::thrift::MethodMetadata::Data(
316 "string_ret_string_param",
317 ::apache::thrift::FunctionQualifier::Unspecified);
318 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
319 }
320
321 template <typename Protocol_, typename RpcOptions>
binary_ret_binary_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1)322 void ParamServiceAsyncClient::binary_ret_binary_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1) {
323
324 ParamService_binary_ret_binary_param_pargs args;
325 args.get<0>().value = const_cast<::std::string*>(&p_param1);
326 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
327 auto writer = [&](Protocol_* p) { args.write(p); };
328
329 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
330 new ::apache::thrift::MethodMetadata::Data(
331 "binary_ret_binary_param",
332 ::apache::thrift::FunctionQualifier::Unspecified);
333 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
334 }
335
336 template <typename Protocol_, typename RpcOptions>
map_ret_bool_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,bool p_param1)337 void ParamServiceAsyncClient::map_ret_bool_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool p_param1) {
338
339 ParamService_map_ret_bool_param_pargs args;
340 args.get<0>().value = &p_param1;
341 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
342 auto writer = [&](Protocol_* p) { args.write(p); };
343
344 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
345 new ::apache::thrift::MethodMetadata::Data(
346 "map_ret_bool_param",
347 ::apache::thrift::FunctionQualifier::Unspecified);
348 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
349 }
350
351 template <typename Protocol_, typename RpcOptions>
list_ret_map_setlist_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)352 void ParamServiceAsyncClient::list_ret_map_setlist_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
353
354 ParamService_list_ret_map_setlist_param_pargs args;
355 args.get<0>().value = const_cast<::std::map<::std::int32_t, ::std::vector<::std::string>>*>(&p_param1);
356 args.get<1>().value = const_cast<::std::vector<::std::string>*>(&p_param2);
357 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
358 auto writer = [&](Protocol_* p) { args.write(p); };
359
360 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
361 new ::apache::thrift::MethodMetadata::Data(
362 "list_ret_map_setlist_param",
363 ::apache::thrift::FunctionQualifier::Unspecified);
364 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
365 }
366
367 template <typename Protocol_, typename RpcOptions>
mapsetlistmapliststring_ret_listlistlist_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)368 void ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
369
370 ParamService_mapsetlistmapliststring_ret_listlistlist_param_pargs args;
371 args.get<0>().value = const_cast<::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>*>(&p_param1);
372 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
373 auto writer = [&](Protocol_* p) { args.write(p); };
374
375 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
376 new ::apache::thrift::MethodMetadata::Data(
377 "mapsetlistmapliststring_ret_listlistlist_param",
378 ::apache::thrift::FunctionQualifier::Unspecified);
379 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
380 }
381
382 template <typename Protocol_, typename RpcOptions>
typedef_ret_i32_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1)383 void ParamServiceAsyncClient::typedef_ret_i32_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1) {
384
385 ParamService_typedef_ret_i32_param_pargs args;
386 args.get<0>().value = &p_param1;
387 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
388 auto writer = [&](Protocol_* p) { args.write(p); };
389
390 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
391 new ::apache::thrift::MethodMetadata::Data(
392 "typedef_ret_i32_param",
393 ::apache::thrift::FunctionQualifier::Unspecified);
394 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
395 }
396
397 template <typename Protocol_, typename RpcOptions>
listtypedef_ret_typedef_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::complexStructTypeDef & p_param1)398 void ParamServiceAsyncClient::listtypedef_ret_typedef_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::complexStructTypeDef& p_param1) {
399
400 ParamService_listtypedef_ret_typedef_param_pargs args;
401 args.get<0>().value = const_cast<::some::valid::ns::complexStructTypeDef*>(&p_param1);
402 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
403 auto writer = [&](Protocol_* p) { args.write(p); };
404
405 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
406 new ::apache::thrift::MethodMetadata::Data(
407 "listtypedef_ret_typedef_param",
408 ::apache::thrift::FunctionQualifier::Unspecified);
409 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
410 }
411
412 template <typename Protocol_, typename RpcOptions>
enum_ret_double_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,double p_param1)413 void ParamServiceAsyncClient::enum_ret_double_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, double p_param1) {
414
415 ParamService_enum_ret_double_param_pargs args;
416 args.get<0>().value = &p_param1;
417 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
418 auto writer = [&](Protocol_* p) { args.write(p); };
419
420 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
421 new ::apache::thrift::MethodMetadata::Data(
422 "enum_ret_double_param",
423 ::apache::thrift::FunctionQualifier::Unspecified);
424 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
425 }
426
427 template <typename Protocol_, typename RpcOptions>
enum_ret_double_enum_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,double p_param1,::some::valid::ns::MyEnumA p_param2)428 void ParamServiceAsyncClient::enum_ret_double_enum_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
429
430 ParamService_enum_ret_double_enum_param_pargs args;
431 args.get<0>().value = &p_param1;
432 args.get<1>().value = &p_param2;
433 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
434 auto writer = [&](Protocol_* p) { args.write(p); };
435
436 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
437 new ::apache::thrift::MethodMetadata::Data(
438 "enum_ret_double_enum_param",
439 ::apache::thrift::FunctionQualifier::Unspecified);
440 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
441 }
442
443 template <typename Protocol_, typename RpcOptions>
listenum_ret_map_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1)444 void ParamServiceAsyncClient::listenum_ret_map_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
445
446 ParamService_listenum_ret_map_param_pargs args;
447 args.get<0>().value = const_cast<::std::map<::std::string, ::std::int64_t>*>(&p_param1);
448 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
449 auto writer = [&](Protocol_* p) { args.write(p); };
450
451 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
452 new ::apache::thrift::MethodMetadata::Data(
453 "listenum_ret_map_param",
454 ::apache::thrift::FunctionQualifier::Unspecified);
455 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
456 }
457
458 template <typename Protocol_, typename RpcOptions>
struct_ret_i16_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int16_t p_param1)459 void ParamServiceAsyncClient::struct_ret_i16_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_param1) {
460
461 ParamService_struct_ret_i16_param_pargs args;
462 args.get<0>().value = &p_param1;
463 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
464 auto writer = [&](Protocol_* p) { args.write(p); };
465
466 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
467 new ::apache::thrift::MethodMetadata::Data(
468 "struct_ret_i16_param",
469 ::apache::thrift::FunctionQualifier::Unspecified);
470 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
471 }
472
473 template <typename Protocol_, typename RpcOptions>
setstruct_ret_set_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::set<::std::string> & p_param1)474 void ParamServiceAsyncClient::setstruct_ret_set_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::std::string>& p_param1) {
475
476 ParamService_setstruct_ret_set_param_pargs args;
477 args.get<0>().value = const_cast<::std::set<::std::string>*>(&p_param1);
478 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
479 auto writer = [&](Protocol_* p) { args.write(p); };
480
481 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
482 new ::apache::thrift::MethodMetadata::Data(
483 "setstruct_ret_set_param",
484 ::apache::thrift::FunctionQualifier::Unspecified);
485 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
486 }
487
488 template <typename Protocol_, typename RpcOptions>
union_ret_i32_i32_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int32_t p_param2)489 void ParamServiceAsyncClient::union_ret_i32_i32_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int32_t p_param2) {
490
491 ParamService_union_ret_i32_i32_param_pargs args;
492 args.get<0>().value = &p_param1;
493 args.get<1>().value = &p_param2;
494 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
495 auto writer = [&](Protocol_* p) { args.write(p); };
496
497 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
498 new ::apache::thrift::MethodMetadata::Data(
499 "union_ret_i32_i32_param",
500 ::apache::thrift::FunctionQualifier::Unspecified);
501 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
502 }
503
504 template <typename Protocol_, typename RpcOptions>
listunion_string_paramT(Protocol_ * prot,RpcOptions && rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1)505 void ParamServiceAsyncClient::listunion_string_paramT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1) {
506
507 ParamService_listunion_string_param_pargs args;
508 args.get<0>().value = const_cast<::std::string*>(&p_param1);
509 auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
510 auto writer = [&](Protocol_* p) { args.write(p); };
511
512 static ::apache::thrift::MethodMetadata::Data* methodMetadata =
513 new ::apache::thrift::MethodMetadata::Data(
514 "listunion_string_param",
515 ::apache::thrift::FunctionQualifier::Unspecified);
516 apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
517 }
518
519
520
void_ret_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int16_t p_param1)521 void ParamServiceAsyncClient::void_ret_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int16_t p_param1) {
522 ::apache::thrift::RpcOptions rpcOptions;
523 void_ret_i16_param(rpcOptions, std::move(callback), p_param1);
524 }
525
void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int16_t p_param1)526 void ParamServiceAsyncClient::void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int16_t p_param1) {
527 auto [ctx, header] = void_ret_i16_paramCtx(&rpcOptions);
528 apache::thrift::RequestCallback::Context callbackContext;
529 callbackContext.protocolId =
530 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
531 auto* contextStack = ctx.get();
532 if (callback) {
533 callbackContext.ctx = std::move(ctx);
534 }
535 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
536 void_ret_i16_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
537 }
538
void_ret_i16_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int16_t p_param1,bool stealRpcOptions)539 void ParamServiceAsyncClient::void_ret_i16_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_param1, bool stealRpcOptions) {
540 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
541 case apache::thrift::protocol::T_BINARY_PROTOCOL:
542 {
543 apache::thrift::BinaryProtocolWriter writer;
544 if (stealRpcOptions) {
545 void_ret_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
546 } else {
547 void_ret_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
548 }
549 break;
550 }
551 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
552 {
553 apache::thrift::CompactProtocolWriter writer;
554 if (stealRpcOptions) {
555 void_ret_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
556 } else {
557 void_ret_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
558 }
559 break;
560 }
561 default:
562 {
563 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
564 }
565 }
566 }
567
void_ret_i16_paramCtx(apache::thrift::RpcOptions * rpcOptions)568 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_i16_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
569 auto header = std::make_shared<apache::thrift::transport::THeader>(
570 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
571 header->setProtocolId(channel_->getProtocolId());
572 if (rpcOptions) {
573 header->setHeaders(rpcOptions->releaseWriteHeaders());
574 }
575
576 auto ctx = apache::thrift::ContextStack::createWithClientContext(
577 handlers_,
578 getServiceName(),
579 "ParamService.void_ret_i16_param",
580 *header);
581
582 return {std::move(ctx), std::move(header)};
583 }
584
sync_void_ret_i16_param(::std::int16_t p_param1)585 void ParamServiceAsyncClient::sync_void_ret_i16_param(::std::int16_t p_param1) {
586 ::apache::thrift::RpcOptions rpcOptions;
587 sync_void_ret_i16_param(rpcOptions, p_param1);
588 }
589
sync_void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)590 void ParamServiceAsyncClient::sync_void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
591 apache::thrift::ClientReceiveState returnState;
592 apache::thrift::ClientSyncCallback<false> callback(&returnState);
593 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
594 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
595 auto ctxAndHeader = void_ret_i16_paramCtx(&rpcOptions);
596 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
597 callback.waitUntilDone(
598 evb,
599 [&] {
600 void_ret_i16_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
601 });
602
603 if (returnState.isException()) {
604 returnState.exception().throw_exception();
605 }
606 returnState.resetProtocolId(protocolId);
607 returnState.resetCtx(std::move(ctxAndHeader.first));
608 SCOPE_EXIT {
609 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
610 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
611 }
612 };
613 return folly::fibers::runInMainContext([&] {
614 recv_void_ret_i16_param(returnState);
615 });
616 }
617
618
future_void_ret_i16_param(::std::int16_t p_param1)619 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_i16_param(::std::int16_t p_param1) {
620 ::apache::thrift::RpcOptions rpcOptions;
621 return future_void_ret_i16_param(rpcOptions, p_param1);
622 }
623
semifuture_void_ret_i16_param(::std::int16_t p_param1)624 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_i16_param(::std::int16_t p_param1) {
625 ::apache::thrift::RpcOptions rpcOptions;
626 return semifuture_void_ret_i16_param(rpcOptions, p_param1);
627 }
628
future_void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)629 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
630 folly::Promise<folly::Unit> promise;
631 auto future = promise.getFuture();
632 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_i16_param, channel_);
633 void_ret_i16_param(rpcOptions, std::move(callback), p_param1);
634 return future;
635 }
636
semifuture_void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)637 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
638 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_i16_param, channel_);
639 auto callback = std::move(callbackAndFuture.first);
640 void_ret_i16_param(rpcOptions, std::move(callback), p_param1);
641 return std::move(callbackAndFuture.second);
642 }
643
header_future_void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)644 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
645 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
646 auto future = promise.getFuture();
647 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_i16_param, channel_);
648 void_ret_i16_param(rpcOptions, std::move(callback), p_param1);
649 return future;
650 }
651
header_semifuture_void_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)652 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
653 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_i16_param, channel_);
654 auto callback = std::move(callbackAndFuture.first);
655 void_ret_i16_param(rpcOptions, std::move(callback), p_param1);
656 return std::move(callbackAndFuture.second);
657 }
658
void_ret_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int16_t p_param1)659 void ParamServiceAsyncClient::void_ret_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int16_t p_param1) {
660 void_ret_i16_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
661 }
662
663 #if FOLLY_HAS_COROUTINES
664 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_i16_param(::apache::thrift::ClientReceiveState & state)665 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_i16_param(::apache::thrift::ClientReceiveState& state) {
666 if (state.isException()) {
667 return std::move(state.exception());
668 }
669 if (!state.hasResponseBuffer()) {
670 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
671 }
672
673 using result = ParamService_void_ret_i16_param_presult;
674 switch (state.protocolId()) {
675 case apache::thrift::protocol::T_BINARY_PROTOCOL:
676 {
677 apache::thrift::BinaryProtocolReader reader;
678 return apache::thrift::detail::ac::recv_wrapped<result>(
679 &reader, state);
680 }
681 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
682 {
683 apache::thrift::CompactProtocolReader reader;
684 return apache::thrift::detail::ac::recv_wrapped<result>(
685 &reader, state);
686 }
687 default:
688 {
689 }
690 }
691 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
692 }
693
recv_void_ret_i16_param(::apache::thrift::ClientReceiveState & state)694 void ParamServiceAsyncClient::recv_void_ret_i16_param(::apache::thrift::ClientReceiveState& state) {
695 auto ew = recv_wrapped_void_ret_i16_param(state);
696 if (ew) {
697 ew.throw_exception();
698 }
699 }
700
recv_instance_void_ret_i16_param(::apache::thrift::ClientReceiveState & state)701 void ParamServiceAsyncClient::recv_instance_void_ret_i16_param(::apache::thrift::ClientReceiveState& state) {
702 recv_void_ret_i16_param(state);
703 }
704
recv_instance_wrapped_void_ret_i16_param(::apache::thrift::ClientReceiveState & state)705 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_i16_param(::apache::thrift::ClientReceiveState& state) {
706 return recv_wrapped_void_ret_i16_param(state);
707 }
708
void_ret_byte_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int8_t p_param1,::std::int16_t p_param2)709 void ParamServiceAsyncClient::void_ret_byte_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int8_t p_param1, ::std::int16_t p_param2) {
710 ::apache::thrift::RpcOptions rpcOptions;
711 void_ret_byte_i16_param(rpcOptions, std::move(callback), p_param1, p_param2);
712 }
713
void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int8_t p_param1,::std::int16_t p_param2)714 void ParamServiceAsyncClient::void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int8_t p_param1, ::std::int16_t p_param2) {
715 auto [ctx, header] = void_ret_byte_i16_paramCtx(&rpcOptions);
716 apache::thrift::RequestCallback::Context callbackContext;
717 callbackContext.protocolId =
718 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
719 auto* contextStack = ctx.get();
720 if (callback) {
721 callbackContext.ctx = std::move(ctx);
722 }
723 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
724 void_ret_byte_i16_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
725 }
726
void_ret_byte_i16_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int8_t p_param1,::std::int16_t p_param2,bool stealRpcOptions)727 void ParamServiceAsyncClient::void_ret_byte_i16_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int8_t p_param1, ::std::int16_t p_param2, bool stealRpcOptions) {
728 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
729 case apache::thrift::protocol::T_BINARY_PROTOCOL:
730 {
731 apache::thrift::BinaryProtocolWriter writer;
732 if (stealRpcOptions) {
733 void_ret_byte_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
734 } else {
735 void_ret_byte_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
736 }
737 break;
738 }
739 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
740 {
741 apache::thrift::CompactProtocolWriter writer;
742 if (stealRpcOptions) {
743 void_ret_byte_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
744 } else {
745 void_ret_byte_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
746 }
747 break;
748 }
749 default:
750 {
751 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
752 }
753 }
754 }
755
void_ret_byte_i16_paramCtx(apache::thrift::RpcOptions * rpcOptions)756 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_byte_i16_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
757 auto header = std::make_shared<apache::thrift::transport::THeader>(
758 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
759 header->setProtocolId(channel_->getProtocolId());
760 if (rpcOptions) {
761 header->setHeaders(rpcOptions->releaseWriteHeaders());
762 }
763
764 auto ctx = apache::thrift::ContextStack::createWithClientContext(
765 handlers_,
766 getServiceName(),
767 "ParamService.void_ret_byte_i16_param",
768 *header);
769
770 return {std::move(ctx), std::move(header)};
771 }
772
sync_void_ret_byte_i16_param(::std::int8_t p_param1,::std::int16_t p_param2)773 void ParamServiceAsyncClient::sync_void_ret_byte_i16_param(::std::int8_t p_param1, ::std::int16_t p_param2) {
774 ::apache::thrift::RpcOptions rpcOptions;
775 sync_void_ret_byte_i16_param(rpcOptions, p_param1, p_param2);
776 }
777
sync_void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int8_t p_param1,::std::int16_t p_param2)778 void ParamServiceAsyncClient::sync_void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_param1, ::std::int16_t p_param2) {
779 apache::thrift::ClientReceiveState returnState;
780 apache::thrift::ClientSyncCallback<false> callback(&returnState);
781 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
782 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
783 auto ctxAndHeader = void_ret_byte_i16_paramCtx(&rpcOptions);
784 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
785 callback.waitUntilDone(
786 evb,
787 [&] {
788 void_ret_byte_i16_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
789 });
790
791 if (returnState.isException()) {
792 returnState.exception().throw_exception();
793 }
794 returnState.resetProtocolId(protocolId);
795 returnState.resetCtx(std::move(ctxAndHeader.first));
796 SCOPE_EXIT {
797 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
798 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
799 }
800 };
801 return folly::fibers::runInMainContext([&] {
802 recv_void_ret_byte_i16_param(returnState);
803 });
804 }
805
806
future_void_ret_byte_i16_param(::std::int8_t p_param1,::std::int16_t p_param2)807 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_byte_i16_param(::std::int8_t p_param1, ::std::int16_t p_param2) {
808 ::apache::thrift::RpcOptions rpcOptions;
809 return future_void_ret_byte_i16_param(rpcOptions, p_param1, p_param2);
810 }
811
semifuture_void_ret_byte_i16_param(::std::int8_t p_param1,::std::int16_t p_param2)812 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_byte_i16_param(::std::int8_t p_param1, ::std::int16_t p_param2) {
813 ::apache::thrift::RpcOptions rpcOptions;
814 return semifuture_void_ret_byte_i16_param(rpcOptions, p_param1, p_param2);
815 }
816
future_void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int8_t p_param1,::std::int16_t p_param2)817 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_param1, ::std::int16_t p_param2) {
818 folly::Promise<folly::Unit> promise;
819 auto future = promise.getFuture();
820 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_byte_i16_param, channel_);
821 void_ret_byte_i16_param(rpcOptions, std::move(callback), p_param1, p_param2);
822 return future;
823 }
824
semifuture_void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int8_t p_param1,::std::int16_t p_param2)825 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_param1, ::std::int16_t p_param2) {
826 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_byte_i16_param, channel_);
827 auto callback = std::move(callbackAndFuture.first);
828 void_ret_byte_i16_param(rpcOptions, std::move(callback), p_param1, p_param2);
829 return std::move(callbackAndFuture.second);
830 }
831
header_future_void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int8_t p_param1,::std::int16_t p_param2)832 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_param1, ::std::int16_t p_param2) {
833 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
834 auto future = promise.getFuture();
835 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_byte_i16_param, channel_);
836 void_ret_byte_i16_param(rpcOptions, std::move(callback), p_param1, p_param2);
837 return future;
838 }
839
header_semifuture_void_ret_byte_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int8_t p_param1,::std::int16_t p_param2)840 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_byte_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int8_t p_param1, ::std::int16_t p_param2) {
841 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_byte_i16_param, channel_);
842 auto callback = std::move(callbackAndFuture.first);
843 void_ret_byte_i16_param(rpcOptions, std::move(callback), p_param1, p_param2);
844 return std::move(callbackAndFuture.second);
845 }
846
void_ret_byte_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int8_t p_param1,::std::int16_t p_param2)847 void ParamServiceAsyncClient::void_ret_byte_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int8_t p_param1, ::std::int16_t p_param2) {
848 void_ret_byte_i16_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
849 }
850
851 #if FOLLY_HAS_COROUTINES
852 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState & state)853 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState& state) {
854 if (state.isException()) {
855 return std::move(state.exception());
856 }
857 if (!state.hasResponseBuffer()) {
858 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
859 }
860
861 using result = ParamService_void_ret_byte_i16_param_presult;
862 switch (state.protocolId()) {
863 case apache::thrift::protocol::T_BINARY_PROTOCOL:
864 {
865 apache::thrift::BinaryProtocolReader reader;
866 return apache::thrift::detail::ac::recv_wrapped<result>(
867 &reader, state);
868 }
869 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
870 {
871 apache::thrift::CompactProtocolReader reader;
872 return apache::thrift::detail::ac::recv_wrapped<result>(
873 &reader, state);
874 }
875 default:
876 {
877 }
878 }
879 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
880 }
881
recv_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState & state)882 void ParamServiceAsyncClient::recv_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState& state) {
883 auto ew = recv_wrapped_void_ret_byte_i16_param(state);
884 if (ew) {
885 ew.throw_exception();
886 }
887 }
888
recv_instance_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState & state)889 void ParamServiceAsyncClient::recv_instance_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState& state) {
890 recv_void_ret_byte_i16_param(state);
891 }
892
recv_instance_wrapped_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState & state)893 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_byte_i16_param(::apache::thrift::ClientReceiveState& state) {
894 return recv_wrapped_void_ret_byte_i16_param(state);
895 }
896
void_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)897 void ParamServiceAsyncClient::void_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
898 ::apache::thrift::RpcOptions rpcOptions;
899 void_ret_map_param(rpcOptions, std::move(callback), p_param1);
900 }
901
void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)902 void ParamServiceAsyncClient::void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
903 auto [ctx, header] = void_ret_map_paramCtx(&rpcOptions);
904 apache::thrift::RequestCallback::Context callbackContext;
905 callbackContext.protocolId =
906 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
907 auto* contextStack = ctx.get();
908 if (callback) {
909 callbackContext.ctx = std::move(ctx);
910 }
911 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
912 void_ret_map_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
913 }
914
void_ret_map_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1,bool stealRpcOptions)915 void ParamServiceAsyncClient::void_ret_map_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, bool stealRpcOptions) {
916 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
917 case apache::thrift::protocol::T_BINARY_PROTOCOL:
918 {
919 apache::thrift::BinaryProtocolWriter writer;
920 if (stealRpcOptions) {
921 void_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
922 } else {
923 void_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
924 }
925 break;
926 }
927 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
928 {
929 apache::thrift::CompactProtocolWriter writer;
930 if (stealRpcOptions) {
931 void_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
932 } else {
933 void_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
934 }
935 break;
936 }
937 default:
938 {
939 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
940 }
941 }
942 }
943
void_ret_map_paramCtx(apache::thrift::RpcOptions * rpcOptions)944 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_map_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
945 auto header = std::make_shared<apache::thrift::transport::THeader>(
946 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
947 header->setProtocolId(channel_->getProtocolId());
948 if (rpcOptions) {
949 header->setHeaders(rpcOptions->releaseWriteHeaders());
950 }
951
952 auto ctx = apache::thrift::ContextStack::createWithClientContext(
953 handlers_,
954 getServiceName(),
955 "ParamService.void_ret_map_param",
956 *header);
957
958 return {std::move(ctx), std::move(header)};
959 }
960
sync_void_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)961 void ParamServiceAsyncClient::sync_void_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
962 ::apache::thrift::RpcOptions rpcOptions;
963 sync_void_ret_map_param(rpcOptions, p_param1);
964 }
965
sync_void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)966 void ParamServiceAsyncClient::sync_void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
967 apache::thrift::ClientReceiveState returnState;
968 apache::thrift::ClientSyncCallback<false> callback(&returnState);
969 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
970 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
971 auto ctxAndHeader = void_ret_map_paramCtx(&rpcOptions);
972 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
973 callback.waitUntilDone(
974 evb,
975 [&] {
976 void_ret_map_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
977 });
978
979 if (returnState.isException()) {
980 returnState.exception().throw_exception();
981 }
982 returnState.resetProtocolId(protocolId);
983 returnState.resetCtx(std::move(ctxAndHeader.first));
984 SCOPE_EXIT {
985 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
986 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
987 }
988 };
989 return folly::fibers::runInMainContext([&] {
990 recv_void_ret_map_param(returnState);
991 });
992 }
993
994
future_void_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)995 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
996 ::apache::thrift::RpcOptions rpcOptions;
997 return future_void_ret_map_param(rpcOptions, p_param1);
998 }
999
semifuture_void_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)1000 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1001 ::apache::thrift::RpcOptions rpcOptions;
1002 return semifuture_void_ret_map_param(rpcOptions, p_param1);
1003 }
1004
future_void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)1005 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1006 folly::Promise<folly::Unit> promise;
1007 auto future = promise.getFuture();
1008 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_param, channel_);
1009 void_ret_map_param(rpcOptions, std::move(callback), p_param1);
1010 return future;
1011 }
1012
semifuture_void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)1013 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1014 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_map_param, channel_);
1015 auto callback = std::move(callbackAndFuture.first);
1016 void_ret_map_param(rpcOptions, std::move(callback), p_param1);
1017 return std::move(callbackAndFuture.second);
1018 }
1019
header_future_void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)1020 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1021 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1022 auto future = promise.getFuture();
1023 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_param, channel_);
1024 void_ret_map_param(rpcOptions, std::move(callback), p_param1);
1025 return future;
1026 }
1027
header_semifuture_void_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)1028 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1029 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_map_param, channel_);
1030 auto callback = std::move(callbackAndFuture.first);
1031 void_ret_map_param(rpcOptions, std::move(callback), p_param1);
1032 return std::move(callbackAndFuture.second);
1033 }
1034
void_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::map<::std::string,::std::int64_t> & p_param1)1035 void ParamServiceAsyncClient::void_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
1036 void_ret_map_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
1037 }
1038
1039 #if FOLLY_HAS_COROUTINES
1040 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_map_param(::apache::thrift::ClientReceiveState & state)1041 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_map_param(::apache::thrift::ClientReceiveState& state) {
1042 if (state.isException()) {
1043 return std::move(state.exception());
1044 }
1045 if (!state.hasResponseBuffer()) {
1046 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1047 }
1048
1049 using result = ParamService_void_ret_map_param_presult;
1050 switch (state.protocolId()) {
1051 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1052 {
1053 apache::thrift::BinaryProtocolReader reader;
1054 return apache::thrift::detail::ac::recv_wrapped<result>(
1055 &reader, state);
1056 }
1057 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1058 {
1059 apache::thrift::CompactProtocolReader reader;
1060 return apache::thrift::detail::ac::recv_wrapped<result>(
1061 &reader, state);
1062 }
1063 default:
1064 {
1065 }
1066 }
1067 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
1068 }
1069
recv_void_ret_map_param(::apache::thrift::ClientReceiveState & state)1070 void ParamServiceAsyncClient::recv_void_ret_map_param(::apache::thrift::ClientReceiveState& state) {
1071 auto ew = recv_wrapped_void_ret_map_param(state);
1072 if (ew) {
1073 ew.throw_exception();
1074 }
1075 }
1076
recv_instance_void_ret_map_param(::apache::thrift::ClientReceiveState & state)1077 void ParamServiceAsyncClient::recv_instance_void_ret_map_param(::apache::thrift::ClientReceiveState& state) {
1078 recv_void_ret_map_param(state);
1079 }
1080
recv_instance_wrapped_void_ret_map_param(::apache::thrift::ClientReceiveState & state)1081 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_map_param(::apache::thrift::ClientReceiveState& state) {
1082 return recv_wrapped_void_ret_map_param(state);
1083 }
1084
void_ret_map_setlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1085 void ParamServiceAsyncClient::void_ret_map_setlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1086 ::apache::thrift::RpcOptions rpcOptions;
1087 void_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
1088 }
1089
void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1090 void ParamServiceAsyncClient::void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1091 auto [ctx, header] = void_ret_map_setlist_paramCtx(&rpcOptions);
1092 apache::thrift::RequestCallback::Context callbackContext;
1093 callbackContext.protocolId =
1094 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1095 auto* contextStack = ctx.get();
1096 if (callback) {
1097 callbackContext.ctx = std::move(ctx);
1098 }
1099 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
1100 void_ret_map_setlist_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
1101 }
1102
void_ret_map_setlist_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2,bool stealRpcOptions)1103 void ParamServiceAsyncClient::void_ret_map_setlist_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2, bool stealRpcOptions) {
1104 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
1105 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1106 {
1107 apache::thrift::BinaryProtocolWriter writer;
1108 if (stealRpcOptions) {
1109 void_ret_map_setlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
1110 } else {
1111 void_ret_map_setlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
1112 }
1113 break;
1114 }
1115 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1116 {
1117 apache::thrift::CompactProtocolWriter writer;
1118 if (stealRpcOptions) {
1119 void_ret_map_setlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
1120 } else {
1121 void_ret_map_setlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
1122 }
1123 break;
1124 }
1125 default:
1126 {
1127 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
1128 }
1129 }
1130 }
1131
void_ret_map_setlist_paramCtx(apache::thrift::RpcOptions * rpcOptions)1132 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_map_setlist_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
1133 auto header = std::make_shared<apache::thrift::transport::THeader>(
1134 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
1135 header->setProtocolId(channel_->getProtocolId());
1136 if (rpcOptions) {
1137 header->setHeaders(rpcOptions->releaseWriteHeaders());
1138 }
1139
1140 auto ctx = apache::thrift::ContextStack::createWithClientContext(
1141 handlers_,
1142 getServiceName(),
1143 "ParamService.void_ret_map_setlist_param",
1144 *header);
1145
1146 return {std::move(ctx), std::move(header)};
1147 }
1148
sync_void_ret_map_setlist_param(const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1149 void ParamServiceAsyncClient::sync_void_ret_map_setlist_param(const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1150 ::apache::thrift::RpcOptions rpcOptions;
1151 sync_void_ret_map_setlist_param(rpcOptions, p_param1, p_param2);
1152 }
1153
sync_void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1154 void ParamServiceAsyncClient::sync_void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1155 apache::thrift::ClientReceiveState returnState;
1156 apache::thrift::ClientSyncCallback<false> callback(&returnState);
1157 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1158 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
1159 auto ctxAndHeader = void_ret_map_setlist_paramCtx(&rpcOptions);
1160 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
1161 callback.waitUntilDone(
1162 evb,
1163 [&] {
1164 void_ret_map_setlist_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
1165 });
1166
1167 if (returnState.isException()) {
1168 returnState.exception().throw_exception();
1169 }
1170 returnState.resetProtocolId(protocolId);
1171 returnState.resetCtx(std::move(ctxAndHeader.first));
1172 SCOPE_EXIT {
1173 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
1174 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
1175 }
1176 };
1177 return folly::fibers::runInMainContext([&] {
1178 recv_void_ret_map_setlist_param(returnState);
1179 });
1180 }
1181
1182
future_void_ret_map_setlist_param(const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1183 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_setlist_param(const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1184 ::apache::thrift::RpcOptions rpcOptions;
1185 return future_void_ret_map_setlist_param(rpcOptions, p_param1, p_param2);
1186 }
1187
semifuture_void_ret_map_setlist_param(const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1188 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_setlist_param(const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1189 ::apache::thrift::RpcOptions rpcOptions;
1190 return semifuture_void_ret_map_setlist_param(rpcOptions, p_param1, p_param2);
1191 }
1192
future_void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1193 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1194 folly::Promise<folly::Unit> promise;
1195 auto future = promise.getFuture();
1196 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_setlist_param, channel_);
1197 void_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
1198 return future;
1199 }
1200
semifuture_void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1201 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1202 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_map_setlist_param, channel_);
1203 auto callback = std::move(callbackAndFuture.first);
1204 void_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
1205 return std::move(callbackAndFuture.second);
1206 }
1207
header_future_void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1208 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1209 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1210 auto future = promise.getFuture();
1211 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_setlist_param, channel_);
1212 void_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
1213 return future;
1214 }
1215
header_semifuture_void_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1216 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1217 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_map_setlist_param, channel_);
1218 auto callback = std::move(callbackAndFuture.first);
1219 void_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
1220 return std::move(callbackAndFuture.second);
1221 }
1222
void_ret_map_setlist_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::map<::std::string,::std::int64_t> & p_param1,const::std::set<::std::vector<::std::string>> & p_param2)1223 void ParamServiceAsyncClient::void_ret_map_setlist_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, const ::std::set<::std::vector<::std::string>>& p_param2) {
1224 void_ret_map_setlist_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
1225 }
1226
1227 #if FOLLY_HAS_COROUTINES
1228 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState & state)1229 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState& state) {
1230 if (state.isException()) {
1231 return std::move(state.exception());
1232 }
1233 if (!state.hasResponseBuffer()) {
1234 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1235 }
1236
1237 using result = ParamService_void_ret_map_setlist_param_presult;
1238 switch (state.protocolId()) {
1239 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1240 {
1241 apache::thrift::BinaryProtocolReader reader;
1242 return apache::thrift::detail::ac::recv_wrapped<result>(
1243 &reader, state);
1244 }
1245 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1246 {
1247 apache::thrift::CompactProtocolReader reader;
1248 return apache::thrift::detail::ac::recv_wrapped<result>(
1249 &reader, state);
1250 }
1251 default:
1252 {
1253 }
1254 }
1255 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
1256 }
1257
recv_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState & state)1258 void ParamServiceAsyncClient::recv_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState& state) {
1259 auto ew = recv_wrapped_void_ret_map_setlist_param(state);
1260 if (ew) {
1261 ew.throw_exception();
1262 }
1263 }
1264
recv_instance_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState & state)1265 void ParamServiceAsyncClient::recv_instance_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState& state) {
1266 recv_void_ret_map_setlist_param(state);
1267 }
1268
recv_instance_wrapped_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState & state)1269 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_map_setlist_param(::apache::thrift::ClientReceiveState& state) {
1270 return recv_wrapped_void_ret_map_setlist_param(state);
1271 }
1272
void_ret_map_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::some::valid::ns::simpleTypeDef p_param1)1273 void ParamServiceAsyncClient::void_ret_map_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::some::valid::ns::simpleTypeDef p_param1) {
1274 ::apache::thrift::RpcOptions rpcOptions;
1275 void_ret_map_typedef_param(rpcOptions, std::move(callback), p_param1);
1276 }
1277
void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::some::valid::ns::simpleTypeDef p_param1)1278 void ParamServiceAsyncClient::void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::some::valid::ns::simpleTypeDef p_param1) {
1279 auto [ctx, header] = void_ret_map_typedef_paramCtx(&rpcOptions);
1280 apache::thrift::RequestCallback::Context callbackContext;
1281 callbackContext.protocolId =
1282 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1283 auto* contextStack = ctx.get();
1284 if (callback) {
1285 callbackContext.ctx = std::move(ctx);
1286 }
1287 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
1288 void_ret_map_typedef_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
1289 }
1290
void_ret_map_typedef_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::some::valid::ns::simpleTypeDef p_param1,bool stealRpcOptions)1291 void ParamServiceAsyncClient::void_ret_map_typedef_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::some::valid::ns::simpleTypeDef p_param1, bool stealRpcOptions) {
1292 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
1293 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1294 {
1295 apache::thrift::BinaryProtocolWriter writer;
1296 if (stealRpcOptions) {
1297 void_ret_map_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1298 } else {
1299 void_ret_map_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1300 }
1301 break;
1302 }
1303 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1304 {
1305 apache::thrift::CompactProtocolWriter writer;
1306 if (stealRpcOptions) {
1307 void_ret_map_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1308 } else {
1309 void_ret_map_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1310 }
1311 break;
1312 }
1313 default:
1314 {
1315 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
1316 }
1317 }
1318 }
1319
void_ret_map_typedef_paramCtx(apache::thrift::RpcOptions * rpcOptions)1320 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_map_typedef_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
1321 auto header = std::make_shared<apache::thrift::transport::THeader>(
1322 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
1323 header->setProtocolId(channel_->getProtocolId());
1324 if (rpcOptions) {
1325 header->setHeaders(rpcOptions->releaseWriteHeaders());
1326 }
1327
1328 auto ctx = apache::thrift::ContextStack::createWithClientContext(
1329 handlers_,
1330 getServiceName(),
1331 "ParamService.void_ret_map_typedef_param",
1332 *header);
1333
1334 return {std::move(ctx), std::move(header)};
1335 }
1336
sync_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1)1337 void ParamServiceAsyncClient::sync_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1) {
1338 ::apache::thrift::RpcOptions rpcOptions;
1339 sync_void_ret_map_typedef_param(rpcOptions, p_param1);
1340 }
1341
sync_void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::simpleTypeDef p_param1)1342 void ParamServiceAsyncClient::sync_void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::simpleTypeDef p_param1) {
1343 apache::thrift::ClientReceiveState returnState;
1344 apache::thrift::ClientSyncCallback<false> callback(&returnState);
1345 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1346 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
1347 auto ctxAndHeader = void_ret_map_typedef_paramCtx(&rpcOptions);
1348 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
1349 callback.waitUntilDone(
1350 evb,
1351 [&] {
1352 void_ret_map_typedef_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
1353 });
1354
1355 if (returnState.isException()) {
1356 returnState.exception().throw_exception();
1357 }
1358 returnState.resetProtocolId(protocolId);
1359 returnState.resetCtx(std::move(ctxAndHeader.first));
1360 SCOPE_EXIT {
1361 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
1362 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
1363 }
1364 };
1365 return folly::fibers::runInMainContext([&] {
1366 recv_void_ret_map_typedef_param(returnState);
1367 });
1368 }
1369
1370
future_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1)1371 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1) {
1372 ::apache::thrift::RpcOptions rpcOptions;
1373 return future_void_ret_map_typedef_param(rpcOptions, p_param1);
1374 }
1375
semifuture_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1)1376 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_typedef_param(::some::valid::ns::simpleTypeDef p_param1) {
1377 ::apache::thrift::RpcOptions rpcOptions;
1378 return semifuture_void_ret_map_typedef_param(rpcOptions, p_param1);
1379 }
1380
future_void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::simpleTypeDef p_param1)1381 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::simpleTypeDef p_param1) {
1382 folly::Promise<folly::Unit> promise;
1383 auto future = promise.getFuture();
1384 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_typedef_param, channel_);
1385 void_ret_map_typedef_param(rpcOptions, std::move(callback), p_param1);
1386 return future;
1387 }
1388
semifuture_void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::simpleTypeDef p_param1)1389 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::simpleTypeDef p_param1) {
1390 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_map_typedef_param, channel_);
1391 auto callback = std::move(callbackAndFuture.first);
1392 void_ret_map_typedef_param(rpcOptions, std::move(callback), p_param1);
1393 return std::move(callbackAndFuture.second);
1394 }
1395
header_future_void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::simpleTypeDef p_param1)1396 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::simpleTypeDef p_param1) {
1397 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1398 auto future = promise.getFuture();
1399 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_map_typedef_param, channel_);
1400 void_ret_map_typedef_param(rpcOptions, std::move(callback), p_param1);
1401 return future;
1402 }
1403
header_semifuture_void_ret_map_typedef_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::simpleTypeDef p_param1)1404 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_map_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::simpleTypeDef p_param1) {
1405 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_map_typedef_param, channel_);
1406 auto callback = std::move(callbackAndFuture.first);
1407 void_ret_map_typedef_param(rpcOptions, std::move(callback), p_param1);
1408 return std::move(callbackAndFuture.second);
1409 }
1410
void_ret_map_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::some::valid::ns::simpleTypeDef p_param1)1411 void ParamServiceAsyncClient::void_ret_map_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::some::valid::ns::simpleTypeDef p_param1) {
1412 void_ret_map_typedef_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
1413 }
1414
1415 #if FOLLY_HAS_COROUTINES
1416 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState & state)1417 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState& state) {
1418 if (state.isException()) {
1419 return std::move(state.exception());
1420 }
1421 if (!state.hasResponseBuffer()) {
1422 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1423 }
1424
1425 using result = ParamService_void_ret_map_typedef_param_presult;
1426 switch (state.protocolId()) {
1427 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1428 {
1429 apache::thrift::BinaryProtocolReader reader;
1430 return apache::thrift::detail::ac::recv_wrapped<result>(
1431 &reader, state);
1432 }
1433 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1434 {
1435 apache::thrift::CompactProtocolReader reader;
1436 return apache::thrift::detail::ac::recv_wrapped<result>(
1437 &reader, state);
1438 }
1439 default:
1440 {
1441 }
1442 }
1443 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
1444 }
1445
recv_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState & state)1446 void ParamServiceAsyncClient::recv_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState& state) {
1447 auto ew = recv_wrapped_void_ret_map_typedef_param(state);
1448 if (ew) {
1449 ew.throw_exception();
1450 }
1451 }
1452
recv_instance_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState & state)1453 void ParamServiceAsyncClient::recv_instance_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState& state) {
1454 recv_void_ret_map_typedef_param(state);
1455 }
1456
recv_instance_wrapped_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState & state)1457 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_map_typedef_param(::apache::thrift::ClientReceiveState& state) {
1458 return recv_wrapped_void_ret_map_typedef_param(state);
1459 }
1460
void_ret_enum_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::some::valid::ns::MyEnumA p_param1)1461 void ParamServiceAsyncClient::void_ret_enum_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::some::valid::ns::MyEnumA p_param1) {
1462 ::apache::thrift::RpcOptions rpcOptions;
1463 void_ret_enum_param(rpcOptions, std::move(callback), p_param1);
1464 }
1465
void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::some::valid::ns::MyEnumA p_param1)1466 void ParamServiceAsyncClient::void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::some::valid::ns::MyEnumA p_param1) {
1467 auto [ctx, header] = void_ret_enum_paramCtx(&rpcOptions);
1468 apache::thrift::RequestCallback::Context callbackContext;
1469 callbackContext.protocolId =
1470 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1471 auto* contextStack = ctx.get();
1472 if (callback) {
1473 callbackContext.ctx = std::move(ctx);
1474 }
1475 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
1476 void_ret_enum_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
1477 }
1478
void_ret_enum_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::some::valid::ns::MyEnumA p_param1,bool stealRpcOptions)1479 void ParamServiceAsyncClient::void_ret_enum_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::some::valid::ns::MyEnumA p_param1, bool stealRpcOptions) {
1480 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
1481 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1482 {
1483 apache::thrift::BinaryProtocolWriter writer;
1484 if (stealRpcOptions) {
1485 void_ret_enum_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1486 } else {
1487 void_ret_enum_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1488 }
1489 break;
1490 }
1491 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1492 {
1493 apache::thrift::CompactProtocolWriter writer;
1494 if (stealRpcOptions) {
1495 void_ret_enum_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1496 } else {
1497 void_ret_enum_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1498 }
1499 break;
1500 }
1501 default:
1502 {
1503 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
1504 }
1505 }
1506 }
1507
void_ret_enum_paramCtx(apache::thrift::RpcOptions * rpcOptions)1508 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_enum_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
1509 auto header = std::make_shared<apache::thrift::transport::THeader>(
1510 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
1511 header->setProtocolId(channel_->getProtocolId());
1512 if (rpcOptions) {
1513 header->setHeaders(rpcOptions->releaseWriteHeaders());
1514 }
1515
1516 auto ctx = apache::thrift::ContextStack::createWithClientContext(
1517 handlers_,
1518 getServiceName(),
1519 "ParamService.void_ret_enum_param",
1520 *header);
1521
1522 return {std::move(ctx), std::move(header)};
1523 }
1524
sync_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1)1525 void ParamServiceAsyncClient::sync_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1) {
1526 ::apache::thrift::RpcOptions rpcOptions;
1527 sync_void_ret_enum_param(rpcOptions, p_param1);
1528 }
1529
sync_void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyEnumA p_param1)1530 void ParamServiceAsyncClient::sync_void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyEnumA p_param1) {
1531 apache::thrift::ClientReceiveState returnState;
1532 apache::thrift::ClientSyncCallback<false> callback(&returnState);
1533 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1534 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
1535 auto ctxAndHeader = void_ret_enum_paramCtx(&rpcOptions);
1536 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
1537 callback.waitUntilDone(
1538 evb,
1539 [&] {
1540 void_ret_enum_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
1541 });
1542
1543 if (returnState.isException()) {
1544 returnState.exception().throw_exception();
1545 }
1546 returnState.resetProtocolId(protocolId);
1547 returnState.resetCtx(std::move(ctxAndHeader.first));
1548 SCOPE_EXIT {
1549 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
1550 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
1551 }
1552 };
1553 return folly::fibers::runInMainContext([&] {
1554 recv_void_ret_enum_param(returnState);
1555 });
1556 }
1557
1558
future_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1)1559 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1) {
1560 ::apache::thrift::RpcOptions rpcOptions;
1561 return future_void_ret_enum_param(rpcOptions, p_param1);
1562 }
1563
semifuture_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1)1564 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_enum_param(::some::valid::ns::MyEnumA p_param1) {
1565 ::apache::thrift::RpcOptions rpcOptions;
1566 return semifuture_void_ret_enum_param(rpcOptions, p_param1);
1567 }
1568
future_void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyEnumA p_param1)1569 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyEnumA p_param1) {
1570 folly::Promise<folly::Unit> promise;
1571 auto future = promise.getFuture();
1572 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_enum_param, channel_);
1573 void_ret_enum_param(rpcOptions, std::move(callback), p_param1);
1574 return future;
1575 }
1576
semifuture_void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyEnumA p_param1)1577 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyEnumA p_param1) {
1578 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_enum_param, channel_);
1579 auto callback = std::move(callbackAndFuture.first);
1580 void_ret_enum_param(rpcOptions, std::move(callback), p_param1);
1581 return std::move(callbackAndFuture.second);
1582 }
1583
header_future_void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyEnumA p_param1)1584 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyEnumA p_param1) {
1585 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1586 auto future = promise.getFuture();
1587 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_enum_param, channel_);
1588 void_ret_enum_param(rpcOptions, std::move(callback), p_param1);
1589 return future;
1590 }
1591
header_semifuture_void_ret_enum_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyEnumA p_param1)1592 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_enum_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyEnumA p_param1) {
1593 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_enum_param, channel_);
1594 auto callback = std::move(callbackAndFuture.first);
1595 void_ret_enum_param(rpcOptions, std::move(callback), p_param1);
1596 return std::move(callbackAndFuture.second);
1597 }
1598
void_ret_enum_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::some::valid::ns::MyEnumA p_param1)1599 void ParamServiceAsyncClient::void_ret_enum_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::some::valid::ns::MyEnumA p_param1) {
1600 void_ret_enum_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
1601 }
1602
1603 #if FOLLY_HAS_COROUTINES
1604 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_enum_param(::apache::thrift::ClientReceiveState & state)1605 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_enum_param(::apache::thrift::ClientReceiveState& state) {
1606 if (state.isException()) {
1607 return std::move(state.exception());
1608 }
1609 if (!state.hasResponseBuffer()) {
1610 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1611 }
1612
1613 using result = ParamService_void_ret_enum_param_presult;
1614 switch (state.protocolId()) {
1615 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1616 {
1617 apache::thrift::BinaryProtocolReader reader;
1618 return apache::thrift::detail::ac::recv_wrapped<result>(
1619 &reader, state);
1620 }
1621 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1622 {
1623 apache::thrift::CompactProtocolReader reader;
1624 return apache::thrift::detail::ac::recv_wrapped<result>(
1625 &reader, state);
1626 }
1627 default:
1628 {
1629 }
1630 }
1631 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
1632 }
1633
recv_void_ret_enum_param(::apache::thrift::ClientReceiveState & state)1634 void ParamServiceAsyncClient::recv_void_ret_enum_param(::apache::thrift::ClientReceiveState& state) {
1635 auto ew = recv_wrapped_void_ret_enum_param(state);
1636 if (ew) {
1637 ew.throw_exception();
1638 }
1639 }
1640
recv_instance_void_ret_enum_param(::apache::thrift::ClientReceiveState & state)1641 void ParamServiceAsyncClient::recv_instance_void_ret_enum_param(::apache::thrift::ClientReceiveState& state) {
1642 recv_void_ret_enum_param(state);
1643 }
1644
recv_instance_wrapped_void_ret_enum_param(::apache::thrift::ClientReceiveState & state)1645 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_enum_param(::apache::thrift::ClientReceiveState& state) {
1646 return recv_wrapped_void_ret_enum_param(state);
1647 }
1648
void_ret_struct_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::MyStruct & p_param1)1649 void ParamServiceAsyncClient::void_ret_struct_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::MyStruct& p_param1) {
1650 ::apache::thrift::RpcOptions rpcOptions;
1651 void_ret_struct_param(rpcOptions, std::move(callback), p_param1);
1652 }
1653
void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::MyStruct & p_param1)1654 void ParamServiceAsyncClient::void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::MyStruct& p_param1) {
1655 auto [ctx, header] = void_ret_struct_paramCtx(&rpcOptions);
1656 apache::thrift::RequestCallback::Context callbackContext;
1657 callbackContext.protocolId =
1658 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1659 auto* contextStack = ctx.get();
1660 if (callback) {
1661 callbackContext.ctx = std::move(ctx);
1662 }
1663 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
1664 void_ret_struct_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
1665 }
1666
void_ret_struct_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::MyStruct & p_param1,bool stealRpcOptions)1667 void ParamServiceAsyncClient::void_ret_struct_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::MyStruct& p_param1, bool stealRpcOptions) {
1668 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
1669 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1670 {
1671 apache::thrift::BinaryProtocolWriter writer;
1672 if (stealRpcOptions) {
1673 void_ret_struct_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1674 } else {
1675 void_ret_struct_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1676 }
1677 break;
1678 }
1679 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1680 {
1681 apache::thrift::CompactProtocolWriter writer;
1682 if (stealRpcOptions) {
1683 void_ret_struct_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1684 } else {
1685 void_ret_struct_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1686 }
1687 break;
1688 }
1689 default:
1690 {
1691 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
1692 }
1693 }
1694 }
1695
void_ret_struct_paramCtx(apache::thrift::RpcOptions * rpcOptions)1696 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_struct_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
1697 auto header = std::make_shared<apache::thrift::transport::THeader>(
1698 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
1699 header->setProtocolId(channel_->getProtocolId());
1700 if (rpcOptions) {
1701 header->setHeaders(rpcOptions->releaseWriteHeaders());
1702 }
1703
1704 auto ctx = apache::thrift::ContextStack::createWithClientContext(
1705 handlers_,
1706 getServiceName(),
1707 "ParamService.void_ret_struct_param",
1708 *header);
1709
1710 return {std::move(ctx), std::move(header)};
1711 }
1712
sync_void_ret_struct_param(const::some::valid::ns::MyStruct & p_param1)1713 void ParamServiceAsyncClient::sync_void_ret_struct_param(const ::some::valid::ns::MyStruct& p_param1) {
1714 ::apache::thrift::RpcOptions rpcOptions;
1715 sync_void_ret_struct_param(rpcOptions, p_param1);
1716 }
1717
sync_void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::MyStruct & p_param1)1718 void ParamServiceAsyncClient::sync_void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::MyStruct& p_param1) {
1719 apache::thrift::ClientReceiveState returnState;
1720 apache::thrift::ClientSyncCallback<false> callback(&returnState);
1721 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1722 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
1723 auto ctxAndHeader = void_ret_struct_paramCtx(&rpcOptions);
1724 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
1725 callback.waitUntilDone(
1726 evb,
1727 [&] {
1728 void_ret_struct_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
1729 });
1730
1731 if (returnState.isException()) {
1732 returnState.exception().throw_exception();
1733 }
1734 returnState.resetProtocolId(protocolId);
1735 returnState.resetCtx(std::move(ctxAndHeader.first));
1736 SCOPE_EXIT {
1737 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
1738 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
1739 }
1740 };
1741 return folly::fibers::runInMainContext([&] {
1742 recv_void_ret_struct_param(returnState);
1743 });
1744 }
1745
1746
future_void_ret_struct_param(const::some::valid::ns::MyStruct & p_param1)1747 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_struct_param(const ::some::valid::ns::MyStruct& p_param1) {
1748 ::apache::thrift::RpcOptions rpcOptions;
1749 return future_void_ret_struct_param(rpcOptions, p_param1);
1750 }
1751
semifuture_void_ret_struct_param(const::some::valid::ns::MyStruct & p_param1)1752 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_struct_param(const ::some::valid::ns::MyStruct& p_param1) {
1753 ::apache::thrift::RpcOptions rpcOptions;
1754 return semifuture_void_ret_struct_param(rpcOptions, p_param1);
1755 }
1756
future_void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::MyStruct & p_param1)1757 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::MyStruct& p_param1) {
1758 folly::Promise<folly::Unit> promise;
1759 auto future = promise.getFuture();
1760 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_struct_param, channel_);
1761 void_ret_struct_param(rpcOptions, std::move(callback), p_param1);
1762 return future;
1763 }
1764
semifuture_void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::MyStruct & p_param1)1765 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::MyStruct& p_param1) {
1766 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_struct_param, channel_);
1767 auto callback = std::move(callbackAndFuture.first);
1768 void_ret_struct_param(rpcOptions, std::move(callback), p_param1);
1769 return std::move(callbackAndFuture.second);
1770 }
1771
header_future_void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::MyStruct & p_param1)1772 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::MyStruct& p_param1) {
1773 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1774 auto future = promise.getFuture();
1775 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_struct_param, channel_);
1776 void_ret_struct_param(rpcOptions, std::move(callback), p_param1);
1777 return future;
1778 }
1779
header_semifuture_void_ret_struct_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::MyStruct & p_param1)1780 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_struct_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::MyStruct& p_param1) {
1781 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_struct_param, channel_);
1782 auto callback = std::move(callbackAndFuture.first);
1783 void_ret_struct_param(rpcOptions, std::move(callback), p_param1);
1784 return std::move(callbackAndFuture.second);
1785 }
1786
void_ret_struct_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::some::valid::ns::MyStruct & p_param1)1787 void ParamServiceAsyncClient::void_ret_struct_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::some::valid::ns::MyStruct& p_param1) {
1788 void_ret_struct_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
1789 }
1790
1791 #if FOLLY_HAS_COROUTINES
1792 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_struct_param(::apache::thrift::ClientReceiveState & state)1793 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_struct_param(::apache::thrift::ClientReceiveState& state) {
1794 if (state.isException()) {
1795 return std::move(state.exception());
1796 }
1797 if (!state.hasResponseBuffer()) {
1798 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1799 }
1800
1801 using result = ParamService_void_ret_struct_param_presult;
1802 switch (state.protocolId()) {
1803 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1804 {
1805 apache::thrift::BinaryProtocolReader reader;
1806 return apache::thrift::detail::ac::recv_wrapped<result>(
1807 &reader, state);
1808 }
1809 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1810 {
1811 apache::thrift::CompactProtocolReader reader;
1812 return apache::thrift::detail::ac::recv_wrapped<result>(
1813 &reader, state);
1814 }
1815 default:
1816 {
1817 }
1818 }
1819 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
1820 }
1821
recv_void_ret_struct_param(::apache::thrift::ClientReceiveState & state)1822 void ParamServiceAsyncClient::recv_void_ret_struct_param(::apache::thrift::ClientReceiveState& state) {
1823 auto ew = recv_wrapped_void_ret_struct_param(state);
1824 if (ew) {
1825 ew.throw_exception();
1826 }
1827 }
1828
recv_instance_void_ret_struct_param(::apache::thrift::ClientReceiveState & state)1829 void ParamServiceAsyncClient::recv_instance_void_ret_struct_param(::apache::thrift::ClientReceiveState& state) {
1830 recv_void_ret_struct_param(state);
1831 }
1832
recv_instance_wrapped_void_ret_struct_param(::apache::thrift::ClientReceiveState & state)1833 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_struct_param(::apache::thrift::ClientReceiveState& state) {
1834 return recv_wrapped_void_ret_struct_param(state);
1835 }
1836
void_ret_listunion_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1837 void ParamServiceAsyncClient::void_ret_listunion_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1838 ::apache::thrift::RpcOptions rpcOptions;
1839 void_ret_listunion_param(rpcOptions, std::move(callback), p_param1);
1840 }
1841
void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1842 void ParamServiceAsyncClient::void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1843 auto [ctx, header] = void_ret_listunion_paramCtx(&rpcOptions);
1844 apache::thrift::RequestCallback::Context callbackContext;
1845 callbackContext.protocolId =
1846 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1847 auto* contextStack = ctx.get();
1848 if (callback) {
1849 callbackContext.ctx = std::move(ctx);
1850 }
1851 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
1852 void_ret_listunion_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
1853 }
1854
void_ret_listunion_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1,bool stealRpcOptions)1855 void ParamServiceAsyncClient::void_ret_listunion_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1, bool stealRpcOptions) {
1856 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
1857 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1858 {
1859 apache::thrift::BinaryProtocolWriter writer;
1860 if (stealRpcOptions) {
1861 void_ret_listunion_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1862 } else {
1863 void_ret_listunion_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1864 }
1865 break;
1866 }
1867 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1868 {
1869 apache::thrift::CompactProtocolWriter writer;
1870 if (stealRpcOptions) {
1871 void_ret_listunion_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
1872 } else {
1873 void_ret_listunion_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
1874 }
1875 break;
1876 }
1877 default:
1878 {
1879 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
1880 }
1881 }
1882 }
1883
void_ret_listunion_paramCtx(apache::thrift::RpcOptions * rpcOptions)1884 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::void_ret_listunion_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
1885 auto header = std::make_shared<apache::thrift::transport::THeader>(
1886 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
1887 header->setProtocolId(channel_->getProtocolId());
1888 if (rpcOptions) {
1889 header->setHeaders(rpcOptions->releaseWriteHeaders());
1890 }
1891
1892 auto ctx = apache::thrift::ContextStack::createWithClientContext(
1893 handlers_,
1894 getServiceName(),
1895 "ParamService.void_ret_listunion_param",
1896 *header);
1897
1898 return {std::move(ctx), std::move(header)};
1899 }
1900
sync_void_ret_listunion_param(const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1901 void ParamServiceAsyncClient::sync_void_ret_listunion_param(const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1902 ::apache::thrift::RpcOptions rpcOptions;
1903 sync_void_ret_listunion_param(rpcOptions, p_param1);
1904 }
1905
sync_void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1906 void ParamServiceAsyncClient::sync_void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1907 apache::thrift::ClientReceiveState returnState;
1908 apache::thrift::ClientSyncCallback<false> callback(&returnState);
1909 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
1910 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
1911 auto ctxAndHeader = void_ret_listunion_paramCtx(&rpcOptions);
1912 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
1913 callback.waitUntilDone(
1914 evb,
1915 [&] {
1916 void_ret_listunion_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
1917 });
1918
1919 if (returnState.isException()) {
1920 returnState.exception().throw_exception();
1921 }
1922 returnState.resetProtocolId(protocolId);
1923 returnState.resetCtx(std::move(ctxAndHeader.first));
1924 SCOPE_EXIT {
1925 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
1926 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
1927 }
1928 };
1929 return folly::fibers::runInMainContext([&] {
1930 recv_void_ret_listunion_param(returnState);
1931 });
1932 }
1933
1934
future_void_ret_listunion_param(const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1935 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_listunion_param(const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1936 ::apache::thrift::RpcOptions rpcOptions;
1937 return future_void_ret_listunion_param(rpcOptions, p_param1);
1938 }
1939
semifuture_void_ret_listunion_param(const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1940 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_listunion_param(const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1941 ::apache::thrift::RpcOptions rpcOptions;
1942 return semifuture_void_ret_listunion_param(rpcOptions, p_param1);
1943 }
1944
future_void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1945 folly::Future<folly::Unit> ParamServiceAsyncClient::future_void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1946 folly::Promise<folly::Unit> promise;
1947 auto future = promise.getFuture();
1948 auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_listunion_param, channel_);
1949 void_ret_listunion_param(rpcOptions, std::move(callback), p_param1);
1950 return future;
1951 }
1952
semifuture_void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1953 folly::SemiFuture<folly::Unit> ParamServiceAsyncClient::semifuture_void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1954 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_void_ret_listunion_param, channel_);
1955 auto callback = std::move(callbackAndFuture.first);
1956 void_ret_listunion_param(rpcOptions, std::move(callback), p_param1);
1957 return std::move(callbackAndFuture.second);
1958 }
1959
header_future_void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1960 folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1961 folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
1962 auto future = promise.getFuture();
1963 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_void_ret_listunion_param, channel_);
1964 void_ret_listunion_param(rpcOptions, std::move(callback), p_param1);
1965 return future;
1966 }
1967
header_semifuture_void_ret_listunion_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1968 folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_void_ret_listunion_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1969 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_void_ret_listunion_param, channel_);
1970 auto callback = std::move(callbackAndFuture.first);
1971 void_ret_listunion_param(rpcOptions, std::move(callback), p_param1);
1972 return std::move(callbackAndFuture.second);
1973 }
1974
void_ret_listunion_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::vector<::some::valid::ns::ComplexUnion> & p_param1)1975 void ParamServiceAsyncClient::void_ret_listunion_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::vector<::some::valid::ns::ComplexUnion>& p_param1) {
1976 void_ret_listunion_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
1977 }
1978
1979 #if FOLLY_HAS_COROUTINES
1980 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_void_ret_listunion_param(::apache::thrift::ClientReceiveState & state)1981 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_void_ret_listunion_param(::apache::thrift::ClientReceiveState& state) {
1982 if (state.isException()) {
1983 return std::move(state.exception());
1984 }
1985 if (!state.hasResponseBuffer()) {
1986 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
1987 }
1988
1989 using result = ParamService_void_ret_listunion_param_presult;
1990 switch (state.protocolId()) {
1991 case apache::thrift::protocol::T_BINARY_PROTOCOL:
1992 {
1993 apache::thrift::BinaryProtocolReader reader;
1994 return apache::thrift::detail::ac::recv_wrapped<result>(
1995 &reader, state);
1996 }
1997 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
1998 {
1999 apache::thrift::CompactProtocolReader reader;
2000 return apache::thrift::detail::ac::recv_wrapped<result>(
2001 &reader, state);
2002 }
2003 default:
2004 {
2005 }
2006 }
2007 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2008 }
2009
recv_void_ret_listunion_param(::apache::thrift::ClientReceiveState & state)2010 void ParamServiceAsyncClient::recv_void_ret_listunion_param(::apache::thrift::ClientReceiveState& state) {
2011 auto ew = recv_wrapped_void_ret_listunion_param(state);
2012 if (ew) {
2013 ew.throw_exception();
2014 }
2015 }
2016
recv_instance_void_ret_listunion_param(::apache::thrift::ClientReceiveState & state)2017 void ParamServiceAsyncClient::recv_instance_void_ret_listunion_param(::apache::thrift::ClientReceiveState& state) {
2018 recv_void_ret_listunion_param(state);
2019 }
2020
recv_instance_wrapped_void_ret_listunion_param(::apache::thrift::ClientReceiveState & state)2021 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_void_ret_listunion_param(::apache::thrift::ClientReceiveState& state) {
2022 return recv_wrapped_void_ret_listunion_param(state);
2023 }
2024
bool_ret_i32_i64_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int64_t p_param2)2025 void ParamServiceAsyncClient::bool_ret_i32_i64_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2026 ::apache::thrift::RpcOptions rpcOptions;
2027 bool_ret_i32_i64_param(rpcOptions, std::move(callback), p_param1, p_param2);
2028 }
2029
bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int64_t p_param2)2030 void ParamServiceAsyncClient::bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2031 auto [ctx, header] = bool_ret_i32_i64_paramCtx(&rpcOptions);
2032 apache::thrift::RequestCallback::Context callbackContext;
2033 callbackContext.protocolId =
2034 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2035 auto* contextStack = ctx.get();
2036 if (callback) {
2037 callbackContext.ctx = std::move(ctx);
2038 }
2039 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2040 bool_ret_i32_i64_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
2041 }
2042
bool_ret_i32_i64_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int64_t p_param2,bool stealRpcOptions)2043 void ParamServiceAsyncClient::bool_ret_i32_i64_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int64_t p_param2, bool stealRpcOptions) {
2044 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2045 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2046 {
2047 apache::thrift::BinaryProtocolWriter writer;
2048 if (stealRpcOptions) {
2049 bool_ret_i32_i64_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2050 } else {
2051 bool_ret_i32_i64_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2052 }
2053 break;
2054 }
2055 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2056 {
2057 apache::thrift::CompactProtocolWriter writer;
2058 if (stealRpcOptions) {
2059 bool_ret_i32_i64_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2060 } else {
2061 bool_ret_i32_i64_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2062 }
2063 break;
2064 }
2065 default:
2066 {
2067 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
2068 }
2069 }
2070 }
2071
bool_ret_i32_i64_paramCtx(apache::thrift::RpcOptions * rpcOptions)2072 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::bool_ret_i32_i64_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
2073 auto header = std::make_shared<apache::thrift::transport::THeader>(
2074 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
2075 header->setProtocolId(channel_->getProtocolId());
2076 if (rpcOptions) {
2077 header->setHeaders(rpcOptions->releaseWriteHeaders());
2078 }
2079
2080 auto ctx = apache::thrift::ContextStack::createWithClientContext(
2081 handlers_,
2082 getServiceName(),
2083 "ParamService.bool_ret_i32_i64_param",
2084 *header);
2085
2086 return {std::move(ctx), std::move(header)};
2087 }
2088
sync_bool_ret_i32_i64_param(::std::int32_t p_param1,::std::int64_t p_param2)2089 bool ParamServiceAsyncClient::sync_bool_ret_i32_i64_param(::std::int32_t p_param1, ::std::int64_t p_param2) {
2090 ::apache::thrift::RpcOptions rpcOptions;
2091 return sync_bool_ret_i32_i64_param(rpcOptions, p_param1, p_param2);
2092 }
2093
sync_bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int64_t p_param2)2094 bool ParamServiceAsyncClient::sync_bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2095 apache::thrift::ClientReceiveState returnState;
2096 apache::thrift::ClientSyncCallback<false> callback(&returnState);
2097 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2098 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
2099 auto ctxAndHeader = bool_ret_i32_i64_paramCtx(&rpcOptions);
2100 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
2101 callback.waitUntilDone(
2102 evb,
2103 [&] {
2104 bool_ret_i32_i64_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
2105 });
2106
2107 if (returnState.isException()) {
2108 returnState.exception().throw_exception();
2109 }
2110 returnState.resetProtocolId(protocolId);
2111 returnState.resetCtx(std::move(ctxAndHeader.first));
2112 SCOPE_EXIT {
2113 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
2114 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
2115 }
2116 };
2117 return folly::fibers::runInMainContext([&] {
2118 return recv_bool_ret_i32_i64_param(returnState);
2119 });
2120 }
2121
2122
future_bool_ret_i32_i64_param(::std::int32_t p_param1,::std::int64_t p_param2)2123 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_i32_i64_param(::std::int32_t p_param1, ::std::int64_t p_param2) {
2124 ::apache::thrift::RpcOptions rpcOptions;
2125 return future_bool_ret_i32_i64_param(rpcOptions, p_param1, p_param2);
2126 }
2127
semifuture_bool_ret_i32_i64_param(::std::int32_t p_param1,::std::int64_t p_param2)2128 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_i32_i64_param(::std::int32_t p_param1, ::std::int64_t p_param2) {
2129 ::apache::thrift::RpcOptions rpcOptions;
2130 return semifuture_bool_ret_i32_i64_param(rpcOptions, p_param1, p_param2);
2131 }
2132
future_bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int64_t p_param2)2133 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2134 folly::Promise<bool> promise;
2135 auto future = promise.getFuture();
2136 auto callback = std::make_unique<apache::thrift::FutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_i32_i64_param, channel_);
2137 bool_ret_i32_i64_param(rpcOptions, std::move(callback), p_param1, p_param2);
2138 return future;
2139 }
2140
semifuture_bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int64_t p_param2)2141 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2142 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_bool_ret_i32_i64_param, channel_);
2143 auto callback = std::move(callbackAndFuture.first);
2144 bool_ret_i32_i64_param(rpcOptions, std::move(callback), p_param1, p_param2);
2145 return std::move(callbackAndFuture.second);
2146 }
2147
header_future_bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int64_t p_param2)2148 folly::Future<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2149 folly::Promise<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
2150 auto future = promise.getFuture();
2151 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_i32_i64_param, channel_);
2152 bool_ret_i32_i64_param(rpcOptions, std::move(callback), p_param1, p_param2);
2153 return future;
2154 }
2155
header_semifuture_bool_ret_i32_i64_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int64_t p_param2)2156 folly::SemiFuture<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_bool_ret_i32_i64_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2157 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_bool_ret_i32_i64_param, channel_);
2158 auto callback = std::move(callbackAndFuture.first);
2159 bool_ret_i32_i64_param(rpcOptions, std::move(callback), p_param1, p_param2);
2160 return std::move(callbackAndFuture.second);
2161 }
2162
bool_ret_i32_i64_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int32_t p_param1,::std::int64_t p_param2)2163 void ParamServiceAsyncClient::bool_ret_i32_i64_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int32_t p_param1, ::std::int64_t p_param2) {
2164 bool_ret_i32_i64_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
2165 }
2166
2167 #if FOLLY_HAS_COROUTINES
2168 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_bool_ret_i32_i64_param(bool & _return,::apache::thrift::ClientReceiveState & state)2169 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_bool_ret_i32_i64_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2170 if (state.isException()) {
2171 return std::move(state.exception());
2172 }
2173 if (!state.hasResponseBuffer()) {
2174 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
2175 }
2176
2177 using result = ParamService_bool_ret_i32_i64_param_presult;
2178 switch (state.protocolId()) {
2179 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2180 {
2181 apache::thrift::BinaryProtocolReader reader;
2182 return apache::thrift::detail::ac::recv_wrapped<result>(
2183 &reader, state, _return);
2184 }
2185 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2186 {
2187 apache::thrift::CompactProtocolReader reader;
2188 return apache::thrift::detail::ac::recv_wrapped<result>(
2189 &reader, state, _return);
2190 }
2191 default:
2192 {
2193 }
2194 }
2195 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2196 }
2197
recv_bool_ret_i32_i64_param(::apache::thrift::ClientReceiveState & state)2198 bool ParamServiceAsyncClient::recv_bool_ret_i32_i64_param(::apache::thrift::ClientReceiveState& state) {
2199 bool _return;
2200 auto ew = recv_wrapped_bool_ret_i32_i64_param(_return, state);
2201 if (ew) {
2202 ew.throw_exception();
2203 }
2204 return _return;
2205 }
2206
recv_instance_bool_ret_i32_i64_param(::apache::thrift::ClientReceiveState & state)2207 bool ParamServiceAsyncClient::recv_instance_bool_ret_i32_i64_param(::apache::thrift::ClientReceiveState& state) {
2208 return recv_bool_ret_i32_i64_param(state);
2209 }
2210
recv_instance_wrapped_bool_ret_i32_i64_param(bool & _return,::apache::thrift::ClientReceiveState & state)2211 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_bool_ret_i32_i64_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2212 return recv_wrapped_bool_ret_i32_i64_param(_return, state);
2213 }
2214
bool_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)2215 void ParamServiceAsyncClient::bool_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2216 ::apache::thrift::RpcOptions rpcOptions;
2217 bool_ret_map_param(rpcOptions, std::move(callback), p_param1);
2218 }
2219
bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)2220 void ParamServiceAsyncClient::bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2221 auto [ctx, header] = bool_ret_map_paramCtx(&rpcOptions);
2222 apache::thrift::RequestCallback::Context callbackContext;
2223 callbackContext.protocolId =
2224 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2225 auto* contextStack = ctx.get();
2226 if (callback) {
2227 callbackContext.ctx = std::move(ctx);
2228 }
2229 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2230 bool_ret_map_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
2231 }
2232
bool_ret_map_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1,bool stealRpcOptions)2233 void ParamServiceAsyncClient::bool_ret_map_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, bool stealRpcOptions) {
2234 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2235 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2236 {
2237 apache::thrift::BinaryProtocolWriter writer;
2238 if (stealRpcOptions) {
2239 bool_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
2240 } else {
2241 bool_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
2242 }
2243 break;
2244 }
2245 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2246 {
2247 apache::thrift::CompactProtocolWriter writer;
2248 if (stealRpcOptions) {
2249 bool_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
2250 } else {
2251 bool_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
2252 }
2253 break;
2254 }
2255 default:
2256 {
2257 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
2258 }
2259 }
2260 }
2261
bool_ret_map_paramCtx(apache::thrift::RpcOptions * rpcOptions)2262 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::bool_ret_map_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
2263 auto header = std::make_shared<apache::thrift::transport::THeader>(
2264 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
2265 header->setProtocolId(channel_->getProtocolId());
2266 if (rpcOptions) {
2267 header->setHeaders(rpcOptions->releaseWriteHeaders());
2268 }
2269
2270 auto ctx = apache::thrift::ContextStack::createWithClientContext(
2271 handlers_,
2272 getServiceName(),
2273 "ParamService.bool_ret_map_param",
2274 *header);
2275
2276 return {std::move(ctx), std::move(header)};
2277 }
2278
sync_bool_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)2279 bool ParamServiceAsyncClient::sync_bool_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2280 ::apache::thrift::RpcOptions rpcOptions;
2281 return sync_bool_ret_map_param(rpcOptions, p_param1);
2282 }
2283
sync_bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)2284 bool ParamServiceAsyncClient::sync_bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2285 apache::thrift::ClientReceiveState returnState;
2286 apache::thrift::ClientSyncCallback<false> callback(&returnState);
2287 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2288 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
2289 auto ctxAndHeader = bool_ret_map_paramCtx(&rpcOptions);
2290 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
2291 callback.waitUntilDone(
2292 evb,
2293 [&] {
2294 bool_ret_map_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
2295 });
2296
2297 if (returnState.isException()) {
2298 returnState.exception().throw_exception();
2299 }
2300 returnState.resetProtocolId(protocolId);
2301 returnState.resetCtx(std::move(ctxAndHeader.first));
2302 SCOPE_EXIT {
2303 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
2304 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
2305 }
2306 };
2307 return folly::fibers::runInMainContext([&] {
2308 return recv_bool_ret_map_param(returnState);
2309 });
2310 }
2311
2312
future_bool_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)2313 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2314 ::apache::thrift::RpcOptions rpcOptions;
2315 return future_bool_ret_map_param(rpcOptions, p_param1);
2316 }
2317
semifuture_bool_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)2318 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2319 ::apache::thrift::RpcOptions rpcOptions;
2320 return semifuture_bool_ret_map_param(rpcOptions, p_param1);
2321 }
2322
future_bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)2323 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2324 folly::Promise<bool> promise;
2325 auto future = promise.getFuture();
2326 auto callback = std::make_unique<apache::thrift::FutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_map_param, channel_);
2327 bool_ret_map_param(rpcOptions, std::move(callback), p_param1);
2328 return future;
2329 }
2330
semifuture_bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)2331 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2332 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_bool_ret_map_param, channel_);
2333 auto callback = std::move(callbackAndFuture.first);
2334 bool_ret_map_param(rpcOptions, std::move(callback), p_param1);
2335 return std::move(callbackAndFuture.second);
2336 }
2337
header_future_bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)2338 folly::Future<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2339 folly::Promise<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
2340 auto future = promise.getFuture();
2341 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_map_param, channel_);
2342 bool_ret_map_param(rpcOptions, std::move(callback), p_param1);
2343 return future;
2344 }
2345
header_semifuture_bool_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)2346 folly::SemiFuture<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_bool_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2347 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_bool_ret_map_param, channel_);
2348 auto callback = std::move(callbackAndFuture.first);
2349 bool_ret_map_param(rpcOptions, std::move(callback), p_param1);
2350 return std::move(callbackAndFuture.second);
2351 }
2352
bool_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::map<::std::string,::std::int64_t> & p_param1)2353 void ParamServiceAsyncClient::bool_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
2354 bool_ret_map_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
2355 }
2356
2357 #if FOLLY_HAS_COROUTINES
2358 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_bool_ret_map_param(bool & _return,::apache::thrift::ClientReceiveState & state)2359 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_bool_ret_map_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2360 if (state.isException()) {
2361 return std::move(state.exception());
2362 }
2363 if (!state.hasResponseBuffer()) {
2364 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
2365 }
2366
2367 using result = ParamService_bool_ret_map_param_presult;
2368 switch (state.protocolId()) {
2369 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2370 {
2371 apache::thrift::BinaryProtocolReader reader;
2372 return apache::thrift::detail::ac::recv_wrapped<result>(
2373 &reader, state, _return);
2374 }
2375 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2376 {
2377 apache::thrift::CompactProtocolReader reader;
2378 return apache::thrift::detail::ac::recv_wrapped<result>(
2379 &reader, state, _return);
2380 }
2381 default:
2382 {
2383 }
2384 }
2385 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2386 }
2387
recv_bool_ret_map_param(::apache::thrift::ClientReceiveState & state)2388 bool ParamServiceAsyncClient::recv_bool_ret_map_param(::apache::thrift::ClientReceiveState& state) {
2389 bool _return;
2390 auto ew = recv_wrapped_bool_ret_map_param(_return, state);
2391 if (ew) {
2392 ew.throw_exception();
2393 }
2394 return _return;
2395 }
2396
recv_instance_bool_ret_map_param(::apache::thrift::ClientReceiveState & state)2397 bool ParamServiceAsyncClient::recv_instance_bool_ret_map_param(::apache::thrift::ClientReceiveState& state) {
2398 return recv_bool_ret_map_param(state);
2399 }
2400
recv_instance_wrapped_bool_ret_map_param(bool & _return,::apache::thrift::ClientReceiveState & state)2401 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_bool_ret_map_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2402 return recv_wrapped_bool_ret_map_param(_return, state);
2403 }
2404
bool_ret_union_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::ComplexUnion & p_param1)2405 void ParamServiceAsyncClient::bool_ret_union_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::ComplexUnion& p_param1) {
2406 ::apache::thrift::RpcOptions rpcOptions;
2407 bool_ret_union_param(rpcOptions, std::move(callback), p_param1);
2408 }
2409
bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::ComplexUnion & p_param1)2410 void ParamServiceAsyncClient::bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::ComplexUnion& p_param1) {
2411 auto [ctx, header] = bool_ret_union_paramCtx(&rpcOptions);
2412 apache::thrift::RequestCallback::Context callbackContext;
2413 callbackContext.protocolId =
2414 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2415 auto* contextStack = ctx.get();
2416 if (callback) {
2417 callbackContext.ctx = std::move(ctx);
2418 }
2419 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2420 bool_ret_union_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
2421 }
2422
bool_ret_union_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::ComplexUnion & p_param1,bool stealRpcOptions)2423 void ParamServiceAsyncClient::bool_ret_union_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::ComplexUnion& p_param1, bool stealRpcOptions) {
2424 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2425 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2426 {
2427 apache::thrift::BinaryProtocolWriter writer;
2428 if (stealRpcOptions) {
2429 bool_ret_union_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
2430 } else {
2431 bool_ret_union_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
2432 }
2433 break;
2434 }
2435 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2436 {
2437 apache::thrift::CompactProtocolWriter writer;
2438 if (stealRpcOptions) {
2439 bool_ret_union_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
2440 } else {
2441 bool_ret_union_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
2442 }
2443 break;
2444 }
2445 default:
2446 {
2447 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
2448 }
2449 }
2450 }
2451
bool_ret_union_paramCtx(apache::thrift::RpcOptions * rpcOptions)2452 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::bool_ret_union_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
2453 auto header = std::make_shared<apache::thrift::transport::THeader>(
2454 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
2455 header->setProtocolId(channel_->getProtocolId());
2456 if (rpcOptions) {
2457 header->setHeaders(rpcOptions->releaseWriteHeaders());
2458 }
2459
2460 auto ctx = apache::thrift::ContextStack::createWithClientContext(
2461 handlers_,
2462 getServiceName(),
2463 "ParamService.bool_ret_union_param",
2464 *header);
2465
2466 return {std::move(ctx), std::move(header)};
2467 }
2468
sync_bool_ret_union_param(const::some::valid::ns::ComplexUnion & p_param1)2469 bool ParamServiceAsyncClient::sync_bool_ret_union_param(const ::some::valid::ns::ComplexUnion& p_param1) {
2470 ::apache::thrift::RpcOptions rpcOptions;
2471 return sync_bool_ret_union_param(rpcOptions, p_param1);
2472 }
2473
sync_bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::ComplexUnion & p_param1)2474 bool ParamServiceAsyncClient::sync_bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::ComplexUnion& p_param1) {
2475 apache::thrift::ClientReceiveState returnState;
2476 apache::thrift::ClientSyncCallback<false> callback(&returnState);
2477 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2478 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
2479 auto ctxAndHeader = bool_ret_union_paramCtx(&rpcOptions);
2480 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
2481 callback.waitUntilDone(
2482 evb,
2483 [&] {
2484 bool_ret_union_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
2485 });
2486
2487 if (returnState.isException()) {
2488 returnState.exception().throw_exception();
2489 }
2490 returnState.resetProtocolId(protocolId);
2491 returnState.resetCtx(std::move(ctxAndHeader.first));
2492 SCOPE_EXIT {
2493 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
2494 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
2495 }
2496 };
2497 return folly::fibers::runInMainContext([&] {
2498 return recv_bool_ret_union_param(returnState);
2499 });
2500 }
2501
2502
future_bool_ret_union_param(const::some::valid::ns::ComplexUnion & p_param1)2503 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_union_param(const ::some::valid::ns::ComplexUnion& p_param1) {
2504 ::apache::thrift::RpcOptions rpcOptions;
2505 return future_bool_ret_union_param(rpcOptions, p_param1);
2506 }
2507
semifuture_bool_ret_union_param(const::some::valid::ns::ComplexUnion & p_param1)2508 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_union_param(const ::some::valid::ns::ComplexUnion& p_param1) {
2509 ::apache::thrift::RpcOptions rpcOptions;
2510 return semifuture_bool_ret_union_param(rpcOptions, p_param1);
2511 }
2512
future_bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::ComplexUnion & p_param1)2513 folly::Future<bool> ParamServiceAsyncClient::future_bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::ComplexUnion& p_param1) {
2514 folly::Promise<bool> promise;
2515 auto future = promise.getFuture();
2516 auto callback = std::make_unique<apache::thrift::FutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_union_param, channel_);
2517 bool_ret_union_param(rpcOptions, std::move(callback), p_param1);
2518 return future;
2519 }
2520
semifuture_bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::ComplexUnion & p_param1)2521 folly::SemiFuture<bool> ParamServiceAsyncClient::semifuture_bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::ComplexUnion& p_param1) {
2522 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_bool_ret_union_param, channel_);
2523 auto callback = std::move(callbackAndFuture.first);
2524 bool_ret_union_param(rpcOptions, std::move(callback), p_param1);
2525 return std::move(callbackAndFuture.second);
2526 }
2527
header_future_bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::ComplexUnion & p_param1)2528 folly::Future<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::ComplexUnion& p_param1) {
2529 folly::Promise<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
2530 auto future = promise.getFuture();
2531 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<bool>>(std::move(promise), recv_wrapped_bool_ret_union_param, channel_);
2532 bool_ret_union_param(rpcOptions, std::move(callback), p_param1);
2533 return future;
2534 }
2535
header_semifuture_bool_ret_union_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::ComplexUnion & p_param1)2536 folly::SemiFuture<std::pair<bool, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_bool_ret_union_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::ComplexUnion& p_param1) {
2537 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_bool_ret_union_param, channel_);
2538 auto callback = std::move(callbackAndFuture.first);
2539 bool_ret_union_param(rpcOptions, std::move(callback), p_param1);
2540 return std::move(callbackAndFuture.second);
2541 }
2542
bool_ret_union_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::some::valid::ns::ComplexUnion & p_param1)2543 void ParamServiceAsyncClient::bool_ret_union_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::some::valid::ns::ComplexUnion& p_param1) {
2544 bool_ret_union_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
2545 }
2546
2547 #if FOLLY_HAS_COROUTINES
2548 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_bool_ret_union_param(bool & _return,::apache::thrift::ClientReceiveState & state)2549 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_bool_ret_union_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2550 if (state.isException()) {
2551 return std::move(state.exception());
2552 }
2553 if (!state.hasResponseBuffer()) {
2554 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
2555 }
2556
2557 using result = ParamService_bool_ret_union_param_presult;
2558 switch (state.protocolId()) {
2559 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2560 {
2561 apache::thrift::BinaryProtocolReader reader;
2562 return apache::thrift::detail::ac::recv_wrapped<result>(
2563 &reader, state, _return);
2564 }
2565 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2566 {
2567 apache::thrift::CompactProtocolReader reader;
2568 return apache::thrift::detail::ac::recv_wrapped<result>(
2569 &reader, state, _return);
2570 }
2571 default:
2572 {
2573 }
2574 }
2575 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2576 }
2577
recv_bool_ret_union_param(::apache::thrift::ClientReceiveState & state)2578 bool ParamServiceAsyncClient::recv_bool_ret_union_param(::apache::thrift::ClientReceiveState& state) {
2579 bool _return;
2580 auto ew = recv_wrapped_bool_ret_union_param(_return, state);
2581 if (ew) {
2582 ew.throw_exception();
2583 }
2584 return _return;
2585 }
2586
recv_instance_bool_ret_union_param(::apache::thrift::ClientReceiveState & state)2587 bool ParamServiceAsyncClient::recv_instance_bool_ret_union_param(::apache::thrift::ClientReceiveState& state) {
2588 return recv_bool_ret_union_param(state);
2589 }
2590
recv_instance_wrapped_bool_ret_union_param(bool & _return,::apache::thrift::ClientReceiveState & state)2591 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_bool_ret_union_param(bool& _return, ::apache::thrift::ClientReceiveState& state) {
2592 return recv_wrapped_bool_ret_union_param(_return, state);
2593 }
2594
i64_ret_float_double_param(std::unique_ptr<apache::thrift::RequestCallback> callback,float p_param1,double p_param2)2595 void ParamServiceAsyncClient::i64_ret_float_double_param(std::unique_ptr<apache::thrift::RequestCallback> callback, float p_param1, double p_param2) {
2596 ::apache::thrift::RpcOptions rpcOptions;
2597 i64_ret_float_double_param(rpcOptions, std::move(callback), p_param1, p_param2);
2598 }
2599
i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,float p_param1,double p_param2)2600 void ParamServiceAsyncClient::i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, float p_param1, double p_param2) {
2601 auto [ctx, header] = i64_ret_float_double_paramCtx(&rpcOptions);
2602 apache::thrift::RequestCallback::Context callbackContext;
2603 callbackContext.protocolId =
2604 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2605 auto* contextStack = ctx.get();
2606 if (callback) {
2607 callbackContext.ctx = std::move(ctx);
2608 }
2609 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2610 i64_ret_float_double_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
2611 }
2612
i64_ret_float_double_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,float p_param1,double p_param2,bool stealRpcOptions)2613 void ParamServiceAsyncClient::i64_ret_float_double_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, float p_param1, double p_param2, bool stealRpcOptions) {
2614 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2615 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2616 {
2617 apache::thrift::BinaryProtocolWriter writer;
2618 if (stealRpcOptions) {
2619 i64_ret_float_double_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2620 } else {
2621 i64_ret_float_double_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2622 }
2623 break;
2624 }
2625 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2626 {
2627 apache::thrift::CompactProtocolWriter writer;
2628 if (stealRpcOptions) {
2629 i64_ret_float_double_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2630 } else {
2631 i64_ret_float_double_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2632 }
2633 break;
2634 }
2635 default:
2636 {
2637 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
2638 }
2639 }
2640 }
2641
i64_ret_float_double_paramCtx(apache::thrift::RpcOptions * rpcOptions)2642 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::i64_ret_float_double_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
2643 auto header = std::make_shared<apache::thrift::transport::THeader>(
2644 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
2645 header->setProtocolId(channel_->getProtocolId());
2646 if (rpcOptions) {
2647 header->setHeaders(rpcOptions->releaseWriteHeaders());
2648 }
2649
2650 auto ctx = apache::thrift::ContextStack::createWithClientContext(
2651 handlers_,
2652 getServiceName(),
2653 "ParamService.i64_ret_float_double_param",
2654 *header);
2655
2656 return {std::move(ctx), std::move(header)};
2657 }
2658
sync_i64_ret_float_double_param(float p_param1,double p_param2)2659 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_float_double_param(float p_param1, double p_param2) {
2660 ::apache::thrift::RpcOptions rpcOptions;
2661 return sync_i64_ret_float_double_param(rpcOptions, p_param1, p_param2);
2662 }
2663
sync_i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,float p_param1,double p_param2)2664 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, float p_param1, double p_param2) {
2665 apache::thrift::ClientReceiveState returnState;
2666 apache::thrift::ClientSyncCallback<false> callback(&returnState);
2667 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2668 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
2669 auto ctxAndHeader = i64_ret_float_double_paramCtx(&rpcOptions);
2670 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
2671 callback.waitUntilDone(
2672 evb,
2673 [&] {
2674 i64_ret_float_double_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
2675 });
2676
2677 if (returnState.isException()) {
2678 returnState.exception().throw_exception();
2679 }
2680 returnState.resetProtocolId(protocolId);
2681 returnState.resetCtx(std::move(ctxAndHeader.first));
2682 SCOPE_EXIT {
2683 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
2684 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
2685 }
2686 };
2687 return folly::fibers::runInMainContext([&] {
2688 return recv_i64_ret_float_double_param(returnState);
2689 });
2690 }
2691
2692
future_i64_ret_float_double_param(float p_param1,double p_param2)2693 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_float_double_param(float p_param1, double p_param2) {
2694 ::apache::thrift::RpcOptions rpcOptions;
2695 return future_i64_ret_float_double_param(rpcOptions, p_param1, p_param2);
2696 }
2697
semifuture_i64_ret_float_double_param(float p_param1,double p_param2)2698 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_float_double_param(float p_param1, double p_param2) {
2699 ::apache::thrift::RpcOptions rpcOptions;
2700 return semifuture_i64_ret_float_double_param(rpcOptions, p_param1, p_param2);
2701 }
2702
future_i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,float p_param1,double p_param2)2703 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, float p_param1, double p_param2) {
2704 folly::Promise<::std::int64_t> promise;
2705 auto future = promise.getFuture();
2706 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_float_double_param, channel_);
2707 i64_ret_float_double_param(rpcOptions, std::move(callback), p_param1, p_param2);
2708 return future;
2709 }
2710
semifuture_i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,float p_param1,double p_param2)2711 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, float p_param1, double p_param2) {
2712 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_i64_ret_float_double_param, channel_);
2713 auto callback = std::move(callbackAndFuture.first);
2714 i64_ret_float_double_param(rpcOptions, std::move(callback), p_param1, p_param2);
2715 return std::move(callbackAndFuture.second);
2716 }
2717
header_future_i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,float p_param1,double p_param2)2718 folly::Future<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, float p_param1, double p_param2) {
2719 folly::Promise<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
2720 auto future = promise.getFuture();
2721 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_float_double_param, channel_);
2722 i64_ret_float_double_param(rpcOptions, std::move(callback), p_param1, p_param2);
2723 return future;
2724 }
2725
header_semifuture_i64_ret_float_double_param(apache::thrift::RpcOptions & rpcOptions,float p_param1,double p_param2)2726 folly::SemiFuture<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_i64_ret_float_double_param(apache::thrift::RpcOptions& rpcOptions, float p_param1, double p_param2) {
2727 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_i64_ret_float_double_param, channel_);
2728 auto callback = std::move(callbackAndFuture.first);
2729 i64_ret_float_double_param(rpcOptions, std::move(callback), p_param1, p_param2);
2730 return std::move(callbackAndFuture.second);
2731 }
2732
i64_ret_float_double_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,float p_param1,double p_param2)2733 void ParamServiceAsyncClient::i64_ret_float_double_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, float p_param1, double p_param2) {
2734 i64_ret_float_double_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
2735 }
2736
2737 #if FOLLY_HAS_COROUTINES
2738 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_i64_ret_float_double_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)2739 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_i64_ret_float_double_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
2740 if (state.isException()) {
2741 return std::move(state.exception());
2742 }
2743 if (!state.hasResponseBuffer()) {
2744 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
2745 }
2746
2747 using result = ParamService_i64_ret_float_double_param_presult;
2748 switch (state.protocolId()) {
2749 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2750 {
2751 apache::thrift::BinaryProtocolReader reader;
2752 return apache::thrift::detail::ac::recv_wrapped<result>(
2753 &reader, state, _return);
2754 }
2755 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2756 {
2757 apache::thrift::CompactProtocolReader reader;
2758 return apache::thrift::detail::ac::recv_wrapped<result>(
2759 &reader, state, _return);
2760 }
2761 default:
2762 {
2763 }
2764 }
2765 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2766 }
2767
recv_i64_ret_float_double_param(::apache::thrift::ClientReceiveState & state)2768 ::std::int64_t ParamServiceAsyncClient::recv_i64_ret_float_double_param(::apache::thrift::ClientReceiveState& state) {
2769 ::std::int64_t _return;
2770 auto ew = recv_wrapped_i64_ret_float_double_param(_return, state);
2771 if (ew) {
2772 ew.throw_exception();
2773 }
2774 return _return;
2775 }
2776
recv_instance_i64_ret_float_double_param(::apache::thrift::ClientReceiveState & state)2777 ::std::int64_t ParamServiceAsyncClient::recv_instance_i64_ret_float_double_param(::apache::thrift::ClientReceiveState& state) {
2778 return recv_i64_ret_float_double_param(state);
2779 }
2780
recv_instance_wrapped_i64_ret_float_double_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)2781 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_i64_ret_float_double_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
2782 return recv_wrapped_i64_ret_float_double_param(_return, state);
2783 }
2784
i64_ret_string_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2785 void ParamServiceAsyncClient::i64_ret_string_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2786 ::apache::thrift::RpcOptions rpcOptions;
2787 i64_ret_string_typedef_param(rpcOptions, std::move(callback), p_param1, p_param2);
2788 }
2789
i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2790 void ParamServiceAsyncClient::i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2791 auto [ctx, header] = i64_ret_string_typedef_paramCtx(&rpcOptions);
2792 apache::thrift::RequestCallback::Context callbackContext;
2793 callbackContext.protocolId =
2794 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2795 auto* contextStack = ctx.get();
2796 if (callback) {
2797 callbackContext.ctx = std::move(ctx);
2798 }
2799 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2800 i64_ret_string_typedef_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
2801 }
2802
i64_ret_string_typedef_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2,bool stealRpcOptions)2803 void ParamServiceAsyncClient::i64_ret_string_typedef_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2, bool stealRpcOptions) {
2804 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2805 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2806 {
2807 apache::thrift::BinaryProtocolWriter writer;
2808 if (stealRpcOptions) {
2809 i64_ret_string_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2810 } else {
2811 i64_ret_string_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2812 }
2813 break;
2814 }
2815 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2816 {
2817 apache::thrift::CompactProtocolWriter writer;
2818 if (stealRpcOptions) {
2819 i64_ret_string_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2820 } else {
2821 i64_ret_string_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
2822 }
2823 break;
2824 }
2825 default:
2826 {
2827 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
2828 }
2829 }
2830 }
2831
i64_ret_string_typedef_paramCtx(apache::thrift::RpcOptions * rpcOptions)2832 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::i64_ret_string_typedef_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
2833 auto header = std::make_shared<apache::thrift::transport::THeader>(
2834 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
2835 header->setProtocolId(channel_->getProtocolId());
2836 if (rpcOptions) {
2837 header->setHeaders(rpcOptions->releaseWriteHeaders());
2838 }
2839
2840 auto ctx = apache::thrift::ContextStack::createWithClientContext(
2841 handlers_,
2842 getServiceName(),
2843 "ParamService.i64_ret_string_typedef_param",
2844 *header);
2845
2846 return {std::move(ctx), std::move(header)};
2847 }
2848
sync_i64_ret_string_typedef_param(const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2849 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_string_typedef_param(const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2850 ::apache::thrift::RpcOptions rpcOptions;
2851 return sync_i64_ret_string_typedef_param(rpcOptions, p_param1, p_param2);
2852 }
2853
sync_i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2854 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2855 apache::thrift::ClientReceiveState returnState;
2856 apache::thrift::ClientSyncCallback<false> callback(&returnState);
2857 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2858 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
2859 auto ctxAndHeader = i64_ret_string_typedef_paramCtx(&rpcOptions);
2860 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
2861 callback.waitUntilDone(
2862 evb,
2863 [&] {
2864 i64_ret_string_typedef_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
2865 });
2866
2867 if (returnState.isException()) {
2868 returnState.exception().throw_exception();
2869 }
2870 returnState.resetProtocolId(protocolId);
2871 returnState.resetCtx(std::move(ctxAndHeader.first));
2872 SCOPE_EXIT {
2873 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
2874 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
2875 }
2876 };
2877 return folly::fibers::runInMainContext([&] {
2878 return recv_i64_ret_string_typedef_param(returnState);
2879 });
2880 }
2881
2882
future_i64_ret_string_typedef_param(const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2883 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_string_typedef_param(const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2884 ::apache::thrift::RpcOptions rpcOptions;
2885 return future_i64_ret_string_typedef_param(rpcOptions, p_param1, p_param2);
2886 }
2887
semifuture_i64_ret_string_typedef_param(const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2888 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_string_typedef_param(const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2889 ::apache::thrift::RpcOptions rpcOptions;
2890 return semifuture_i64_ret_string_typedef_param(rpcOptions, p_param1, p_param2);
2891 }
2892
future_i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2893 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2894 folly::Promise<::std::int64_t> promise;
2895 auto future = promise.getFuture();
2896 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_string_typedef_param, channel_);
2897 i64_ret_string_typedef_param(rpcOptions, std::move(callback), p_param1, p_param2);
2898 return future;
2899 }
2900
semifuture_i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2901 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2902 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_i64_ret_string_typedef_param, channel_);
2903 auto callback = std::move(callbackAndFuture.first);
2904 i64_ret_string_typedef_param(rpcOptions, std::move(callback), p_param1, p_param2);
2905 return std::move(callbackAndFuture.second);
2906 }
2907
header_future_i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2908 folly::Future<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2909 folly::Promise<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
2910 auto future = promise.getFuture();
2911 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_string_typedef_param, channel_);
2912 i64_ret_string_typedef_param(rpcOptions, std::move(callback), p_param1, p_param2);
2913 return future;
2914 }
2915
header_semifuture_i64_ret_string_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2916 folly::SemiFuture<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_i64_ret_string_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2917 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_i64_ret_string_typedef_param, channel_);
2918 auto callback = std::move(callbackAndFuture.first);
2919 i64_ret_string_typedef_param(rpcOptions, std::move(callback), p_param1, p_param2);
2920 return std::move(callbackAndFuture.second);
2921 }
2922
i64_ret_string_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::string & p_param1,const::std::set<::some::valid::ns::mostComplexTypeDef> & p_param2)2923 void ParamServiceAsyncClient::i64_ret_string_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_param1, const ::std::set<::some::valid::ns::mostComplexTypeDef>& p_param2) {
2924 i64_ret_string_typedef_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
2925 }
2926
2927 #if FOLLY_HAS_COROUTINES
2928 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_i64_ret_string_typedef_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)2929 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_i64_ret_string_typedef_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
2930 if (state.isException()) {
2931 return std::move(state.exception());
2932 }
2933 if (!state.hasResponseBuffer()) {
2934 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
2935 }
2936
2937 using result = ParamService_i64_ret_string_typedef_param_presult;
2938 switch (state.protocolId()) {
2939 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2940 {
2941 apache::thrift::BinaryProtocolReader reader;
2942 return apache::thrift::detail::ac::recv_wrapped<result>(
2943 &reader, state, _return);
2944 }
2945 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
2946 {
2947 apache::thrift::CompactProtocolReader reader;
2948 return apache::thrift::detail::ac::recv_wrapped<result>(
2949 &reader, state, _return);
2950 }
2951 default:
2952 {
2953 }
2954 }
2955 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
2956 }
2957
recv_i64_ret_string_typedef_param(::apache::thrift::ClientReceiveState & state)2958 ::std::int64_t ParamServiceAsyncClient::recv_i64_ret_string_typedef_param(::apache::thrift::ClientReceiveState& state) {
2959 ::std::int64_t _return;
2960 auto ew = recv_wrapped_i64_ret_string_typedef_param(_return, state);
2961 if (ew) {
2962 ew.throw_exception();
2963 }
2964 return _return;
2965 }
2966
recv_instance_i64_ret_string_typedef_param(::apache::thrift::ClientReceiveState & state)2967 ::std::int64_t ParamServiceAsyncClient::recv_instance_i64_ret_string_typedef_param(::apache::thrift::ClientReceiveState& state) {
2968 return recv_i64_ret_string_typedef_param(state);
2969 }
2970
recv_instance_wrapped_i64_ret_string_typedef_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)2971 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_i64_ret_string_typedef_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
2972 return recv_wrapped_i64_ret_string_typedef_param(_return, state);
2973 }
2974
i64_ret_i32_i32_i32_i32_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)2975 void ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
2976 ::apache::thrift::RpcOptions rpcOptions;
2977 i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
2978 }
2979
i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)2980 void ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
2981 auto [ctx, header] = i64_ret_i32_i32_i32_i32_i32_paramCtx(&rpcOptions);
2982 apache::thrift::RequestCallback::Context callbackContext;
2983 callbackContext.protocolId =
2984 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
2985 auto* contextStack = ctx.get();
2986 if (callback) {
2987 callbackContext.ctx = std::move(ctx);
2988 }
2989 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
2990 i64_ret_i32_i32_i32_i32_i32_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2, p_param3, p_param4, p_param5);
2991 }
2992
i64_ret_i32_i32_i32_i32_i32_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5,bool stealRpcOptions)2993 void ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5, bool stealRpcOptions) {
2994 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
2995 case apache::thrift::protocol::T_BINARY_PROTOCOL:
2996 {
2997 apache::thrift::BinaryProtocolWriter writer;
2998 if (stealRpcOptions) {
2999 i64_ret_i32_i32_i32_i32_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3000 } else {
3001 i64_ret_i32_i32_i32_i32_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3002 }
3003 break;
3004 }
3005 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3006 {
3007 apache::thrift::CompactProtocolWriter writer;
3008 if (stealRpcOptions) {
3009 i64_ret_i32_i32_i32_i32_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3010 } else {
3011 i64_ret_i32_i32_i32_i32_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3012 }
3013 break;
3014 }
3015 default:
3016 {
3017 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3018 }
3019 }
3020 }
3021
i64_ret_i32_i32_i32_i32_i32_paramCtx(apache::thrift::RpcOptions * rpcOptions)3022 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3023 auto header = std::make_shared<apache::thrift::transport::THeader>(
3024 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3025 header->setProtocolId(channel_->getProtocolId());
3026 if (rpcOptions) {
3027 header->setHeaders(rpcOptions->releaseWriteHeaders());
3028 }
3029
3030 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3031 handlers_,
3032 getServiceName(),
3033 "ParamService.i64_ret_i32_i32_i32_i32_i32_param",
3034 *header);
3035
3036 return {std::move(ctx), std::move(header)};
3037 }
3038
sync_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3039 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3040 ::apache::thrift::RpcOptions rpcOptions;
3041 return sync_i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, p_param1, p_param2, p_param3, p_param4, p_param5);
3042 }
3043
sync_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3044 ::std::int64_t ParamServiceAsyncClient::sync_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3045 apache::thrift::ClientReceiveState returnState;
3046 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3047 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3048 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3049 auto ctxAndHeader = i64_ret_i32_i32_i32_i32_i32_paramCtx(&rpcOptions);
3050 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3051 callback.waitUntilDone(
3052 evb,
3053 [&] {
3054 i64_ret_i32_i32_i32_i32_i32_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2, p_param3, p_param4, p_param5);
3055 });
3056
3057 if (returnState.isException()) {
3058 returnState.exception().throw_exception();
3059 }
3060 returnState.resetProtocolId(protocolId);
3061 returnState.resetCtx(std::move(ctxAndHeader.first));
3062 SCOPE_EXIT {
3063 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
3064 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
3065 }
3066 };
3067 return folly::fibers::runInMainContext([&] {
3068 return recv_i64_ret_i32_i32_i32_i32_i32_param(returnState);
3069 });
3070 }
3071
3072
future_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3073 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3074 ::apache::thrift::RpcOptions rpcOptions;
3075 return future_i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, p_param1, p_param2, p_param3, p_param4, p_param5);
3076 }
3077
semifuture_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3078 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_i32_i32_i32_i32_i32_param(::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3079 ::apache::thrift::RpcOptions rpcOptions;
3080 return semifuture_i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, p_param1, p_param2, p_param3, p_param4, p_param5);
3081 }
3082
future_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3083 folly::Future<::std::int64_t> ParamServiceAsyncClient::future_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3084 folly::Promise<::std::int64_t> promise;
3085 auto future = promise.getFuture();
3086 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param, channel_);
3087 i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3088 return future;
3089 }
3090
semifuture_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3091 folly::SemiFuture<::std::int64_t> ParamServiceAsyncClient::semifuture_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3092 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param, channel_);
3093 auto callback = std::move(callbackAndFuture.first);
3094 i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3095 return std::move(callbackAndFuture.second);
3096 }
3097
header_future_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3098 folly::Future<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3099 folly::Promise<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
3100 auto future = promise.getFuture();
3101 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::int64_t>>(std::move(promise), recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param, channel_);
3102 i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3103 return future;
3104 }
3105
header_semifuture_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3106 folly::SemiFuture<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_i64_ret_i32_i32_i32_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3107 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param, channel_);
3108 auto callback = std::move(callbackAndFuture.first);
3109 i64_ret_i32_i32_i32_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2, p_param3, p_param4, p_param5);
3110 return std::move(callbackAndFuture.second);
3111 }
3112
i64_ret_i32_i32_i32_i32_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int32_t p_param1,::std::int32_t p_param2,::std::int32_t p_param3,::std::int32_t p_param4,::std::int32_t p_param5)3113 void ParamServiceAsyncClient::i64_ret_i32_i32_i32_i32_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int32_t p_param1, ::std::int32_t p_param2, ::std::int32_t p_param3, ::std::int32_t p_param4, ::std::int32_t p_param5) {
3114 i64_ret_i32_i32_i32_i32_i32_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2, p_param3, p_param4, p_param5);
3115 }
3116
3117 #if FOLLY_HAS_COROUTINES
3118 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)3119 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
3120 if (state.isException()) {
3121 return std::move(state.exception());
3122 }
3123 if (!state.hasResponseBuffer()) {
3124 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
3125 }
3126
3127 using result = ParamService_i64_ret_i32_i32_i32_i32_i32_param_presult;
3128 switch (state.protocolId()) {
3129 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3130 {
3131 apache::thrift::BinaryProtocolReader reader;
3132 return apache::thrift::detail::ac::recv_wrapped<result>(
3133 &reader, state, _return);
3134 }
3135 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3136 {
3137 apache::thrift::CompactProtocolReader reader;
3138 return apache::thrift::detail::ac::recv_wrapped<result>(
3139 &reader, state, _return);
3140 }
3141 default:
3142 {
3143 }
3144 }
3145 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
3146 }
3147
recv_i64_ret_i32_i32_i32_i32_i32_param(::apache::thrift::ClientReceiveState & state)3148 ::std::int64_t ParamServiceAsyncClient::recv_i64_ret_i32_i32_i32_i32_i32_param(::apache::thrift::ClientReceiveState& state) {
3149 ::std::int64_t _return;
3150 auto ew = recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param(_return, state);
3151 if (ew) {
3152 ew.throw_exception();
3153 }
3154 return _return;
3155 }
3156
recv_instance_i64_ret_i32_i32_i32_i32_i32_param(::apache::thrift::ClientReceiveState & state)3157 ::std::int64_t ParamServiceAsyncClient::recv_instance_i64_ret_i32_i32_i32_i32_i32_param(::apache::thrift::ClientReceiveState& state) {
3158 return recv_i64_ret_i32_i32_i32_i32_i32_param(state);
3159 }
3160
recv_instance_wrapped_i64_ret_i32_i32_i32_i32_i32_param(::std::int64_t & _return,::apache::thrift::ClientReceiveState & state)3161 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_i64_ret_i32_i32_i32_i32_i32_param(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state) {
3162 return recv_wrapped_i64_ret_i32_i32_i32_i32_i32_param(_return, state);
3163 }
3164
double_ret_setstruct_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::set<::some::valid::ns::MyStruct> & p_param1)3165 void ParamServiceAsyncClient::double_ret_setstruct_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3166 ::apache::thrift::RpcOptions rpcOptions;
3167 double_ret_setstruct_param(rpcOptions, std::move(callback), p_param1);
3168 }
3169
double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::set<::some::valid::ns::MyStruct> & p_param1)3170 void ParamServiceAsyncClient::double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3171 auto [ctx, header] = double_ret_setstruct_paramCtx(&rpcOptions);
3172 apache::thrift::RequestCallback::Context callbackContext;
3173 callbackContext.protocolId =
3174 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3175 auto* contextStack = ctx.get();
3176 if (callback) {
3177 callbackContext.ctx = std::move(ctx);
3178 }
3179 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
3180 double_ret_setstruct_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
3181 }
3182
double_ret_setstruct_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::set<::some::valid::ns::MyStruct> & p_param1,bool stealRpcOptions)3183 void ParamServiceAsyncClient::double_ret_setstruct_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::some::valid::ns::MyStruct>& p_param1, bool stealRpcOptions) {
3184 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
3185 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3186 {
3187 apache::thrift::BinaryProtocolWriter writer;
3188 if (stealRpcOptions) {
3189 double_ret_setstruct_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3190 } else {
3191 double_ret_setstruct_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3192 }
3193 break;
3194 }
3195 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3196 {
3197 apache::thrift::CompactProtocolWriter writer;
3198 if (stealRpcOptions) {
3199 double_ret_setstruct_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3200 } else {
3201 double_ret_setstruct_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3202 }
3203 break;
3204 }
3205 default:
3206 {
3207 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3208 }
3209 }
3210 }
3211
double_ret_setstruct_paramCtx(apache::thrift::RpcOptions * rpcOptions)3212 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::double_ret_setstruct_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3213 auto header = std::make_shared<apache::thrift::transport::THeader>(
3214 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3215 header->setProtocolId(channel_->getProtocolId());
3216 if (rpcOptions) {
3217 header->setHeaders(rpcOptions->releaseWriteHeaders());
3218 }
3219
3220 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3221 handlers_,
3222 getServiceName(),
3223 "ParamService.double_ret_setstruct_param",
3224 *header);
3225
3226 return {std::move(ctx), std::move(header)};
3227 }
3228
sync_double_ret_setstruct_param(const::std::set<::some::valid::ns::MyStruct> & p_param1)3229 double ParamServiceAsyncClient::sync_double_ret_setstruct_param(const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3230 ::apache::thrift::RpcOptions rpcOptions;
3231 return sync_double_ret_setstruct_param(rpcOptions, p_param1);
3232 }
3233
sync_double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::some::valid::ns::MyStruct> & p_param1)3234 double ParamServiceAsyncClient::sync_double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3235 apache::thrift::ClientReceiveState returnState;
3236 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3237 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3238 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3239 auto ctxAndHeader = double_ret_setstruct_paramCtx(&rpcOptions);
3240 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3241 callback.waitUntilDone(
3242 evb,
3243 [&] {
3244 double_ret_setstruct_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
3245 });
3246
3247 if (returnState.isException()) {
3248 returnState.exception().throw_exception();
3249 }
3250 returnState.resetProtocolId(protocolId);
3251 returnState.resetCtx(std::move(ctxAndHeader.first));
3252 SCOPE_EXIT {
3253 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
3254 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
3255 }
3256 };
3257 return folly::fibers::runInMainContext([&] {
3258 return recv_double_ret_setstruct_param(returnState);
3259 });
3260 }
3261
3262
future_double_ret_setstruct_param(const::std::set<::some::valid::ns::MyStruct> & p_param1)3263 folly::Future<double> ParamServiceAsyncClient::future_double_ret_setstruct_param(const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3264 ::apache::thrift::RpcOptions rpcOptions;
3265 return future_double_ret_setstruct_param(rpcOptions, p_param1);
3266 }
3267
semifuture_double_ret_setstruct_param(const::std::set<::some::valid::ns::MyStruct> & p_param1)3268 folly::SemiFuture<double> ParamServiceAsyncClient::semifuture_double_ret_setstruct_param(const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3269 ::apache::thrift::RpcOptions rpcOptions;
3270 return semifuture_double_ret_setstruct_param(rpcOptions, p_param1);
3271 }
3272
future_double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::some::valid::ns::MyStruct> & p_param1)3273 folly::Future<double> ParamServiceAsyncClient::future_double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3274 folly::Promise<double> promise;
3275 auto future = promise.getFuture();
3276 auto callback = std::make_unique<apache::thrift::FutureCallback<double>>(std::move(promise), recv_wrapped_double_ret_setstruct_param, channel_);
3277 double_ret_setstruct_param(rpcOptions, std::move(callback), p_param1);
3278 return future;
3279 }
3280
semifuture_double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::some::valid::ns::MyStruct> & p_param1)3281 folly::SemiFuture<double> ParamServiceAsyncClient::semifuture_double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3282 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_double_ret_setstruct_param, channel_);
3283 auto callback = std::move(callbackAndFuture.first);
3284 double_ret_setstruct_param(rpcOptions, std::move(callback), p_param1);
3285 return std::move(callbackAndFuture.second);
3286 }
3287
header_future_double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::some::valid::ns::MyStruct> & p_param1)3288 folly::Future<std::pair<double, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3289 folly::Promise<std::pair<double, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
3290 auto future = promise.getFuture();
3291 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<double>>(std::move(promise), recv_wrapped_double_ret_setstruct_param, channel_);
3292 double_ret_setstruct_param(rpcOptions, std::move(callback), p_param1);
3293 return future;
3294 }
3295
header_semifuture_double_ret_setstruct_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::some::valid::ns::MyStruct> & p_param1)3296 folly::SemiFuture<std::pair<double, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_double_ret_setstruct_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3297 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_double_ret_setstruct_param, channel_);
3298 auto callback = std::move(callbackAndFuture.first);
3299 double_ret_setstruct_param(rpcOptions, std::move(callback), p_param1);
3300 return std::move(callbackAndFuture.second);
3301 }
3302
double_ret_setstruct_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::set<::some::valid::ns::MyStruct> & p_param1)3303 void ParamServiceAsyncClient::double_ret_setstruct_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::set<::some::valid::ns::MyStruct>& p_param1) {
3304 double_ret_setstruct_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
3305 }
3306
3307 #if FOLLY_HAS_COROUTINES
3308 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_double_ret_setstruct_param(double & _return,::apache::thrift::ClientReceiveState & state)3309 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_double_ret_setstruct_param(double& _return, ::apache::thrift::ClientReceiveState& state) {
3310 if (state.isException()) {
3311 return std::move(state.exception());
3312 }
3313 if (!state.hasResponseBuffer()) {
3314 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
3315 }
3316
3317 using result = ParamService_double_ret_setstruct_param_presult;
3318 switch (state.protocolId()) {
3319 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3320 {
3321 apache::thrift::BinaryProtocolReader reader;
3322 return apache::thrift::detail::ac::recv_wrapped<result>(
3323 &reader, state, _return);
3324 }
3325 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3326 {
3327 apache::thrift::CompactProtocolReader reader;
3328 return apache::thrift::detail::ac::recv_wrapped<result>(
3329 &reader, state, _return);
3330 }
3331 default:
3332 {
3333 }
3334 }
3335 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
3336 }
3337
recv_double_ret_setstruct_param(::apache::thrift::ClientReceiveState & state)3338 double ParamServiceAsyncClient::recv_double_ret_setstruct_param(::apache::thrift::ClientReceiveState& state) {
3339 double _return;
3340 auto ew = recv_wrapped_double_ret_setstruct_param(_return, state);
3341 if (ew) {
3342 ew.throw_exception();
3343 }
3344 return _return;
3345 }
3346
recv_instance_double_ret_setstruct_param(::apache::thrift::ClientReceiveState & state)3347 double ParamServiceAsyncClient::recv_instance_double_ret_setstruct_param(::apache::thrift::ClientReceiveState& state) {
3348 return recv_double_ret_setstruct_param(state);
3349 }
3350
recv_instance_wrapped_double_ret_setstruct_param(double & _return,::apache::thrift::ClientReceiveState & state)3351 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_double_ret_setstruct_param(double& _return, ::apache::thrift::ClientReceiveState& state) {
3352 return recv_wrapped_double_ret_setstruct_param(_return, state);
3353 }
3354
string_ret_string_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)3355 void ParamServiceAsyncClient::string_ret_string_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
3356 ::apache::thrift::RpcOptions rpcOptions;
3357 string_ret_string_param(rpcOptions, std::move(callback), p_param1);
3358 }
3359
string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)3360 void ParamServiceAsyncClient::string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
3361 auto [ctx, header] = string_ret_string_paramCtx(&rpcOptions);
3362 apache::thrift::RequestCallback::Context callbackContext;
3363 callbackContext.protocolId =
3364 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3365 auto* contextStack = ctx.get();
3366 if (callback) {
3367 callbackContext.ctx = std::move(ctx);
3368 }
3369 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
3370 string_ret_string_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
3371 }
3372
string_ret_string_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1,bool stealRpcOptions)3373 void ParamServiceAsyncClient::string_ret_string_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1, bool stealRpcOptions) {
3374 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
3375 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3376 {
3377 apache::thrift::BinaryProtocolWriter writer;
3378 if (stealRpcOptions) {
3379 string_ret_string_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3380 } else {
3381 string_ret_string_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3382 }
3383 break;
3384 }
3385 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3386 {
3387 apache::thrift::CompactProtocolWriter writer;
3388 if (stealRpcOptions) {
3389 string_ret_string_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3390 } else {
3391 string_ret_string_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3392 }
3393 break;
3394 }
3395 default:
3396 {
3397 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3398 }
3399 }
3400 }
3401
string_ret_string_paramCtx(apache::thrift::RpcOptions * rpcOptions)3402 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::string_ret_string_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3403 auto header = std::make_shared<apache::thrift::transport::THeader>(
3404 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3405 header->setProtocolId(channel_->getProtocolId());
3406 if (rpcOptions) {
3407 header->setHeaders(rpcOptions->releaseWriteHeaders());
3408 }
3409
3410 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3411 handlers_,
3412 getServiceName(),
3413 "ParamService.string_ret_string_param",
3414 *header);
3415
3416 return {std::move(ctx), std::move(header)};
3417 }
3418
sync_string_ret_string_param(::std::string & _return,const::std::string & p_param1)3419 void ParamServiceAsyncClient::sync_string_ret_string_param(::std::string& _return, const ::std::string& p_param1) {
3420 ::apache::thrift::RpcOptions rpcOptions;
3421 sync_string_ret_string_param(rpcOptions, _return, p_param1);
3422 }
3423
sync_string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,::std::string & _return,const::std::string & p_param1)3424 void ParamServiceAsyncClient::sync_string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_param1) {
3425 apache::thrift::ClientReceiveState returnState;
3426 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3427 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3428 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3429 auto ctxAndHeader = string_ret_string_paramCtx(&rpcOptions);
3430 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3431 callback.waitUntilDone(
3432 evb,
3433 [&] {
3434 string_ret_string_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
3435 });
3436
3437 if (returnState.isException()) {
3438 returnState.exception().throw_exception();
3439 }
3440 returnState.resetProtocolId(protocolId);
3441 returnState.resetCtx(std::move(ctxAndHeader.first));
3442 SCOPE_EXIT {
3443 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
3444 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
3445 }
3446 };
3447 return folly::fibers::runInMainContext([&] {
3448 recv_string_ret_string_param(_return, returnState);
3449 });
3450 }
3451
3452
future_string_ret_string_param(const::std::string & p_param1)3453 folly::Future<::std::string> ParamServiceAsyncClient::future_string_ret_string_param(const ::std::string& p_param1) {
3454 ::apache::thrift::RpcOptions rpcOptions;
3455 return future_string_ret_string_param(rpcOptions, p_param1);
3456 }
3457
semifuture_string_ret_string_param(const::std::string & p_param1)3458 folly::SemiFuture<::std::string> ParamServiceAsyncClient::semifuture_string_ret_string_param(const ::std::string& p_param1) {
3459 ::apache::thrift::RpcOptions rpcOptions;
3460 return semifuture_string_ret_string_param(rpcOptions, p_param1);
3461 }
3462
future_string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3463 folly::Future<::std::string> ParamServiceAsyncClient::future_string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3464 folly::Promise<::std::string> promise;
3465 auto future = promise.getFuture();
3466 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::string>>(std::move(promise), recv_wrapped_string_ret_string_param, channel_);
3467 string_ret_string_param(rpcOptions, std::move(callback), p_param1);
3468 return future;
3469 }
3470
semifuture_string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3471 folly::SemiFuture<::std::string> ParamServiceAsyncClient::semifuture_string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3472 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_string_ret_string_param, channel_);
3473 auto callback = std::move(callbackAndFuture.first);
3474 string_ret_string_param(rpcOptions, std::move(callback), p_param1);
3475 return std::move(callbackAndFuture.second);
3476 }
3477
header_future_string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3478 folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3479 folly::Promise<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
3480 auto future = promise.getFuture();
3481 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::string>>(std::move(promise), recv_wrapped_string_ret_string_param, channel_);
3482 string_ret_string_param(rpcOptions, std::move(callback), p_param1);
3483 return future;
3484 }
3485
header_semifuture_string_ret_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3486 folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_string_ret_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3487 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_string_ret_string_param, channel_);
3488 auto callback = std::move(callbackAndFuture.first);
3489 string_ret_string_param(rpcOptions, std::move(callback), p_param1);
3490 return std::move(callbackAndFuture.second);
3491 }
3492
string_ret_string_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::string & p_param1)3493 void ParamServiceAsyncClient::string_ret_string_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_param1) {
3494 string_ret_string_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
3495 }
3496
3497 #if FOLLY_HAS_COROUTINES
3498 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_string_ret_string_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3499 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_string_ret_string_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3500 if (state.isException()) {
3501 return std::move(state.exception());
3502 }
3503 if (!state.hasResponseBuffer()) {
3504 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
3505 }
3506
3507 using result = ParamService_string_ret_string_param_presult;
3508 switch (state.protocolId()) {
3509 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3510 {
3511 apache::thrift::BinaryProtocolReader reader;
3512 return apache::thrift::detail::ac::recv_wrapped<result>(
3513 &reader, state, _return);
3514 }
3515 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3516 {
3517 apache::thrift::CompactProtocolReader reader;
3518 return apache::thrift::detail::ac::recv_wrapped<result>(
3519 &reader, state, _return);
3520 }
3521 default:
3522 {
3523 }
3524 }
3525 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
3526 }
3527
recv_string_ret_string_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3528 void ParamServiceAsyncClient::recv_string_ret_string_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3529 auto ew = recv_wrapped_string_ret_string_param(_return, state);
3530 if (ew) {
3531 ew.throw_exception();
3532 }
3533 }
3534
recv_instance_string_ret_string_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3535 void ParamServiceAsyncClient::recv_instance_string_ret_string_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3536 return recv_string_ret_string_param(_return, state);
3537 }
3538
recv_instance_wrapped_string_ret_string_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3539 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_string_ret_string_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3540 return recv_wrapped_string_ret_string_param(_return, state);
3541 }
3542
binary_ret_binary_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)3543 void ParamServiceAsyncClient::binary_ret_binary_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
3544 ::apache::thrift::RpcOptions rpcOptions;
3545 binary_ret_binary_param(rpcOptions, std::move(callback), p_param1);
3546 }
3547
binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)3548 void ParamServiceAsyncClient::binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
3549 auto [ctx, header] = binary_ret_binary_paramCtx(&rpcOptions);
3550 apache::thrift::RequestCallback::Context callbackContext;
3551 callbackContext.protocolId =
3552 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3553 auto* contextStack = ctx.get();
3554 if (callback) {
3555 callbackContext.ctx = std::move(ctx);
3556 }
3557 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
3558 binary_ret_binary_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
3559 }
3560
binary_ret_binary_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1,bool stealRpcOptions)3561 void ParamServiceAsyncClient::binary_ret_binary_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1, bool stealRpcOptions) {
3562 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
3563 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3564 {
3565 apache::thrift::BinaryProtocolWriter writer;
3566 if (stealRpcOptions) {
3567 binary_ret_binary_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3568 } else {
3569 binary_ret_binary_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3570 }
3571 break;
3572 }
3573 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3574 {
3575 apache::thrift::CompactProtocolWriter writer;
3576 if (stealRpcOptions) {
3577 binary_ret_binary_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3578 } else {
3579 binary_ret_binary_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3580 }
3581 break;
3582 }
3583 default:
3584 {
3585 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3586 }
3587 }
3588 }
3589
binary_ret_binary_paramCtx(apache::thrift::RpcOptions * rpcOptions)3590 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::binary_ret_binary_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3591 auto header = std::make_shared<apache::thrift::transport::THeader>(
3592 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3593 header->setProtocolId(channel_->getProtocolId());
3594 if (rpcOptions) {
3595 header->setHeaders(rpcOptions->releaseWriteHeaders());
3596 }
3597
3598 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3599 handlers_,
3600 getServiceName(),
3601 "ParamService.binary_ret_binary_param",
3602 *header);
3603
3604 return {std::move(ctx), std::move(header)};
3605 }
3606
sync_binary_ret_binary_param(::std::string & _return,const::std::string & p_param1)3607 void ParamServiceAsyncClient::sync_binary_ret_binary_param(::std::string& _return, const ::std::string& p_param1) {
3608 ::apache::thrift::RpcOptions rpcOptions;
3609 sync_binary_ret_binary_param(rpcOptions, _return, p_param1);
3610 }
3611
sync_binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,::std::string & _return,const::std::string & p_param1)3612 void ParamServiceAsyncClient::sync_binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_param1) {
3613 apache::thrift::ClientReceiveState returnState;
3614 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3615 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3616 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3617 auto ctxAndHeader = binary_ret_binary_paramCtx(&rpcOptions);
3618 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3619 callback.waitUntilDone(
3620 evb,
3621 [&] {
3622 binary_ret_binary_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
3623 });
3624
3625 if (returnState.isException()) {
3626 returnState.exception().throw_exception();
3627 }
3628 returnState.resetProtocolId(protocolId);
3629 returnState.resetCtx(std::move(ctxAndHeader.first));
3630 SCOPE_EXIT {
3631 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
3632 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
3633 }
3634 };
3635 return folly::fibers::runInMainContext([&] {
3636 recv_binary_ret_binary_param(_return, returnState);
3637 });
3638 }
3639
3640
future_binary_ret_binary_param(const::std::string & p_param1)3641 folly::Future<::std::string> ParamServiceAsyncClient::future_binary_ret_binary_param(const ::std::string& p_param1) {
3642 ::apache::thrift::RpcOptions rpcOptions;
3643 return future_binary_ret_binary_param(rpcOptions, p_param1);
3644 }
3645
semifuture_binary_ret_binary_param(const::std::string & p_param1)3646 folly::SemiFuture<::std::string> ParamServiceAsyncClient::semifuture_binary_ret_binary_param(const ::std::string& p_param1) {
3647 ::apache::thrift::RpcOptions rpcOptions;
3648 return semifuture_binary_ret_binary_param(rpcOptions, p_param1);
3649 }
3650
future_binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3651 folly::Future<::std::string> ParamServiceAsyncClient::future_binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3652 folly::Promise<::std::string> promise;
3653 auto future = promise.getFuture();
3654 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::string>>(std::move(promise), recv_wrapped_binary_ret_binary_param, channel_);
3655 binary_ret_binary_param(rpcOptions, std::move(callback), p_param1);
3656 return future;
3657 }
3658
semifuture_binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3659 folly::SemiFuture<::std::string> ParamServiceAsyncClient::semifuture_binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3660 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_binary_ret_binary_param, channel_);
3661 auto callback = std::move(callbackAndFuture.first);
3662 binary_ret_binary_param(rpcOptions, std::move(callback), p_param1);
3663 return std::move(callbackAndFuture.second);
3664 }
3665
header_future_binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3666 folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3667 folly::Promise<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
3668 auto future = promise.getFuture();
3669 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::string>>(std::move(promise), recv_wrapped_binary_ret_binary_param, channel_);
3670 binary_ret_binary_param(rpcOptions, std::move(callback), p_param1);
3671 return future;
3672 }
3673
header_semifuture_binary_ret_binary_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)3674 folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_binary_ret_binary_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
3675 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_binary_ret_binary_param, channel_);
3676 auto callback = std::move(callbackAndFuture.first);
3677 binary_ret_binary_param(rpcOptions, std::move(callback), p_param1);
3678 return std::move(callbackAndFuture.second);
3679 }
3680
binary_ret_binary_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::string & p_param1)3681 void ParamServiceAsyncClient::binary_ret_binary_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_param1) {
3682 binary_ret_binary_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
3683 }
3684
3685 #if FOLLY_HAS_COROUTINES
3686 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_binary_ret_binary_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3687 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_binary_ret_binary_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3688 if (state.isException()) {
3689 return std::move(state.exception());
3690 }
3691 if (!state.hasResponseBuffer()) {
3692 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
3693 }
3694
3695 using result = ParamService_binary_ret_binary_param_presult;
3696 switch (state.protocolId()) {
3697 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3698 {
3699 apache::thrift::BinaryProtocolReader reader;
3700 return apache::thrift::detail::ac::recv_wrapped<result>(
3701 &reader, state, _return);
3702 }
3703 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3704 {
3705 apache::thrift::CompactProtocolReader reader;
3706 return apache::thrift::detail::ac::recv_wrapped<result>(
3707 &reader, state, _return);
3708 }
3709 default:
3710 {
3711 }
3712 }
3713 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
3714 }
3715
recv_binary_ret_binary_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3716 void ParamServiceAsyncClient::recv_binary_ret_binary_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3717 auto ew = recv_wrapped_binary_ret_binary_param(_return, state);
3718 if (ew) {
3719 ew.throw_exception();
3720 }
3721 }
3722
recv_instance_binary_ret_binary_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3723 void ParamServiceAsyncClient::recv_instance_binary_ret_binary_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3724 return recv_binary_ret_binary_param(_return, state);
3725 }
3726
recv_instance_wrapped_binary_ret_binary_param(::std::string & _return,::apache::thrift::ClientReceiveState & state)3727 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_binary_ret_binary_param(::std::string& _return, ::apache::thrift::ClientReceiveState& state) {
3728 return recv_wrapped_binary_ret_binary_param(_return, state);
3729 }
3730
map_ret_bool_param(std::unique_ptr<apache::thrift::RequestCallback> callback,bool p_param1)3731 void ParamServiceAsyncClient::map_ret_bool_param(std::unique_ptr<apache::thrift::RequestCallback> callback, bool p_param1) {
3732 ::apache::thrift::RpcOptions rpcOptions;
3733 map_ret_bool_param(rpcOptions, std::move(callback), p_param1);
3734 }
3735
map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,bool p_param1)3736 void ParamServiceAsyncClient::map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, bool p_param1) {
3737 auto [ctx, header] = map_ret_bool_paramCtx(&rpcOptions);
3738 apache::thrift::RequestCallback::Context callbackContext;
3739 callbackContext.protocolId =
3740 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3741 auto* contextStack = ctx.get();
3742 if (callback) {
3743 callbackContext.ctx = std::move(ctx);
3744 }
3745 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
3746 map_ret_bool_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
3747 }
3748
map_ret_bool_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,bool p_param1,bool stealRpcOptions)3749 void ParamServiceAsyncClient::map_ret_bool_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool p_param1, bool stealRpcOptions) {
3750 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
3751 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3752 {
3753 apache::thrift::BinaryProtocolWriter writer;
3754 if (stealRpcOptions) {
3755 map_ret_bool_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3756 } else {
3757 map_ret_bool_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3758 }
3759 break;
3760 }
3761 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3762 {
3763 apache::thrift::CompactProtocolWriter writer;
3764 if (stealRpcOptions) {
3765 map_ret_bool_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
3766 } else {
3767 map_ret_bool_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
3768 }
3769 break;
3770 }
3771 default:
3772 {
3773 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3774 }
3775 }
3776 }
3777
map_ret_bool_paramCtx(apache::thrift::RpcOptions * rpcOptions)3778 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::map_ret_bool_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3779 auto header = std::make_shared<apache::thrift::transport::THeader>(
3780 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3781 header->setProtocolId(channel_->getProtocolId());
3782 if (rpcOptions) {
3783 header->setHeaders(rpcOptions->releaseWriteHeaders());
3784 }
3785
3786 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3787 handlers_,
3788 getServiceName(),
3789 "ParamService.map_ret_bool_param",
3790 *header);
3791
3792 return {std::move(ctx), std::move(header)};
3793 }
3794
sync_map_ret_bool_param(::std::map<::std::string,::std::int64_t> & _return,bool p_param1)3795 void ParamServiceAsyncClient::sync_map_ret_bool_param(::std::map<::std::string, ::std::int64_t>& _return, bool p_param1) {
3796 ::apache::thrift::RpcOptions rpcOptions;
3797 sync_map_ret_bool_param(rpcOptions, _return, p_param1);
3798 }
3799
sync_map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,::std::map<::std::string,::std::int64_t> & _return,bool p_param1)3800 void ParamServiceAsyncClient::sync_map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::int64_t>& _return, bool p_param1) {
3801 apache::thrift::ClientReceiveState returnState;
3802 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3803 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3804 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3805 auto ctxAndHeader = map_ret_bool_paramCtx(&rpcOptions);
3806 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3807 callback.waitUntilDone(
3808 evb,
3809 [&] {
3810 map_ret_bool_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
3811 });
3812
3813 if (returnState.isException()) {
3814 returnState.exception().throw_exception();
3815 }
3816 returnState.resetProtocolId(protocolId);
3817 returnState.resetCtx(std::move(ctxAndHeader.first));
3818 SCOPE_EXIT {
3819 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
3820 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
3821 }
3822 };
3823 return folly::fibers::runInMainContext([&] {
3824 recv_map_ret_bool_param(_return, returnState);
3825 });
3826 }
3827
3828
future_map_ret_bool_param(bool p_param1)3829 folly::Future<::std::map<::std::string, ::std::int64_t>> ParamServiceAsyncClient::future_map_ret_bool_param(bool p_param1) {
3830 ::apache::thrift::RpcOptions rpcOptions;
3831 return future_map_ret_bool_param(rpcOptions, p_param1);
3832 }
3833
semifuture_map_ret_bool_param(bool p_param1)3834 folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> ParamServiceAsyncClient::semifuture_map_ret_bool_param(bool p_param1) {
3835 ::apache::thrift::RpcOptions rpcOptions;
3836 return semifuture_map_ret_bool_param(rpcOptions, p_param1);
3837 }
3838
future_map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,bool p_param1)3839 folly::Future<::std::map<::std::string, ::std::int64_t>> ParamServiceAsyncClient::future_map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, bool p_param1) {
3840 folly::Promise<::std::map<::std::string, ::std::int64_t>> promise;
3841 auto future = promise.getFuture();
3842 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::map<::std::string, ::std::int64_t>>>(std::move(promise), recv_wrapped_map_ret_bool_param, channel_);
3843 map_ret_bool_param(rpcOptions, std::move(callback), p_param1);
3844 return future;
3845 }
3846
semifuture_map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,bool p_param1)3847 folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> ParamServiceAsyncClient::semifuture_map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, bool p_param1) {
3848 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_map_ret_bool_param, channel_);
3849 auto callback = std::move(callbackAndFuture.first);
3850 map_ret_bool_param(rpcOptions, std::move(callback), p_param1);
3851 return std::move(callbackAndFuture.second);
3852 }
3853
header_future_map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,bool p_param1)3854 folly::Future<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, bool p_param1) {
3855 folly::Promise<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
3856 auto future = promise.getFuture();
3857 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::map<::std::string, ::std::int64_t>>>(std::move(promise), recv_wrapped_map_ret_bool_param, channel_);
3858 map_ret_bool_param(rpcOptions, std::move(callback), p_param1);
3859 return future;
3860 }
3861
header_semifuture_map_ret_bool_param(apache::thrift::RpcOptions & rpcOptions,bool p_param1)3862 folly::SemiFuture<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_map_ret_bool_param(apache::thrift::RpcOptions& rpcOptions, bool p_param1) {
3863 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_map_ret_bool_param, channel_);
3864 auto callback = std::move(callbackAndFuture.first);
3865 map_ret_bool_param(rpcOptions, std::move(callback), p_param1);
3866 return std::move(callbackAndFuture.second);
3867 }
3868
map_ret_bool_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,bool p_param1)3869 void ParamServiceAsyncClient::map_ret_bool_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, bool p_param1) {
3870 map_ret_bool_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
3871 }
3872
3873 #if FOLLY_HAS_COROUTINES
3874 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_map_ret_bool_param(::std::map<::std::string,::std::int64_t> & _return,::apache::thrift::ClientReceiveState & state)3875 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_map_ret_bool_param(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state) {
3876 if (state.isException()) {
3877 return std::move(state.exception());
3878 }
3879 if (!state.hasResponseBuffer()) {
3880 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
3881 }
3882
3883 using result = ParamService_map_ret_bool_param_presult;
3884 switch (state.protocolId()) {
3885 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3886 {
3887 apache::thrift::BinaryProtocolReader reader;
3888 return apache::thrift::detail::ac::recv_wrapped<result>(
3889 &reader, state, _return);
3890 }
3891 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3892 {
3893 apache::thrift::CompactProtocolReader reader;
3894 return apache::thrift::detail::ac::recv_wrapped<result>(
3895 &reader, state, _return);
3896 }
3897 default:
3898 {
3899 }
3900 }
3901 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
3902 }
3903
recv_map_ret_bool_param(::std::map<::std::string,::std::int64_t> & _return,::apache::thrift::ClientReceiveState & state)3904 void ParamServiceAsyncClient::recv_map_ret_bool_param(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state) {
3905 auto ew = recv_wrapped_map_ret_bool_param(_return, state);
3906 if (ew) {
3907 ew.throw_exception();
3908 }
3909 }
3910
recv_instance_map_ret_bool_param(::std::map<::std::string,::std::int64_t> & _return,::apache::thrift::ClientReceiveState & state)3911 void ParamServiceAsyncClient::recv_instance_map_ret_bool_param(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state) {
3912 return recv_map_ret_bool_param(_return, state);
3913 }
3914
recv_instance_wrapped_map_ret_bool_param(::std::map<::std::string,::std::int64_t> & _return,::apache::thrift::ClientReceiveState & state)3915 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_map_ret_bool_param(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state) {
3916 return recv_wrapped_map_ret_bool_param(_return, state);
3917 }
3918
list_ret_map_setlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)3919 void ParamServiceAsyncClient::list_ret_map_setlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
3920 ::apache::thrift::RpcOptions rpcOptions;
3921 list_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
3922 }
3923
list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)3924 void ParamServiceAsyncClient::list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
3925 auto [ctx, header] = list_ret_map_setlist_paramCtx(&rpcOptions);
3926 apache::thrift::RequestCallback::Context callbackContext;
3927 callbackContext.protocolId =
3928 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3929 auto* contextStack = ctx.get();
3930 if (callback) {
3931 callbackContext.ctx = std::move(ctx);
3932 }
3933 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
3934 list_ret_map_setlist_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
3935 }
3936
list_ret_map_setlist_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2,bool stealRpcOptions)3937 void ParamServiceAsyncClient::list_ret_map_setlist_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2, bool stealRpcOptions) {
3938 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
3939 case apache::thrift::protocol::T_BINARY_PROTOCOL:
3940 {
3941 apache::thrift::BinaryProtocolWriter writer;
3942 if (stealRpcOptions) {
3943 list_ret_map_setlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
3944 } else {
3945 list_ret_map_setlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
3946 }
3947 break;
3948 }
3949 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
3950 {
3951 apache::thrift::CompactProtocolWriter writer;
3952 if (stealRpcOptions) {
3953 list_ret_map_setlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
3954 } else {
3955 list_ret_map_setlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
3956 }
3957 break;
3958 }
3959 default:
3960 {
3961 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
3962 }
3963 }
3964 }
3965
list_ret_map_setlist_paramCtx(apache::thrift::RpcOptions * rpcOptions)3966 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::list_ret_map_setlist_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
3967 auto header = std::make_shared<apache::thrift::transport::THeader>(
3968 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
3969 header->setProtocolId(channel_->getProtocolId());
3970 if (rpcOptions) {
3971 header->setHeaders(rpcOptions->releaseWriteHeaders());
3972 }
3973
3974 auto ctx = apache::thrift::ContextStack::createWithClientContext(
3975 handlers_,
3976 getServiceName(),
3977 "ParamService.list_ret_map_setlist_param",
3978 *header);
3979
3980 return {std::move(ctx), std::move(header)};
3981 }
3982
sync_list_ret_map_setlist_param(::std::vector<bool> & _return,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)3983 void ParamServiceAsyncClient::sync_list_ret_map_setlist_param(::std::vector<bool>& _return, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
3984 ::apache::thrift::RpcOptions rpcOptions;
3985 sync_list_ret_map_setlist_param(rpcOptions, _return, p_param1, p_param2);
3986 }
3987
sync_list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,::std::vector<bool> & _return,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)3988 void ParamServiceAsyncClient::sync_list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, ::std::vector<bool>& _return, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
3989 apache::thrift::ClientReceiveState returnState;
3990 apache::thrift::ClientSyncCallback<false> callback(&returnState);
3991 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
3992 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
3993 auto ctxAndHeader = list_ret_map_setlist_paramCtx(&rpcOptions);
3994 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
3995 callback.waitUntilDone(
3996 evb,
3997 [&] {
3998 list_ret_map_setlist_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
3999 });
4000
4001 if (returnState.isException()) {
4002 returnState.exception().throw_exception();
4003 }
4004 returnState.resetProtocolId(protocolId);
4005 returnState.resetCtx(std::move(ctxAndHeader.first));
4006 SCOPE_EXIT {
4007 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4008 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4009 }
4010 };
4011 return folly::fibers::runInMainContext([&] {
4012 recv_list_ret_map_setlist_param(_return, returnState);
4013 });
4014 }
4015
4016
future_list_ret_map_setlist_param(const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4017 folly::Future<::std::vector<bool>> ParamServiceAsyncClient::future_list_ret_map_setlist_param(const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4018 ::apache::thrift::RpcOptions rpcOptions;
4019 return future_list_ret_map_setlist_param(rpcOptions, p_param1, p_param2);
4020 }
4021
semifuture_list_ret_map_setlist_param(const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4022 folly::SemiFuture<::std::vector<bool>> ParamServiceAsyncClient::semifuture_list_ret_map_setlist_param(const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4023 ::apache::thrift::RpcOptions rpcOptions;
4024 return semifuture_list_ret_map_setlist_param(rpcOptions, p_param1, p_param2);
4025 }
4026
future_list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4027 folly::Future<::std::vector<bool>> ParamServiceAsyncClient::future_list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4028 folly::Promise<::std::vector<bool>> promise;
4029 auto future = promise.getFuture();
4030 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::vector<bool>>>(std::move(promise), recv_wrapped_list_ret_map_setlist_param, channel_);
4031 list_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
4032 return future;
4033 }
4034
semifuture_list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4035 folly::SemiFuture<::std::vector<bool>> ParamServiceAsyncClient::semifuture_list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4036 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_list_ret_map_setlist_param, channel_);
4037 auto callback = std::move(callbackAndFuture.first);
4038 list_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
4039 return std::move(callbackAndFuture.second);
4040 }
4041
header_future_list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4042 folly::Future<std::pair<::std::vector<bool>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4043 folly::Promise<std::pair<::std::vector<bool>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4044 auto future = promise.getFuture();
4045 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::vector<bool>>>(std::move(promise), recv_wrapped_list_ret_map_setlist_param, channel_);
4046 list_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
4047 return future;
4048 }
4049
header_semifuture_list_ret_map_setlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4050 folly::SemiFuture<std::pair<::std::vector<bool>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_list_ret_map_setlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4051 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_list_ret_map_setlist_param, channel_);
4052 auto callback = std::move(callbackAndFuture.first);
4053 list_ret_map_setlist_param(rpcOptions, std::move(callback), p_param1, p_param2);
4054 return std::move(callbackAndFuture.second);
4055 }
4056
list_ret_map_setlist_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::map<::std::int32_t,::std::vector<::std::string>> & p_param1,const::std::vector<::std::string> & p_param2)4057 void ParamServiceAsyncClient::list_ret_map_setlist_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::map<::std::int32_t, ::std::vector<::std::string>>& p_param1, const ::std::vector<::std::string>& p_param2) {
4058 list_ret_map_setlist_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
4059 }
4060
4061 #if FOLLY_HAS_COROUTINES
4062 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_list_ret_map_setlist_param(::std::vector<bool> & _return,::apache::thrift::ClientReceiveState & state)4063 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_list_ret_map_setlist_param(::std::vector<bool>& _return, ::apache::thrift::ClientReceiveState& state) {
4064 if (state.isException()) {
4065 return std::move(state.exception());
4066 }
4067 if (!state.hasResponseBuffer()) {
4068 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
4069 }
4070
4071 using result = ParamService_list_ret_map_setlist_param_presult;
4072 switch (state.protocolId()) {
4073 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4074 {
4075 apache::thrift::BinaryProtocolReader reader;
4076 return apache::thrift::detail::ac::recv_wrapped<result>(
4077 &reader, state, _return);
4078 }
4079 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4080 {
4081 apache::thrift::CompactProtocolReader reader;
4082 return apache::thrift::detail::ac::recv_wrapped<result>(
4083 &reader, state, _return);
4084 }
4085 default:
4086 {
4087 }
4088 }
4089 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
4090 }
4091
recv_list_ret_map_setlist_param(::std::vector<bool> & _return,::apache::thrift::ClientReceiveState & state)4092 void ParamServiceAsyncClient::recv_list_ret_map_setlist_param(::std::vector<bool>& _return, ::apache::thrift::ClientReceiveState& state) {
4093 auto ew = recv_wrapped_list_ret_map_setlist_param(_return, state);
4094 if (ew) {
4095 ew.throw_exception();
4096 }
4097 }
4098
recv_instance_list_ret_map_setlist_param(::std::vector<bool> & _return,::apache::thrift::ClientReceiveState & state)4099 void ParamServiceAsyncClient::recv_instance_list_ret_map_setlist_param(::std::vector<bool>& _return, ::apache::thrift::ClientReceiveState& state) {
4100 return recv_list_ret_map_setlist_param(_return, state);
4101 }
4102
recv_instance_wrapped_list_ret_map_setlist_param(::std::vector<bool> & _return,::apache::thrift::ClientReceiveState & state)4103 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_list_ret_map_setlist_param(::std::vector<bool>& _return, ::apache::thrift::ClientReceiveState& state) {
4104 return recv_wrapped_list_ret_map_setlist_param(_return, state);
4105 }
4106
mapsetlistmapliststring_ret_listlistlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4107 void ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4108 ::apache::thrift::RpcOptions rpcOptions;
4109 mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, std::move(callback), p_param1);
4110 }
4111
mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4112 void ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4113 auto [ctx, header] = mapsetlistmapliststring_ret_listlistlist_paramCtx(&rpcOptions);
4114 apache::thrift::RequestCallback::Context callbackContext;
4115 callbackContext.protocolId =
4116 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4117 auto* contextStack = ctx.get();
4118 if (callback) {
4119 callbackContext.ctx = std::move(ctx);
4120 }
4121 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
4122 mapsetlistmapliststring_ret_listlistlist_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
4123 }
4124
mapsetlistmapliststring_ret_listlistlist_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1,bool stealRpcOptions)4125 void ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1, bool stealRpcOptions) {
4126 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
4127 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4128 {
4129 apache::thrift::BinaryProtocolWriter writer;
4130 if (stealRpcOptions) {
4131 mapsetlistmapliststring_ret_listlistlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4132 } else {
4133 mapsetlistmapliststring_ret_listlistlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4134 }
4135 break;
4136 }
4137 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4138 {
4139 apache::thrift::CompactProtocolWriter writer;
4140 if (stealRpcOptions) {
4141 mapsetlistmapliststring_ret_listlistlist_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4142 } else {
4143 mapsetlistmapliststring_ret_listlistlist_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4144 }
4145 break;
4146 }
4147 default:
4148 {
4149 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
4150 }
4151 }
4152 }
4153
mapsetlistmapliststring_ret_listlistlist_paramCtx(apache::thrift::RpcOptions * rpcOptions)4154 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
4155 auto header = std::make_shared<apache::thrift::transport::THeader>(
4156 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
4157 header->setProtocolId(channel_->getProtocolId());
4158 if (rpcOptions) {
4159 header->setHeaders(rpcOptions->releaseWriteHeaders());
4160 }
4161
4162 auto ctx = apache::thrift::ContextStack::createWithClientContext(
4163 handlers_,
4164 getServiceName(),
4165 "ParamService.mapsetlistmapliststring_ret_listlistlist_param",
4166 *header);
4167
4168 return {std::move(ctx), std::move(header)};
4169 }
4170
sync_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4171 void ParamServiceAsyncClient::sync_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4172 ::apache::thrift::RpcOptions rpcOptions;
4173 sync_mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, _return, p_param1);
4174 }
4175
sync_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4176 void ParamServiceAsyncClient::sync_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4177 apache::thrift::ClientReceiveState returnState;
4178 apache::thrift::ClientSyncCallback<false> callback(&returnState);
4179 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4180 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
4181 auto ctxAndHeader = mapsetlistmapliststring_ret_listlistlist_paramCtx(&rpcOptions);
4182 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
4183 callback.waitUntilDone(
4184 evb,
4185 [&] {
4186 mapsetlistmapliststring_ret_listlistlist_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
4187 });
4188
4189 if (returnState.isException()) {
4190 returnState.exception().throw_exception();
4191 }
4192 returnState.resetProtocolId(protocolId);
4193 returnState.resetCtx(std::move(ctxAndHeader.first));
4194 SCOPE_EXIT {
4195 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4196 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4197 }
4198 };
4199 return folly::fibers::runInMainContext([&] {
4200 recv_mapsetlistmapliststring_ret_listlistlist_param(_return, returnState);
4201 });
4202 }
4203
4204
future_mapsetlistmapliststring_ret_listlistlist_param(const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4205 folly::Future<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>> ParamServiceAsyncClient::future_mapsetlistmapliststring_ret_listlistlist_param(const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4206 ::apache::thrift::RpcOptions rpcOptions;
4207 return future_mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, p_param1);
4208 }
4209
semifuture_mapsetlistmapliststring_ret_listlistlist_param(const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4210 folly::SemiFuture<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>> ParamServiceAsyncClient::semifuture_mapsetlistmapliststring_ret_listlistlist_param(const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4211 ::apache::thrift::RpcOptions rpcOptions;
4212 return semifuture_mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, p_param1);
4213 }
4214
future_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4215 folly::Future<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>> ParamServiceAsyncClient::future_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4216 folly::Promise<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>> promise;
4217 auto future = promise.getFuture();
4218 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>>(std::move(promise), recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param, channel_);
4219 mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, std::move(callback), p_param1);
4220 return future;
4221 }
4222
semifuture_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4223 folly::SemiFuture<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>> ParamServiceAsyncClient::semifuture_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4224 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param, channel_);
4225 auto callback = std::move(callbackAndFuture.first);
4226 mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, std::move(callback), p_param1);
4227 return std::move(callbackAndFuture.second);
4228 }
4229
header_future_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4230 folly::Future<std::pair<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4231 folly::Promise<std::pair<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4232 auto future = promise.getFuture();
4233 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>>>(std::move(promise), recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param, channel_);
4234 mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, std::move(callback), p_param1);
4235 return future;
4236 }
4237
header_semifuture_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions & rpcOptions,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4238 folly::SemiFuture<std::pair<::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_mapsetlistmapliststring_ret_listlistlist_param(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4239 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param, channel_);
4240 auto callback = std::move(callbackAndFuture.first);
4241 mapsetlistmapliststring_ret_listlistlist_param(rpcOptions, std::move(callback), p_param1);
4242 return std::move(callbackAndFuture.second);
4243 }
4244
mapsetlistmapliststring_ret_listlistlist_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> & p_param1)4245 void ParamServiceAsyncClient::mapsetlistmapliststring_ret_listlistlist_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& p_param1) {
4246 mapsetlistmapliststring_ret_listlistlist_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
4247 }
4248
4249 #if FOLLY_HAS_COROUTINES
4250 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,::apache::thrift::ClientReceiveState & state)4251 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) {
4252 if (state.isException()) {
4253 return std::move(state.exception());
4254 }
4255 if (!state.hasResponseBuffer()) {
4256 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
4257 }
4258
4259 using result = ParamService_mapsetlistmapliststring_ret_listlistlist_param_presult;
4260 switch (state.protocolId()) {
4261 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4262 {
4263 apache::thrift::BinaryProtocolReader reader;
4264 return apache::thrift::detail::ac::recv_wrapped<result>(
4265 &reader, state, _return);
4266 }
4267 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4268 {
4269 apache::thrift::CompactProtocolReader reader;
4270 return apache::thrift::detail::ac::recv_wrapped<result>(
4271 &reader, state, _return);
4272 }
4273 default:
4274 {
4275 }
4276 }
4277 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
4278 }
4279
recv_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,::apache::thrift::ClientReceiveState & state)4280 void ParamServiceAsyncClient::recv_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) {
4281 auto ew = recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param(_return, state);
4282 if (ew) {
4283 ew.throw_exception();
4284 }
4285 }
4286
recv_instance_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,::apache::thrift::ClientReceiveState & state)4287 void ParamServiceAsyncClient::recv_instance_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) {
4288 return recv_mapsetlistmapliststring_ret_listlistlist_param(_return, state);
4289 }
4290
recv_instance_wrapped_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>,::std::map<::std::vector<::std::set<::std::string>>,::std::string>> & _return,::apache::thrift::ClientReceiveState & state)4291 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_mapsetlistmapliststring_ret_listlistlist_param(::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& _return, ::apache::thrift::ClientReceiveState& state) {
4292 return recv_wrapped_mapsetlistmapliststring_ret_listlistlist_param(_return, state);
4293 }
4294
typedef_ret_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1)4295 void ParamServiceAsyncClient::typedef_ret_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1) {
4296 ::apache::thrift::RpcOptions rpcOptions;
4297 typedef_ret_i32_param(rpcOptions, std::move(callback), p_param1);
4298 }
4299
typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1)4300 void ParamServiceAsyncClient::typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1) {
4301 auto [ctx, header] = typedef_ret_i32_paramCtx(&rpcOptions);
4302 apache::thrift::RequestCallback::Context callbackContext;
4303 callbackContext.protocolId =
4304 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4305 auto* contextStack = ctx.get();
4306 if (callback) {
4307 callbackContext.ctx = std::move(ctx);
4308 }
4309 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
4310 typedef_ret_i32_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
4311 }
4312
typedef_ret_i32_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,bool stealRpcOptions)4313 void ParamServiceAsyncClient::typedef_ret_i32_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, bool stealRpcOptions) {
4314 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
4315 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4316 {
4317 apache::thrift::BinaryProtocolWriter writer;
4318 if (stealRpcOptions) {
4319 typedef_ret_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4320 } else {
4321 typedef_ret_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4322 }
4323 break;
4324 }
4325 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4326 {
4327 apache::thrift::CompactProtocolWriter writer;
4328 if (stealRpcOptions) {
4329 typedef_ret_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4330 } else {
4331 typedef_ret_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4332 }
4333 break;
4334 }
4335 default:
4336 {
4337 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
4338 }
4339 }
4340 }
4341
typedef_ret_i32_paramCtx(apache::thrift::RpcOptions * rpcOptions)4342 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::typedef_ret_i32_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
4343 auto header = std::make_shared<apache::thrift::transport::THeader>(
4344 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
4345 header->setProtocolId(channel_->getProtocolId());
4346 if (rpcOptions) {
4347 header->setHeaders(rpcOptions->releaseWriteHeaders());
4348 }
4349
4350 auto ctx = apache::thrift::ContextStack::createWithClientContext(
4351 handlers_,
4352 getServiceName(),
4353 "ParamService.typedef_ret_i32_param",
4354 *header);
4355
4356 return {std::move(ctx), std::move(header)};
4357 }
4358
sync_typedef_ret_i32_param(::std::int32_t p_param1)4359 ::some::valid::ns::simpleTypeDef ParamServiceAsyncClient::sync_typedef_ret_i32_param(::std::int32_t p_param1) {
4360 ::apache::thrift::RpcOptions rpcOptions;
4361 return sync_typedef_ret_i32_param(rpcOptions, p_param1);
4362 }
4363
sync_typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1)4364 ::some::valid::ns::simpleTypeDef ParamServiceAsyncClient::sync_typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1) {
4365 apache::thrift::ClientReceiveState returnState;
4366 apache::thrift::ClientSyncCallback<false> callback(&returnState);
4367 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4368 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
4369 auto ctxAndHeader = typedef_ret_i32_paramCtx(&rpcOptions);
4370 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
4371 callback.waitUntilDone(
4372 evb,
4373 [&] {
4374 typedef_ret_i32_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
4375 });
4376
4377 if (returnState.isException()) {
4378 returnState.exception().throw_exception();
4379 }
4380 returnState.resetProtocolId(protocolId);
4381 returnState.resetCtx(std::move(ctxAndHeader.first));
4382 SCOPE_EXIT {
4383 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4384 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4385 }
4386 };
4387 return folly::fibers::runInMainContext([&] {
4388 return recv_typedef_ret_i32_param(returnState);
4389 });
4390 }
4391
4392
future_typedef_ret_i32_param(::std::int32_t p_param1)4393 folly::Future<::some::valid::ns::simpleTypeDef> ParamServiceAsyncClient::future_typedef_ret_i32_param(::std::int32_t p_param1) {
4394 ::apache::thrift::RpcOptions rpcOptions;
4395 return future_typedef_ret_i32_param(rpcOptions, p_param1);
4396 }
4397
semifuture_typedef_ret_i32_param(::std::int32_t p_param1)4398 folly::SemiFuture<::some::valid::ns::simpleTypeDef> ParamServiceAsyncClient::semifuture_typedef_ret_i32_param(::std::int32_t p_param1) {
4399 ::apache::thrift::RpcOptions rpcOptions;
4400 return semifuture_typedef_ret_i32_param(rpcOptions, p_param1);
4401 }
4402
future_typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1)4403 folly::Future<::some::valid::ns::simpleTypeDef> ParamServiceAsyncClient::future_typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1) {
4404 folly::Promise<::some::valid::ns::simpleTypeDef> promise;
4405 auto future = promise.getFuture();
4406 auto callback = std::make_unique<apache::thrift::FutureCallback<::some::valid::ns::simpleTypeDef>>(std::move(promise), recv_wrapped_typedef_ret_i32_param, channel_);
4407 typedef_ret_i32_param(rpcOptions, std::move(callback), p_param1);
4408 return future;
4409 }
4410
semifuture_typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1)4411 folly::SemiFuture<::some::valid::ns::simpleTypeDef> ParamServiceAsyncClient::semifuture_typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1) {
4412 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_typedef_ret_i32_param, channel_);
4413 auto callback = std::move(callbackAndFuture.first);
4414 typedef_ret_i32_param(rpcOptions, std::move(callback), p_param1);
4415 return std::move(callbackAndFuture.second);
4416 }
4417
header_future_typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1)4418 folly::Future<std::pair<::some::valid::ns::simpleTypeDef, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1) {
4419 folly::Promise<std::pair<::some::valid::ns::simpleTypeDef, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4420 auto future = promise.getFuture();
4421 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::some::valid::ns::simpleTypeDef>>(std::move(promise), recv_wrapped_typedef_ret_i32_param, channel_);
4422 typedef_ret_i32_param(rpcOptions, std::move(callback), p_param1);
4423 return future;
4424 }
4425
header_semifuture_typedef_ret_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1)4426 folly::SemiFuture<std::pair<::some::valid::ns::simpleTypeDef, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_typedef_ret_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1) {
4427 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_typedef_ret_i32_param, channel_);
4428 auto callback = std::move(callbackAndFuture.first);
4429 typedef_ret_i32_param(rpcOptions, std::move(callback), p_param1);
4430 return std::move(callbackAndFuture.second);
4431 }
4432
typedef_ret_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int32_t p_param1)4433 void ParamServiceAsyncClient::typedef_ret_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int32_t p_param1) {
4434 typedef_ret_i32_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
4435 }
4436
4437 #if FOLLY_HAS_COROUTINES
4438 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_typedef_ret_i32_param(::some::valid::ns::simpleTypeDef & _return,::apache::thrift::ClientReceiveState & state)4439 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_typedef_ret_i32_param(::some::valid::ns::simpleTypeDef& _return, ::apache::thrift::ClientReceiveState& state) {
4440 if (state.isException()) {
4441 return std::move(state.exception());
4442 }
4443 if (!state.hasResponseBuffer()) {
4444 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
4445 }
4446
4447 using result = ParamService_typedef_ret_i32_param_presult;
4448 switch (state.protocolId()) {
4449 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4450 {
4451 apache::thrift::BinaryProtocolReader reader;
4452 return apache::thrift::detail::ac::recv_wrapped<result>(
4453 &reader, state, _return);
4454 }
4455 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4456 {
4457 apache::thrift::CompactProtocolReader reader;
4458 return apache::thrift::detail::ac::recv_wrapped<result>(
4459 &reader, state, _return);
4460 }
4461 default:
4462 {
4463 }
4464 }
4465 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
4466 }
4467
recv_typedef_ret_i32_param(::apache::thrift::ClientReceiveState & state)4468 ::some::valid::ns::simpleTypeDef ParamServiceAsyncClient::recv_typedef_ret_i32_param(::apache::thrift::ClientReceiveState& state) {
4469 ::some::valid::ns::simpleTypeDef _return;
4470 auto ew = recv_wrapped_typedef_ret_i32_param(_return, state);
4471 if (ew) {
4472 ew.throw_exception();
4473 }
4474 return _return;
4475 }
4476
recv_instance_typedef_ret_i32_param(::apache::thrift::ClientReceiveState & state)4477 ::some::valid::ns::simpleTypeDef ParamServiceAsyncClient::recv_instance_typedef_ret_i32_param(::apache::thrift::ClientReceiveState& state) {
4478 return recv_typedef_ret_i32_param(state);
4479 }
4480
recv_instance_wrapped_typedef_ret_i32_param(::some::valid::ns::simpleTypeDef & _return,::apache::thrift::ClientReceiveState & state)4481 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_typedef_ret_i32_param(::some::valid::ns::simpleTypeDef& _return, ::apache::thrift::ClientReceiveState& state) {
4482 return recv_wrapped_typedef_ret_i32_param(_return, state);
4483 }
4484
listtypedef_ret_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::complexStructTypeDef & p_param1)4485 void ParamServiceAsyncClient::listtypedef_ret_typedef_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4486 ::apache::thrift::RpcOptions rpcOptions;
4487 listtypedef_ret_typedef_param(rpcOptions, std::move(callback), p_param1);
4488 }
4489
listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::some::valid::ns::complexStructTypeDef & p_param1)4490 void ParamServiceAsyncClient::listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4491 auto [ctx, header] = listtypedef_ret_typedef_paramCtx(&rpcOptions);
4492 apache::thrift::RequestCallback::Context callbackContext;
4493 callbackContext.protocolId =
4494 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4495 auto* contextStack = ctx.get();
4496 if (callback) {
4497 callbackContext.ctx = std::move(ctx);
4498 }
4499 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
4500 listtypedef_ret_typedef_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
4501 }
4502
listtypedef_ret_typedef_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::some::valid::ns::complexStructTypeDef & p_param1,bool stealRpcOptions)4503 void ParamServiceAsyncClient::listtypedef_ret_typedef_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::some::valid::ns::complexStructTypeDef& p_param1, bool stealRpcOptions) {
4504 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
4505 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4506 {
4507 apache::thrift::BinaryProtocolWriter writer;
4508 if (stealRpcOptions) {
4509 listtypedef_ret_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4510 } else {
4511 listtypedef_ret_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4512 }
4513 break;
4514 }
4515 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4516 {
4517 apache::thrift::CompactProtocolWriter writer;
4518 if (stealRpcOptions) {
4519 listtypedef_ret_typedef_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4520 } else {
4521 listtypedef_ret_typedef_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4522 }
4523 break;
4524 }
4525 default:
4526 {
4527 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
4528 }
4529 }
4530 }
4531
listtypedef_ret_typedef_paramCtx(apache::thrift::RpcOptions * rpcOptions)4532 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::listtypedef_ret_typedef_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
4533 auto header = std::make_shared<apache::thrift::transport::THeader>(
4534 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
4535 header->setProtocolId(channel_->getProtocolId());
4536 if (rpcOptions) {
4537 header->setHeaders(rpcOptions->releaseWriteHeaders());
4538 }
4539
4540 auto ctx = apache::thrift::ContextStack::createWithClientContext(
4541 handlers_,
4542 getServiceName(),
4543 "ParamService.listtypedef_ret_typedef_param",
4544 *header);
4545
4546 return {std::move(ctx), std::move(header)};
4547 }
4548
sync_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef> & _return,const::some::valid::ns::complexStructTypeDef & p_param1)4549 void ParamServiceAsyncClient::sync_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef>& _return, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4550 ::apache::thrift::RpcOptions rpcOptions;
4551 sync_listtypedef_ret_typedef_param(rpcOptions, _return, p_param1);
4552 }
4553
sync_listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,::std::vector<::some::valid::ns::simpleTypeDef> & _return,const::some::valid::ns::complexStructTypeDef & p_param1)4554 void ParamServiceAsyncClient::sync_listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::some::valid::ns::simpleTypeDef>& _return, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4555 apache::thrift::ClientReceiveState returnState;
4556 apache::thrift::ClientSyncCallback<false> callback(&returnState);
4557 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4558 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
4559 auto ctxAndHeader = listtypedef_ret_typedef_paramCtx(&rpcOptions);
4560 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
4561 callback.waitUntilDone(
4562 evb,
4563 [&] {
4564 listtypedef_ret_typedef_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
4565 });
4566
4567 if (returnState.isException()) {
4568 returnState.exception().throw_exception();
4569 }
4570 returnState.resetProtocolId(protocolId);
4571 returnState.resetCtx(std::move(ctxAndHeader.first));
4572 SCOPE_EXIT {
4573 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4574 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4575 }
4576 };
4577 return folly::fibers::runInMainContext([&] {
4578 recv_listtypedef_ret_typedef_param(_return, returnState);
4579 });
4580 }
4581
4582
future_listtypedef_ret_typedef_param(const::some::valid::ns::complexStructTypeDef & p_param1)4583 folly::Future<::std::vector<::some::valid::ns::simpleTypeDef>> ParamServiceAsyncClient::future_listtypedef_ret_typedef_param(const ::some::valid::ns::complexStructTypeDef& p_param1) {
4584 ::apache::thrift::RpcOptions rpcOptions;
4585 return future_listtypedef_ret_typedef_param(rpcOptions, p_param1);
4586 }
4587
semifuture_listtypedef_ret_typedef_param(const::some::valid::ns::complexStructTypeDef & p_param1)4588 folly::SemiFuture<::std::vector<::some::valid::ns::simpleTypeDef>> ParamServiceAsyncClient::semifuture_listtypedef_ret_typedef_param(const ::some::valid::ns::complexStructTypeDef& p_param1) {
4589 ::apache::thrift::RpcOptions rpcOptions;
4590 return semifuture_listtypedef_ret_typedef_param(rpcOptions, p_param1);
4591 }
4592
future_listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::complexStructTypeDef & p_param1)4593 folly::Future<::std::vector<::some::valid::ns::simpleTypeDef>> ParamServiceAsyncClient::future_listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4594 folly::Promise<::std::vector<::some::valid::ns::simpleTypeDef>> promise;
4595 auto future = promise.getFuture();
4596 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::vector<::some::valid::ns::simpleTypeDef>>>(std::move(promise), recv_wrapped_listtypedef_ret_typedef_param, channel_);
4597 listtypedef_ret_typedef_param(rpcOptions, std::move(callback), p_param1);
4598 return future;
4599 }
4600
semifuture_listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::complexStructTypeDef & p_param1)4601 folly::SemiFuture<::std::vector<::some::valid::ns::simpleTypeDef>> ParamServiceAsyncClient::semifuture_listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4602 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_listtypedef_ret_typedef_param, channel_);
4603 auto callback = std::move(callbackAndFuture.first);
4604 listtypedef_ret_typedef_param(rpcOptions, std::move(callback), p_param1);
4605 return std::move(callbackAndFuture.second);
4606 }
4607
header_future_listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::complexStructTypeDef & p_param1)4608 folly::Future<std::pair<::std::vector<::some::valid::ns::simpleTypeDef>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4609 folly::Promise<std::pair<::std::vector<::some::valid::ns::simpleTypeDef>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4610 auto future = promise.getFuture();
4611 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::vector<::some::valid::ns::simpleTypeDef>>>(std::move(promise), recv_wrapped_listtypedef_ret_typedef_param, channel_);
4612 listtypedef_ret_typedef_param(rpcOptions, std::move(callback), p_param1);
4613 return future;
4614 }
4615
header_semifuture_listtypedef_ret_typedef_param(apache::thrift::RpcOptions & rpcOptions,const::some::valid::ns::complexStructTypeDef & p_param1)4616 folly::SemiFuture<std::pair<::std::vector<::some::valid::ns::simpleTypeDef>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_listtypedef_ret_typedef_param(apache::thrift::RpcOptions& rpcOptions, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4617 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_listtypedef_ret_typedef_param, channel_);
4618 auto callback = std::move(callbackAndFuture.first);
4619 listtypedef_ret_typedef_param(rpcOptions, std::move(callback), p_param1);
4620 return std::move(callbackAndFuture.second);
4621 }
4622
listtypedef_ret_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::some::valid::ns::complexStructTypeDef & p_param1)4623 void ParamServiceAsyncClient::listtypedef_ret_typedef_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::some::valid::ns::complexStructTypeDef& p_param1) {
4624 listtypedef_ret_typedef_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
4625 }
4626
4627 #if FOLLY_HAS_COROUTINES
4628 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef> & _return,::apache::thrift::ClientReceiveState & state)4629 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef>& _return, ::apache::thrift::ClientReceiveState& state) {
4630 if (state.isException()) {
4631 return std::move(state.exception());
4632 }
4633 if (!state.hasResponseBuffer()) {
4634 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
4635 }
4636
4637 using result = ParamService_listtypedef_ret_typedef_param_presult;
4638 switch (state.protocolId()) {
4639 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4640 {
4641 apache::thrift::BinaryProtocolReader reader;
4642 return apache::thrift::detail::ac::recv_wrapped<result>(
4643 &reader, state, _return);
4644 }
4645 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4646 {
4647 apache::thrift::CompactProtocolReader reader;
4648 return apache::thrift::detail::ac::recv_wrapped<result>(
4649 &reader, state, _return);
4650 }
4651 default:
4652 {
4653 }
4654 }
4655 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
4656 }
4657
recv_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef> & _return,::apache::thrift::ClientReceiveState & state)4658 void ParamServiceAsyncClient::recv_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef>& _return, ::apache::thrift::ClientReceiveState& state) {
4659 auto ew = recv_wrapped_listtypedef_ret_typedef_param(_return, state);
4660 if (ew) {
4661 ew.throw_exception();
4662 }
4663 }
4664
recv_instance_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef> & _return,::apache::thrift::ClientReceiveState & state)4665 void ParamServiceAsyncClient::recv_instance_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef>& _return, ::apache::thrift::ClientReceiveState& state) {
4666 return recv_listtypedef_ret_typedef_param(_return, state);
4667 }
4668
recv_instance_wrapped_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef> & _return,::apache::thrift::ClientReceiveState & state)4669 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_listtypedef_ret_typedef_param(::std::vector<::some::valid::ns::simpleTypeDef>& _return, ::apache::thrift::ClientReceiveState& state) {
4670 return recv_wrapped_listtypedef_ret_typedef_param(_return, state);
4671 }
4672
enum_ret_double_param(std::unique_ptr<apache::thrift::RequestCallback> callback,double p_param1)4673 void ParamServiceAsyncClient::enum_ret_double_param(std::unique_ptr<apache::thrift::RequestCallback> callback, double p_param1) {
4674 ::apache::thrift::RpcOptions rpcOptions;
4675 enum_ret_double_param(rpcOptions, std::move(callback), p_param1);
4676 }
4677
enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,double p_param1)4678 void ParamServiceAsyncClient::enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, double p_param1) {
4679 auto [ctx, header] = enum_ret_double_paramCtx(&rpcOptions);
4680 apache::thrift::RequestCallback::Context callbackContext;
4681 callbackContext.protocolId =
4682 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4683 auto* contextStack = ctx.get();
4684 if (callback) {
4685 callbackContext.ctx = std::move(ctx);
4686 }
4687 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
4688 enum_ret_double_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
4689 }
4690
enum_ret_double_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,double p_param1,bool stealRpcOptions)4691 void ParamServiceAsyncClient::enum_ret_double_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, double p_param1, bool stealRpcOptions) {
4692 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
4693 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4694 {
4695 apache::thrift::BinaryProtocolWriter writer;
4696 if (stealRpcOptions) {
4697 enum_ret_double_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4698 } else {
4699 enum_ret_double_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4700 }
4701 break;
4702 }
4703 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4704 {
4705 apache::thrift::CompactProtocolWriter writer;
4706 if (stealRpcOptions) {
4707 enum_ret_double_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
4708 } else {
4709 enum_ret_double_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
4710 }
4711 break;
4712 }
4713 default:
4714 {
4715 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
4716 }
4717 }
4718 }
4719
enum_ret_double_paramCtx(apache::thrift::RpcOptions * rpcOptions)4720 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::enum_ret_double_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
4721 auto header = std::make_shared<apache::thrift::transport::THeader>(
4722 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
4723 header->setProtocolId(channel_->getProtocolId());
4724 if (rpcOptions) {
4725 header->setHeaders(rpcOptions->releaseWriteHeaders());
4726 }
4727
4728 auto ctx = apache::thrift::ContextStack::createWithClientContext(
4729 handlers_,
4730 getServiceName(),
4731 "ParamService.enum_ret_double_param",
4732 *header);
4733
4734 return {std::move(ctx), std::move(header)};
4735 }
4736
sync_enum_ret_double_param(double p_param1)4737 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::sync_enum_ret_double_param(double p_param1) {
4738 ::apache::thrift::RpcOptions rpcOptions;
4739 return sync_enum_ret_double_param(rpcOptions, p_param1);
4740 }
4741
sync_enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,double p_param1)4742 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::sync_enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, double p_param1) {
4743 apache::thrift::ClientReceiveState returnState;
4744 apache::thrift::ClientSyncCallback<false> callback(&returnState);
4745 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4746 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
4747 auto ctxAndHeader = enum_ret_double_paramCtx(&rpcOptions);
4748 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
4749 callback.waitUntilDone(
4750 evb,
4751 [&] {
4752 enum_ret_double_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
4753 });
4754
4755 if (returnState.isException()) {
4756 returnState.exception().throw_exception();
4757 }
4758 returnState.resetProtocolId(protocolId);
4759 returnState.resetCtx(std::move(ctxAndHeader.first));
4760 SCOPE_EXIT {
4761 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4762 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4763 }
4764 };
4765 return folly::fibers::runInMainContext([&] {
4766 return recv_enum_ret_double_param(returnState);
4767 });
4768 }
4769
4770
future_enum_ret_double_param(double p_param1)4771 folly::Future<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::future_enum_ret_double_param(double p_param1) {
4772 ::apache::thrift::RpcOptions rpcOptions;
4773 return future_enum_ret_double_param(rpcOptions, p_param1);
4774 }
4775
semifuture_enum_ret_double_param(double p_param1)4776 folly::SemiFuture<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::semifuture_enum_ret_double_param(double p_param1) {
4777 ::apache::thrift::RpcOptions rpcOptions;
4778 return semifuture_enum_ret_double_param(rpcOptions, p_param1);
4779 }
4780
future_enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,double p_param1)4781 folly::Future<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::future_enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, double p_param1) {
4782 folly::Promise<::some::valid::ns::MyEnumA> promise;
4783 auto future = promise.getFuture();
4784 auto callback = std::make_unique<apache::thrift::FutureCallback<::some::valid::ns::MyEnumA>>(std::move(promise), recv_wrapped_enum_ret_double_param, channel_);
4785 enum_ret_double_param(rpcOptions, std::move(callback), p_param1);
4786 return future;
4787 }
4788
semifuture_enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,double p_param1)4789 folly::SemiFuture<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::semifuture_enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, double p_param1) {
4790 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_enum_ret_double_param, channel_);
4791 auto callback = std::move(callbackAndFuture.first);
4792 enum_ret_double_param(rpcOptions, std::move(callback), p_param1);
4793 return std::move(callbackAndFuture.second);
4794 }
4795
header_future_enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,double p_param1)4796 folly::Future<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, double p_param1) {
4797 folly::Promise<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4798 auto future = promise.getFuture();
4799 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::some::valid::ns::MyEnumA>>(std::move(promise), recv_wrapped_enum_ret_double_param, channel_);
4800 enum_ret_double_param(rpcOptions, std::move(callback), p_param1);
4801 return future;
4802 }
4803
header_semifuture_enum_ret_double_param(apache::thrift::RpcOptions & rpcOptions,double p_param1)4804 folly::SemiFuture<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_enum_ret_double_param(apache::thrift::RpcOptions& rpcOptions, double p_param1) {
4805 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_enum_ret_double_param, channel_);
4806 auto callback = std::move(callbackAndFuture.first);
4807 enum_ret_double_param(rpcOptions, std::move(callback), p_param1);
4808 return std::move(callbackAndFuture.second);
4809 }
4810
enum_ret_double_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,double p_param1)4811 void ParamServiceAsyncClient::enum_ret_double_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, double p_param1) {
4812 enum_ret_double_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
4813 }
4814
4815 #if FOLLY_HAS_COROUTINES
4816 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_enum_ret_double_param(::some::valid::ns::MyEnumA & _return,::apache::thrift::ClientReceiveState & state)4817 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_enum_ret_double_param(::some::valid::ns::MyEnumA& _return, ::apache::thrift::ClientReceiveState& state) {
4818 if (state.isException()) {
4819 return std::move(state.exception());
4820 }
4821 if (!state.hasResponseBuffer()) {
4822 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
4823 }
4824
4825 using result = ParamService_enum_ret_double_param_presult;
4826 switch (state.protocolId()) {
4827 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4828 {
4829 apache::thrift::BinaryProtocolReader reader;
4830 return apache::thrift::detail::ac::recv_wrapped<result>(
4831 &reader, state, _return);
4832 }
4833 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4834 {
4835 apache::thrift::CompactProtocolReader reader;
4836 return apache::thrift::detail::ac::recv_wrapped<result>(
4837 &reader, state, _return);
4838 }
4839 default:
4840 {
4841 }
4842 }
4843 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
4844 }
4845
recv_enum_ret_double_param(::apache::thrift::ClientReceiveState & state)4846 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::recv_enum_ret_double_param(::apache::thrift::ClientReceiveState& state) {
4847 ::some::valid::ns::MyEnumA _return;
4848 auto ew = recv_wrapped_enum_ret_double_param(_return, state);
4849 if (ew) {
4850 ew.throw_exception();
4851 }
4852 return _return;
4853 }
4854
recv_instance_enum_ret_double_param(::apache::thrift::ClientReceiveState & state)4855 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::recv_instance_enum_ret_double_param(::apache::thrift::ClientReceiveState& state) {
4856 return recv_enum_ret_double_param(state);
4857 }
4858
recv_instance_wrapped_enum_ret_double_param(::some::valid::ns::MyEnumA & _return,::apache::thrift::ClientReceiveState & state)4859 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_enum_ret_double_param(::some::valid::ns::MyEnumA& _return, ::apache::thrift::ClientReceiveState& state) {
4860 return recv_wrapped_enum_ret_double_param(_return, state);
4861 }
4862
enum_ret_double_enum_param(std::unique_ptr<apache::thrift::RequestCallback> callback,double p_param1,::some::valid::ns::MyEnumA p_param2)4863 void ParamServiceAsyncClient::enum_ret_double_enum_param(std::unique_ptr<apache::thrift::RequestCallback> callback, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4864 ::apache::thrift::RpcOptions rpcOptions;
4865 enum_ret_double_enum_param(rpcOptions, std::move(callback), p_param1, p_param2);
4866 }
4867
enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,double p_param1,::some::valid::ns::MyEnumA p_param2)4868 void ParamServiceAsyncClient::enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4869 auto [ctx, header] = enum_ret_double_enum_paramCtx(&rpcOptions);
4870 apache::thrift::RequestCallback::Context callbackContext;
4871 callbackContext.protocolId =
4872 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4873 auto* contextStack = ctx.get();
4874 if (callback) {
4875 callbackContext.ctx = std::move(ctx);
4876 }
4877 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
4878 enum_ret_double_enum_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
4879 }
4880
enum_ret_double_enum_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,double p_param1,::some::valid::ns::MyEnumA p_param2,bool stealRpcOptions)4881 void ParamServiceAsyncClient::enum_ret_double_enum_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, double p_param1, ::some::valid::ns::MyEnumA p_param2, bool stealRpcOptions) {
4882 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
4883 case apache::thrift::protocol::T_BINARY_PROTOCOL:
4884 {
4885 apache::thrift::BinaryProtocolWriter writer;
4886 if (stealRpcOptions) {
4887 enum_ret_double_enum_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
4888 } else {
4889 enum_ret_double_enum_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
4890 }
4891 break;
4892 }
4893 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
4894 {
4895 apache::thrift::CompactProtocolWriter writer;
4896 if (stealRpcOptions) {
4897 enum_ret_double_enum_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
4898 } else {
4899 enum_ret_double_enum_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
4900 }
4901 break;
4902 }
4903 default:
4904 {
4905 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
4906 }
4907 }
4908 }
4909
enum_ret_double_enum_paramCtx(apache::thrift::RpcOptions * rpcOptions)4910 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::enum_ret_double_enum_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
4911 auto header = std::make_shared<apache::thrift::transport::THeader>(
4912 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
4913 header->setProtocolId(channel_->getProtocolId());
4914 if (rpcOptions) {
4915 header->setHeaders(rpcOptions->releaseWriteHeaders());
4916 }
4917
4918 auto ctx = apache::thrift::ContextStack::createWithClientContext(
4919 handlers_,
4920 getServiceName(),
4921 "ParamService.enum_ret_double_enum_param",
4922 *header);
4923
4924 return {std::move(ctx), std::move(header)};
4925 }
4926
sync_enum_ret_double_enum_param(double p_param1,::some::valid::ns::MyEnumA p_param2)4927 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::sync_enum_ret_double_enum_param(double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4928 ::apache::thrift::RpcOptions rpcOptions;
4929 return sync_enum_ret_double_enum_param(rpcOptions, p_param1, p_param2);
4930 }
4931
sync_enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,double p_param1,::some::valid::ns::MyEnumA p_param2)4932 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::sync_enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4933 apache::thrift::ClientReceiveState returnState;
4934 apache::thrift::ClientSyncCallback<false> callback(&returnState);
4935 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
4936 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
4937 auto ctxAndHeader = enum_ret_double_enum_paramCtx(&rpcOptions);
4938 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
4939 callback.waitUntilDone(
4940 evb,
4941 [&] {
4942 enum_ret_double_enum_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
4943 });
4944
4945 if (returnState.isException()) {
4946 returnState.exception().throw_exception();
4947 }
4948 returnState.resetProtocolId(protocolId);
4949 returnState.resetCtx(std::move(ctxAndHeader.first));
4950 SCOPE_EXIT {
4951 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
4952 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
4953 }
4954 };
4955 return folly::fibers::runInMainContext([&] {
4956 return recv_enum_ret_double_enum_param(returnState);
4957 });
4958 }
4959
4960
future_enum_ret_double_enum_param(double p_param1,::some::valid::ns::MyEnumA p_param2)4961 folly::Future<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::future_enum_ret_double_enum_param(double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4962 ::apache::thrift::RpcOptions rpcOptions;
4963 return future_enum_ret_double_enum_param(rpcOptions, p_param1, p_param2);
4964 }
4965
semifuture_enum_ret_double_enum_param(double p_param1,::some::valid::ns::MyEnumA p_param2)4966 folly::SemiFuture<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::semifuture_enum_ret_double_enum_param(double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4967 ::apache::thrift::RpcOptions rpcOptions;
4968 return semifuture_enum_ret_double_enum_param(rpcOptions, p_param1, p_param2);
4969 }
4970
future_enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,double p_param1,::some::valid::ns::MyEnumA p_param2)4971 folly::Future<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::future_enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4972 folly::Promise<::some::valid::ns::MyEnumA> promise;
4973 auto future = promise.getFuture();
4974 auto callback = std::make_unique<apache::thrift::FutureCallback<::some::valid::ns::MyEnumA>>(std::move(promise), recv_wrapped_enum_ret_double_enum_param, channel_);
4975 enum_ret_double_enum_param(rpcOptions, std::move(callback), p_param1, p_param2);
4976 return future;
4977 }
4978
semifuture_enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,double p_param1,::some::valid::ns::MyEnumA p_param2)4979 folly::SemiFuture<::some::valid::ns::MyEnumA> ParamServiceAsyncClient::semifuture_enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4980 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_enum_ret_double_enum_param, channel_);
4981 auto callback = std::move(callbackAndFuture.first);
4982 enum_ret_double_enum_param(rpcOptions, std::move(callback), p_param1, p_param2);
4983 return std::move(callbackAndFuture.second);
4984 }
4985
header_future_enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,double p_param1,::some::valid::ns::MyEnumA p_param2)4986 folly::Future<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4987 folly::Promise<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
4988 auto future = promise.getFuture();
4989 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::some::valid::ns::MyEnumA>>(std::move(promise), recv_wrapped_enum_ret_double_enum_param, channel_);
4990 enum_ret_double_enum_param(rpcOptions, std::move(callback), p_param1, p_param2);
4991 return future;
4992 }
4993
header_semifuture_enum_ret_double_enum_param(apache::thrift::RpcOptions & rpcOptions,double p_param1,::some::valid::ns::MyEnumA p_param2)4994 folly::SemiFuture<std::pair<::some::valid::ns::MyEnumA, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_enum_ret_double_enum_param(apache::thrift::RpcOptions& rpcOptions, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
4995 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_enum_ret_double_enum_param, channel_);
4996 auto callback = std::move(callbackAndFuture.first);
4997 enum_ret_double_enum_param(rpcOptions, std::move(callback), p_param1, p_param2);
4998 return std::move(callbackAndFuture.second);
4999 }
5000
enum_ret_double_enum_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,double p_param1,::some::valid::ns::MyEnumA p_param2)5001 void ParamServiceAsyncClient::enum_ret_double_enum_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, double p_param1, ::some::valid::ns::MyEnumA p_param2) {
5002 enum_ret_double_enum_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
5003 }
5004
5005 #if FOLLY_HAS_COROUTINES
5006 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_enum_ret_double_enum_param(::some::valid::ns::MyEnumA & _return,::apache::thrift::ClientReceiveState & state)5007 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_enum_ret_double_enum_param(::some::valid::ns::MyEnumA& _return, ::apache::thrift::ClientReceiveState& state) {
5008 if (state.isException()) {
5009 return std::move(state.exception());
5010 }
5011 if (!state.hasResponseBuffer()) {
5012 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5013 }
5014
5015 using result = ParamService_enum_ret_double_enum_param_presult;
5016 switch (state.protocolId()) {
5017 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5018 {
5019 apache::thrift::BinaryProtocolReader reader;
5020 return apache::thrift::detail::ac::recv_wrapped<result>(
5021 &reader, state, _return);
5022 }
5023 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5024 {
5025 apache::thrift::CompactProtocolReader reader;
5026 return apache::thrift::detail::ac::recv_wrapped<result>(
5027 &reader, state, _return);
5028 }
5029 default:
5030 {
5031 }
5032 }
5033 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5034 }
5035
recv_enum_ret_double_enum_param(::apache::thrift::ClientReceiveState & state)5036 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::recv_enum_ret_double_enum_param(::apache::thrift::ClientReceiveState& state) {
5037 ::some::valid::ns::MyEnumA _return;
5038 auto ew = recv_wrapped_enum_ret_double_enum_param(_return, state);
5039 if (ew) {
5040 ew.throw_exception();
5041 }
5042 return _return;
5043 }
5044
recv_instance_enum_ret_double_enum_param(::apache::thrift::ClientReceiveState & state)5045 ::some::valid::ns::MyEnumA ParamServiceAsyncClient::recv_instance_enum_ret_double_enum_param(::apache::thrift::ClientReceiveState& state) {
5046 return recv_enum_ret_double_enum_param(state);
5047 }
5048
recv_instance_wrapped_enum_ret_double_enum_param(::some::valid::ns::MyEnumA & _return,::apache::thrift::ClientReceiveState & state)5049 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_enum_ret_double_enum_param(::some::valid::ns::MyEnumA& _return, ::apache::thrift::ClientReceiveState& state) {
5050 return recv_wrapped_enum_ret_double_enum_param(_return, state);
5051 }
5052
listenum_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)5053 void ParamServiceAsyncClient::listenum_ret_map_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5054 ::apache::thrift::RpcOptions rpcOptions;
5055 listenum_ret_map_param(rpcOptions, std::move(callback), p_param1);
5056 }
5057
listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::map<::std::string,::std::int64_t> & p_param1)5058 void ParamServiceAsyncClient::listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5059 auto [ctx, header] = listenum_ret_map_paramCtx(&rpcOptions);
5060 apache::thrift::RequestCallback::Context callbackContext;
5061 callbackContext.protocolId =
5062 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5063 auto* contextStack = ctx.get();
5064 if (callback) {
5065 callbackContext.ctx = std::move(ctx);
5066 }
5067 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
5068 listenum_ret_map_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
5069 }
5070
listenum_ret_map_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::map<::std::string,::std::int64_t> & p_param1,bool stealRpcOptions)5071 void ParamServiceAsyncClient::listenum_ret_map_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::map<::std::string, ::std::int64_t>& p_param1, bool stealRpcOptions) {
5072 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
5073 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5074 {
5075 apache::thrift::BinaryProtocolWriter writer;
5076 if (stealRpcOptions) {
5077 listenum_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5078 } else {
5079 listenum_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5080 }
5081 break;
5082 }
5083 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5084 {
5085 apache::thrift::CompactProtocolWriter writer;
5086 if (stealRpcOptions) {
5087 listenum_ret_map_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5088 } else {
5089 listenum_ret_map_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5090 }
5091 break;
5092 }
5093 default:
5094 {
5095 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
5096 }
5097 }
5098 }
5099
listenum_ret_map_paramCtx(apache::thrift::RpcOptions * rpcOptions)5100 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::listenum_ret_map_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
5101 auto header = std::make_shared<apache::thrift::transport::THeader>(
5102 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
5103 header->setProtocolId(channel_->getProtocolId());
5104 if (rpcOptions) {
5105 header->setHeaders(rpcOptions->releaseWriteHeaders());
5106 }
5107
5108 auto ctx = apache::thrift::ContextStack::createWithClientContext(
5109 handlers_,
5110 getServiceName(),
5111 "ParamService.listenum_ret_map_param",
5112 *header);
5113
5114 return {std::move(ctx), std::move(header)};
5115 }
5116
sync_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA> & _return,const::std::map<::std::string,::std::int64_t> & p_param1)5117 void ParamServiceAsyncClient::sync_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA>& _return, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5118 ::apache::thrift::RpcOptions rpcOptions;
5119 sync_listenum_ret_map_param(rpcOptions, _return, p_param1);
5120 }
5121
sync_listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,::std::vector<::some::valid::ns::MyEnumA> & _return,const::std::map<::std::string,::std::int64_t> & p_param1)5122 void ParamServiceAsyncClient::sync_listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::some::valid::ns::MyEnumA>& _return, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5123 apache::thrift::ClientReceiveState returnState;
5124 apache::thrift::ClientSyncCallback<false> callback(&returnState);
5125 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5126 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
5127 auto ctxAndHeader = listenum_ret_map_paramCtx(&rpcOptions);
5128 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
5129 callback.waitUntilDone(
5130 evb,
5131 [&] {
5132 listenum_ret_map_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
5133 });
5134
5135 if (returnState.isException()) {
5136 returnState.exception().throw_exception();
5137 }
5138 returnState.resetProtocolId(protocolId);
5139 returnState.resetCtx(std::move(ctxAndHeader.first));
5140 SCOPE_EXIT {
5141 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
5142 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
5143 }
5144 };
5145 return folly::fibers::runInMainContext([&] {
5146 recv_listenum_ret_map_param(_return, returnState);
5147 });
5148 }
5149
5150
future_listenum_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)5151 folly::Future<::std::vector<::some::valid::ns::MyEnumA>> ParamServiceAsyncClient::future_listenum_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5152 ::apache::thrift::RpcOptions rpcOptions;
5153 return future_listenum_ret_map_param(rpcOptions, p_param1);
5154 }
5155
semifuture_listenum_ret_map_param(const::std::map<::std::string,::std::int64_t> & p_param1)5156 folly::SemiFuture<::std::vector<::some::valid::ns::MyEnumA>> ParamServiceAsyncClient::semifuture_listenum_ret_map_param(const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5157 ::apache::thrift::RpcOptions rpcOptions;
5158 return semifuture_listenum_ret_map_param(rpcOptions, p_param1);
5159 }
5160
future_listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)5161 folly::Future<::std::vector<::some::valid::ns::MyEnumA>> ParamServiceAsyncClient::future_listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5162 folly::Promise<::std::vector<::some::valid::ns::MyEnumA>> promise;
5163 auto future = promise.getFuture();
5164 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::vector<::some::valid::ns::MyEnumA>>>(std::move(promise), recv_wrapped_listenum_ret_map_param, channel_);
5165 listenum_ret_map_param(rpcOptions, std::move(callback), p_param1);
5166 return future;
5167 }
5168
semifuture_listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)5169 folly::SemiFuture<::std::vector<::some::valid::ns::MyEnumA>> ParamServiceAsyncClient::semifuture_listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5170 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_listenum_ret_map_param, channel_);
5171 auto callback = std::move(callbackAndFuture.first);
5172 listenum_ret_map_param(rpcOptions, std::move(callback), p_param1);
5173 return std::move(callbackAndFuture.second);
5174 }
5175
header_future_listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)5176 folly::Future<std::pair<::std::vector<::some::valid::ns::MyEnumA>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5177 folly::Promise<std::pair<::std::vector<::some::valid::ns::MyEnumA>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
5178 auto future = promise.getFuture();
5179 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::vector<::some::valid::ns::MyEnumA>>>(std::move(promise), recv_wrapped_listenum_ret_map_param, channel_);
5180 listenum_ret_map_param(rpcOptions, std::move(callback), p_param1);
5181 return future;
5182 }
5183
header_semifuture_listenum_ret_map_param(apache::thrift::RpcOptions & rpcOptions,const::std::map<::std::string,::std::int64_t> & p_param1)5184 folly::SemiFuture<std::pair<::std::vector<::some::valid::ns::MyEnumA>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_listenum_ret_map_param(apache::thrift::RpcOptions& rpcOptions, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5185 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_listenum_ret_map_param, channel_);
5186 auto callback = std::move(callbackAndFuture.first);
5187 listenum_ret_map_param(rpcOptions, std::move(callback), p_param1);
5188 return std::move(callbackAndFuture.second);
5189 }
5190
listenum_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::map<::std::string,::std::int64_t> & p_param1)5191 void ParamServiceAsyncClient::listenum_ret_map_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::map<::std::string, ::std::int64_t>& p_param1) {
5192 listenum_ret_map_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
5193 }
5194
5195 #if FOLLY_HAS_COROUTINES
5196 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA> & _return,::apache::thrift::ClientReceiveState & state)5197 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA>& _return, ::apache::thrift::ClientReceiveState& state) {
5198 if (state.isException()) {
5199 return std::move(state.exception());
5200 }
5201 if (!state.hasResponseBuffer()) {
5202 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5203 }
5204
5205 using result = ParamService_listenum_ret_map_param_presult;
5206 switch (state.protocolId()) {
5207 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5208 {
5209 apache::thrift::BinaryProtocolReader reader;
5210 return apache::thrift::detail::ac::recv_wrapped<result>(
5211 &reader, state, _return);
5212 }
5213 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5214 {
5215 apache::thrift::CompactProtocolReader reader;
5216 return apache::thrift::detail::ac::recv_wrapped<result>(
5217 &reader, state, _return);
5218 }
5219 default:
5220 {
5221 }
5222 }
5223 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5224 }
5225
recv_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA> & _return,::apache::thrift::ClientReceiveState & state)5226 void ParamServiceAsyncClient::recv_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA>& _return, ::apache::thrift::ClientReceiveState& state) {
5227 auto ew = recv_wrapped_listenum_ret_map_param(_return, state);
5228 if (ew) {
5229 ew.throw_exception();
5230 }
5231 }
5232
recv_instance_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA> & _return,::apache::thrift::ClientReceiveState & state)5233 void ParamServiceAsyncClient::recv_instance_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA>& _return, ::apache::thrift::ClientReceiveState& state) {
5234 return recv_listenum_ret_map_param(_return, state);
5235 }
5236
recv_instance_wrapped_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA> & _return,::apache::thrift::ClientReceiveState & state)5237 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_listenum_ret_map_param(::std::vector<::some::valid::ns::MyEnumA>& _return, ::apache::thrift::ClientReceiveState& state) {
5238 return recv_wrapped_listenum_ret_map_param(_return, state);
5239 }
5240
struct_ret_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int16_t p_param1)5241 void ParamServiceAsyncClient::struct_ret_i16_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int16_t p_param1) {
5242 ::apache::thrift::RpcOptions rpcOptions;
5243 struct_ret_i16_param(rpcOptions, std::move(callback), p_param1);
5244 }
5245
struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int16_t p_param1)5246 void ParamServiceAsyncClient::struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int16_t p_param1) {
5247 auto [ctx, header] = struct_ret_i16_paramCtx(&rpcOptions);
5248 apache::thrift::RequestCallback::Context callbackContext;
5249 callbackContext.protocolId =
5250 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5251 auto* contextStack = ctx.get();
5252 if (callback) {
5253 callbackContext.ctx = std::move(ctx);
5254 }
5255 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
5256 struct_ret_i16_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
5257 }
5258
struct_ret_i16_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int16_t p_param1,bool stealRpcOptions)5259 void ParamServiceAsyncClient::struct_ret_i16_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int16_t p_param1, bool stealRpcOptions) {
5260 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
5261 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5262 {
5263 apache::thrift::BinaryProtocolWriter writer;
5264 if (stealRpcOptions) {
5265 struct_ret_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5266 } else {
5267 struct_ret_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5268 }
5269 break;
5270 }
5271 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5272 {
5273 apache::thrift::CompactProtocolWriter writer;
5274 if (stealRpcOptions) {
5275 struct_ret_i16_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5276 } else {
5277 struct_ret_i16_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5278 }
5279 break;
5280 }
5281 default:
5282 {
5283 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
5284 }
5285 }
5286 }
5287
struct_ret_i16_paramCtx(apache::thrift::RpcOptions * rpcOptions)5288 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::struct_ret_i16_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
5289 auto header = std::make_shared<apache::thrift::transport::THeader>(
5290 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
5291 header->setProtocolId(channel_->getProtocolId());
5292 if (rpcOptions) {
5293 header->setHeaders(rpcOptions->releaseWriteHeaders());
5294 }
5295
5296 auto ctx = apache::thrift::ContextStack::createWithClientContext(
5297 handlers_,
5298 getServiceName(),
5299 "ParamService.struct_ret_i16_param",
5300 *header);
5301
5302 return {std::move(ctx), std::move(header)};
5303 }
5304
sync_struct_ret_i16_param(::some::valid::ns::MyStruct & _return,::std::int16_t p_param1)5305 void ParamServiceAsyncClient::sync_struct_ret_i16_param(::some::valid::ns::MyStruct& _return, ::std::int16_t p_param1) {
5306 ::apache::thrift::RpcOptions rpcOptions;
5307 sync_struct_ret_i16_param(rpcOptions, _return, p_param1);
5308 }
5309
sync_struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::MyStruct & _return,::std::int16_t p_param1)5310 void ParamServiceAsyncClient::sync_struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::MyStruct& _return, ::std::int16_t p_param1) {
5311 apache::thrift::ClientReceiveState returnState;
5312 apache::thrift::ClientSyncCallback<false> callback(&returnState);
5313 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5314 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
5315 auto ctxAndHeader = struct_ret_i16_paramCtx(&rpcOptions);
5316 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
5317 callback.waitUntilDone(
5318 evb,
5319 [&] {
5320 struct_ret_i16_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
5321 });
5322
5323 if (returnState.isException()) {
5324 returnState.exception().throw_exception();
5325 }
5326 returnState.resetProtocolId(protocolId);
5327 returnState.resetCtx(std::move(ctxAndHeader.first));
5328 SCOPE_EXIT {
5329 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
5330 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
5331 }
5332 };
5333 return folly::fibers::runInMainContext([&] {
5334 recv_struct_ret_i16_param(_return, returnState);
5335 });
5336 }
5337
5338
future_struct_ret_i16_param(::std::int16_t p_param1)5339 folly::Future<::some::valid::ns::MyStruct> ParamServiceAsyncClient::future_struct_ret_i16_param(::std::int16_t p_param1) {
5340 ::apache::thrift::RpcOptions rpcOptions;
5341 return future_struct_ret_i16_param(rpcOptions, p_param1);
5342 }
5343
semifuture_struct_ret_i16_param(::std::int16_t p_param1)5344 folly::SemiFuture<::some::valid::ns::MyStruct> ParamServiceAsyncClient::semifuture_struct_ret_i16_param(::std::int16_t p_param1) {
5345 ::apache::thrift::RpcOptions rpcOptions;
5346 return semifuture_struct_ret_i16_param(rpcOptions, p_param1);
5347 }
5348
future_struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)5349 folly::Future<::some::valid::ns::MyStruct> ParamServiceAsyncClient::future_struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
5350 folly::Promise<::some::valid::ns::MyStruct> promise;
5351 auto future = promise.getFuture();
5352 auto callback = std::make_unique<apache::thrift::FutureCallback<::some::valid::ns::MyStruct>>(std::move(promise), recv_wrapped_struct_ret_i16_param, channel_);
5353 struct_ret_i16_param(rpcOptions, std::move(callback), p_param1);
5354 return future;
5355 }
5356
semifuture_struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)5357 folly::SemiFuture<::some::valid::ns::MyStruct> ParamServiceAsyncClient::semifuture_struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
5358 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_struct_ret_i16_param, channel_);
5359 auto callback = std::move(callbackAndFuture.first);
5360 struct_ret_i16_param(rpcOptions, std::move(callback), p_param1);
5361 return std::move(callbackAndFuture.second);
5362 }
5363
header_future_struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)5364 folly::Future<std::pair<::some::valid::ns::MyStruct, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
5365 folly::Promise<std::pair<::some::valid::ns::MyStruct, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
5366 auto future = promise.getFuture();
5367 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::some::valid::ns::MyStruct>>(std::move(promise), recv_wrapped_struct_ret_i16_param, channel_);
5368 struct_ret_i16_param(rpcOptions, std::move(callback), p_param1);
5369 return future;
5370 }
5371
header_semifuture_struct_ret_i16_param(apache::thrift::RpcOptions & rpcOptions,::std::int16_t p_param1)5372 folly::SemiFuture<std::pair<::some::valid::ns::MyStruct, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_struct_ret_i16_param(apache::thrift::RpcOptions& rpcOptions, ::std::int16_t p_param1) {
5373 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_struct_ret_i16_param, channel_);
5374 auto callback = std::move(callbackAndFuture.first);
5375 struct_ret_i16_param(rpcOptions, std::move(callback), p_param1);
5376 return std::move(callbackAndFuture.second);
5377 }
5378
struct_ret_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int16_t p_param1)5379 void ParamServiceAsyncClient::struct_ret_i16_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int16_t p_param1) {
5380 struct_ret_i16_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
5381 }
5382
5383 #if FOLLY_HAS_COROUTINES
5384 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_struct_ret_i16_param(::some::valid::ns::MyStruct & _return,::apache::thrift::ClientReceiveState & state)5385 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_struct_ret_i16_param(::some::valid::ns::MyStruct& _return, ::apache::thrift::ClientReceiveState& state) {
5386 if (state.isException()) {
5387 return std::move(state.exception());
5388 }
5389 if (!state.hasResponseBuffer()) {
5390 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5391 }
5392
5393 using result = ParamService_struct_ret_i16_param_presult;
5394 switch (state.protocolId()) {
5395 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5396 {
5397 apache::thrift::BinaryProtocolReader reader;
5398 return apache::thrift::detail::ac::recv_wrapped<result>(
5399 &reader, state, _return);
5400 }
5401 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5402 {
5403 apache::thrift::CompactProtocolReader reader;
5404 return apache::thrift::detail::ac::recv_wrapped<result>(
5405 &reader, state, _return);
5406 }
5407 default:
5408 {
5409 }
5410 }
5411 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5412 }
5413
recv_struct_ret_i16_param(::some::valid::ns::MyStruct & _return,::apache::thrift::ClientReceiveState & state)5414 void ParamServiceAsyncClient::recv_struct_ret_i16_param(::some::valid::ns::MyStruct& _return, ::apache::thrift::ClientReceiveState& state) {
5415 auto ew = recv_wrapped_struct_ret_i16_param(_return, state);
5416 if (ew) {
5417 ew.throw_exception();
5418 }
5419 }
5420
recv_instance_struct_ret_i16_param(::some::valid::ns::MyStruct & _return,::apache::thrift::ClientReceiveState & state)5421 void ParamServiceAsyncClient::recv_instance_struct_ret_i16_param(::some::valid::ns::MyStruct& _return, ::apache::thrift::ClientReceiveState& state) {
5422 return recv_struct_ret_i16_param(_return, state);
5423 }
5424
recv_instance_wrapped_struct_ret_i16_param(::some::valid::ns::MyStruct & _return,::apache::thrift::ClientReceiveState & state)5425 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_struct_ret_i16_param(::some::valid::ns::MyStruct& _return, ::apache::thrift::ClientReceiveState& state) {
5426 return recv_wrapped_struct_ret_i16_param(_return, state);
5427 }
5428
setstruct_ret_set_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::set<::std::string> & p_param1)5429 void ParamServiceAsyncClient::setstruct_ret_set_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::set<::std::string>& p_param1) {
5430 ::apache::thrift::RpcOptions rpcOptions;
5431 setstruct_ret_set_param(rpcOptions, std::move(callback), p_param1);
5432 }
5433
setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::set<::std::string> & p_param1)5434 void ParamServiceAsyncClient::setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::set<::std::string>& p_param1) {
5435 auto [ctx, header] = setstruct_ret_set_paramCtx(&rpcOptions);
5436 apache::thrift::RequestCallback::Context callbackContext;
5437 callbackContext.protocolId =
5438 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5439 auto* contextStack = ctx.get();
5440 if (callback) {
5441 callbackContext.ctx = std::move(ctx);
5442 }
5443 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
5444 setstruct_ret_set_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
5445 }
5446
setstruct_ret_set_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::set<::std::string> & p_param1,bool stealRpcOptions)5447 void ParamServiceAsyncClient::setstruct_ret_set_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::set<::std::string>& p_param1, bool stealRpcOptions) {
5448 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
5449 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5450 {
5451 apache::thrift::BinaryProtocolWriter writer;
5452 if (stealRpcOptions) {
5453 setstruct_ret_set_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5454 } else {
5455 setstruct_ret_set_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5456 }
5457 break;
5458 }
5459 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5460 {
5461 apache::thrift::CompactProtocolWriter writer;
5462 if (stealRpcOptions) {
5463 setstruct_ret_set_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5464 } else {
5465 setstruct_ret_set_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5466 }
5467 break;
5468 }
5469 default:
5470 {
5471 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
5472 }
5473 }
5474 }
5475
setstruct_ret_set_paramCtx(apache::thrift::RpcOptions * rpcOptions)5476 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::setstruct_ret_set_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
5477 auto header = std::make_shared<apache::thrift::transport::THeader>(
5478 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
5479 header->setProtocolId(channel_->getProtocolId());
5480 if (rpcOptions) {
5481 header->setHeaders(rpcOptions->releaseWriteHeaders());
5482 }
5483
5484 auto ctx = apache::thrift::ContextStack::createWithClientContext(
5485 handlers_,
5486 getServiceName(),
5487 "ParamService.setstruct_ret_set_param",
5488 *header);
5489
5490 return {std::move(ctx), std::move(header)};
5491 }
5492
sync_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct> & _return,const::std::set<::std::string> & p_param1)5493 void ParamServiceAsyncClient::sync_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct>& _return, const ::std::set<::std::string>& p_param1) {
5494 ::apache::thrift::RpcOptions rpcOptions;
5495 sync_setstruct_ret_set_param(rpcOptions, _return, p_param1);
5496 }
5497
sync_setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,::std::set<::some::valid::ns::MyStruct> & _return,const::std::set<::std::string> & p_param1)5498 void ParamServiceAsyncClient::sync_setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, ::std::set<::some::valid::ns::MyStruct>& _return, const ::std::set<::std::string>& p_param1) {
5499 apache::thrift::ClientReceiveState returnState;
5500 apache::thrift::ClientSyncCallback<false> callback(&returnState);
5501 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5502 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
5503 auto ctxAndHeader = setstruct_ret_set_paramCtx(&rpcOptions);
5504 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
5505 callback.waitUntilDone(
5506 evb,
5507 [&] {
5508 setstruct_ret_set_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
5509 });
5510
5511 if (returnState.isException()) {
5512 returnState.exception().throw_exception();
5513 }
5514 returnState.resetProtocolId(protocolId);
5515 returnState.resetCtx(std::move(ctxAndHeader.first));
5516 SCOPE_EXIT {
5517 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
5518 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
5519 }
5520 };
5521 return folly::fibers::runInMainContext([&] {
5522 recv_setstruct_ret_set_param(_return, returnState);
5523 });
5524 }
5525
5526
future_setstruct_ret_set_param(const::std::set<::std::string> & p_param1)5527 folly::Future<::std::set<::some::valid::ns::MyStruct>> ParamServiceAsyncClient::future_setstruct_ret_set_param(const ::std::set<::std::string>& p_param1) {
5528 ::apache::thrift::RpcOptions rpcOptions;
5529 return future_setstruct_ret_set_param(rpcOptions, p_param1);
5530 }
5531
semifuture_setstruct_ret_set_param(const::std::set<::std::string> & p_param1)5532 folly::SemiFuture<::std::set<::some::valid::ns::MyStruct>> ParamServiceAsyncClient::semifuture_setstruct_ret_set_param(const ::std::set<::std::string>& p_param1) {
5533 ::apache::thrift::RpcOptions rpcOptions;
5534 return semifuture_setstruct_ret_set_param(rpcOptions, p_param1);
5535 }
5536
future_setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::std::string> & p_param1)5537 folly::Future<::std::set<::some::valid::ns::MyStruct>> ParamServiceAsyncClient::future_setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_param1) {
5538 folly::Promise<::std::set<::some::valid::ns::MyStruct>> promise;
5539 auto future = promise.getFuture();
5540 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::set<::some::valid::ns::MyStruct>>>(std::move(promise), recv_wrapped_setstruct_ret_set_param, channel_);
5541 setstruct_ret_set_param(rpcOptions, std::move(callback), p_param1);
5542 return future;
5543 }
5544
semifuture_setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::std::string> & p_param1)5545 folly::SemiFuture<::std::set<::some::valid::ns::MyStruct>> ParamServiceAsyncClient::semifuture_setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_param1) {
5546 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_setstruct_ret_set_param, channel_);
5547 auto callback = std::move(callbackAndFuture.first);
5548 setstruct_ret_set_param(rpcOptions, std::move(callback), p_param1);
5549 return std::move(callbackAndFuture.second);
5550 }
5551
header_future_setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::std::string> & p_param1)5552 folly::Future<std::pair<::std::set<::some::valid::ns::MyStruct>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_param1) {
5553 folly::Promise<std::pair<::std::set<::some::valid::ns::MyStruct>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
5554 auto future = promise.getFuture();
5555 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::set<::some::valid::ns::MyStruct>>>(std::move(promise), recv_wrapped_setstruct_ret_set_param, channel_);
5556 setstruct_ret_set_param(rpcOptions, std::move(callback), p_param1);
5557 return future;
5558 }
5559
header_semifuture_setstruct_ret_set_param(apache::thrift::RpcOptions & rpcOptions,const::std::set<::std::string> & p_param1)5560 folly::SemiFuture<std::pair<::std::set<::some::valid::ns::MyStruct>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_setstruct_ret_set_param(apache::thrift::RpcOptions& rpcOptions, const ::std::set<::std::string>& p_param1) {
5561 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_setstruct_ret_set_param, channel_);
5562 auto callback = std::move(callbackAndFuture.first);
5563 setstruct_ret_set_param(rpcOptions, std::move(callback), p_param1);
5564 return std::move(callbackAndFuture.second);
5565 }
5566
setstruct_ret_set_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::set<::std::string> & p_param1)5567 void ParamServiceAsyncClient::setstruct_ret_set_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::set<::std::string>& p_param1) {
5568 setstruct_ret_set_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
5569 }
5570
5571 #if FOLLY_HAS_COROUTINES
5572 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct> & _return,::apache::thrift::ClientReceiveState & state)5573 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct>& _return, ::apache::thrift::ClientReceiveState& state) {
5574 if (state.isException()) {
5575 return std::move(state.exception());
5576 }
5577 if (!state.hasResponseBuffer()) {
5578 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5579 }
5580
5581 using result = ParamService_setstruct_ret_set_param_presult;
5582 switch (state.protocolId()) {
5583 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5584 {
5585 apache::thrift::BinaryProtocolReader reader;
5586 return apache::thrift::detail::ac::recv_wrapped<result>(
5587 &reader, state, _return);
5588 }
5589 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5590 {
5591 apache::thrift::CompactProtocolReader reader;
5592 return apache::thrift::detail::ac::recv_wrapped<result>(
5593 &reader, state, _return);
5594 }
5595 default:
5596 {
5597 }
5598 }
5599 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5600 }
5601
recv_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct> & _return,::apache::thrift::ClientReceiveState & state)5602 void ParamServiceAsyncClient::recv_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct>& _return, ::apache::thrift::ClientReceiveState& state) {
5603 auto ew = recv_wrapped_setstruct_ret_set_param(_return, state);
5604 if (ew) {
5605 ew.throw_exception();
5606 }
5607 }
5608
recv_instance_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct> & _return,::apache::thrift::ClientReceiveState & state)5609 void ParamServiceAsyncClient::recv_instance_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct>& _return, ::apache::thrift::ClientReceiveState& state) {
5610 return recv_setstruct_ret_set_param(_return, state);
5611 }
5612
recv_instance_wrapped_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct> & _return,::apache::thrift::ClientReceiveState & state)5613 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_setstruct_ret_set_param(::std::set<::some::valid::ns::MyStruct>& _return, ::apache::thrift::ClientReceiveState& state) {
5614 return recv_wrapped_setstruct_ret_set_param(_return, state);
5615 }
5616
union_ret_i32_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int32_t p_param2)5617 void ParamServiceAsyncClient::union_ret_i32_i32_param(std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5618 ::apache::thrift::RpcOptions rpcOptions;
5619 union_ret_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2);
5620 }
5621
union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,::std::int32_t p_param1,::std::int32_t p_param2)5622 void ParamServiceAsyncClient::union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5623 auto [ctx, header] = union_ret_i32_i32_paramCtx(&rpcOptions);
5624 apache::thrift::RequestCallback::Context callbackContext;
5625 callbackContext.protocolId =
5626 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5627 auto* contextStack = ctx.get();
5628 if (callback) {
5629 callbackContext.ctx = std::move(ctx);
5630 }
5631 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
5632 union_ret_i32_i32_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1, p_param2);
5633 }
5634
union_ret_i32_i32_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,::std::int32_t p_param1,::std::int32_t p_param2,bool stealRpcOptions)5635 void ParamServiceAsyncClient::union_ret_i32_i32_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_param1, ::std::int32_t p_param2, bool stealRpcOptions) {
5636 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
5637 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5638 {
5639 apache::thrift::BinaryProtocolWriter writer;
5640 if (stealRpcOptions) {
5641 union_ret_i32_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
5642 } else {
5643 union_ret_i32_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
5644 }
5645 break;
5646 }
5647 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5648 {
5649 apache::thrift::CompactProtocolWriter writer;
5650 if (stealRpcOptions) {
5651 union_ret_i32_i32_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1, p_param2);
5652 } else {
5653 union_ret_i32_i32_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1, p_param2);
5654 }
5655 break;
5656 }
5657 default:
5658 {
5659 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
5660 }
5661 }
5662 }
5663
union_ret_i32_i32_paramCtx(apache::thrift::RpcOptions * rpcOptions)5664 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::union_ret_i32_i32_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
5665 auto header = std::make_shared<apache::thrift::transport::THeader>(
5666 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
5667 header->setProtocolId(channel_->getProtocolId());
5668 if (rpcOptions) {
5669 header->setHeaders(rpcOptions->releaseWriteHeaders());
5670 }
5671
5672 auto ctx = apache::thrift::ContextStack::createWithClientContext(
5673 handlers_,
5674 getServiceName(),
5675 "ParamService.union_ret_i32_i32_param",
5676 *header);
5677
5678 return {std::move(ctx), std::move(header)};
5679 }
5680
sync_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion & _return,::std::int32_t p_param1,::std::int32_t p_param2)5681 void ParamServiceAsyncClient::sync_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion& _return, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5682 ::apache::thrift::RpcOptions rpcOptions;
5683 sync_union_ret_i32_i32_param(rpcOptions, _return, p_param1, p_param2);
5684 }
5685
sync_union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::some::valid::ns::ComplexUnion & _return,::std::int32_t p_param1,::std::int32_t p_param2)5686 void ParamServiceAsyncClient::sync_union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::some::valid::ns::ComplexUnion& _return, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5687 apache::thrift::ClientReceiveState returnState;
5688 apache::thrift::ClientSyncCallback<false> callback(&returnState);
5689 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5690 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
5691 auto ctxAndHeader = union_ret_i32_i32_paramCtx(&rpcOptions);
5692 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
5693 callback.waitUntilDone(
5694 evb,
5695 [&] {
5696 union_ret_i32_i32_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1, p_param2);
5697 });
5698
5699 if (returnState.isException()) {
5700 returnState.exception().throw_exception();
5701 }
5702 returnState.resetProtocolId(protocolId);
5703 returnState.resetCtx(std::move(ctxAndHeader.first));
5704 SCOPE_EXIT {
5705 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
5706 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
5707 }
5708 };
5709 return folly::fibers::runInMainContext([&] {
5710 recv_union_ret_i32_i32_param(_return, returnState);
5711 });
5712 }
5713
5714
future_union_ret_i32_i32_param(::std::int32_t p_param1,::std::int32_t p_param2)5715 folly::Future<::some::valid::ns::ComplexUnion> ParamServiceAsyncClient::future_union_ret_i32_i32_param(::std::int32_t p_param1, ::std::int32_t p_param2) {
5716 ::apache::thrift::RpcOptions rpcOptions;
5717 return future_union_ret_i32_i32_param(rpcOptions, p_param1, p_param2);
5718 }
5719
semifuture_union_ret_i32_i32_param(::std::int32_t p_param1,::std::int32_t p_param2)5720 folly::SemiFuture<::some::valid::ns::ComplexUnion> ParamServiceAsyncClient::semifuture_union_ret_i32_i32_param(::std::int32_t p_param1, ::std::int32_t p_param2) {
5721 ::apache::thrift::RpcOptions rpcOptions;
5722 return semifuture_union_ret_i32_i32_param(rpcOptions, p_param1, p_param2);
5723 }
5724
future_union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2)5725 folly::Future<::some::valid::ns::ComplexUnion> ParamServiceAsyncClient::future_union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5726 folly::Promise<::some::valid::ns::ComplexUnion> promise;
5727 auto future = promise.getFuture();
5728 auto callback = std::make_unique<apache::thrift::FutureCallback<::some::valid::ns::ComplexUnion>>(std::move(promise), recv_wrapped_union_ret_i32_i32_param, channel_);
5729 union_ret_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2);
5730 return future;
5731 }
5732
semifuture_union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2)5733 folly::SemiFuture<::some::valid::ns::ComplexUnion> ParamServiceAsyncClient::semifuture_union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5734 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_union_ret_i32_i32_param, channel_);
5735 auto callback = std::move(callbackAndFuture.first);
5736 union_ret_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2);
5737 return std::move(callbackAndFuture.second);
5738 }
5739
header_future_union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2)5740 folly::Future<std::pair<::some::valid::ns::ComplexUnion, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5741 folly::Promise<std::pair<::some::valid::ns::ComplexUnion, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
5742 auto future = promise.getFuture();
5743 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::some::valid::ns::ComplexUnion>>(std::move(promise), recv_wrapped_union_ret_i32_i32_param, channel_);
5744 union_ret_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2);
5745 return future;
5746 }
5747
header_semifuture_union_ret_i32_i32_param(apache::thrift::RpcOptions & rpcOptions,::std::int32_t p_param1,::std::int32_t p_param2)5748 folly::SemiFuture<std::pair<::some::valid::ns::ComplexUnion, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_union_ret_i32_i32_param(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5749 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_union_ret_i32_i32_param, channel_);
5750 auto callback = std::move(callbackAndFuture.first);
5751 union_ret_i32_i32_param(rpcOptions, std::move(callback), p_param1, p_param2);
5752 return std::move(callbackAndFuture.second);
5753 }
5754
union_ret_i32_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,::std::int32_t p_param1,::std::int32_t p_param2)5755 void ParamServiceAsyncClient::union_ret_i32_i32_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, ::std::int32_t p_param1, ::std::int32_t p_param2) {
5756 union_ret_i32_i32_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1, p_param2);
5757 }
5758
5759 #if FOLLY_HAS_COROUTINES
5760 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion & _return,::apache::thrift::ClientReceiveState & state)5761 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion& _return, ::apache::thrift::ClientReceiveState& state) {
5762 if (state.isException()) {
5763 return std::move(state.exception());
5764 }
5765 if (!state.hasResponseBuffer()) {
5766 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5767 }
5768
5769 using result = ParamService_union_ret_i32_i32_param_presult;
5770 switch (state.protocolId()) {
5771 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5772 {
5773 apache::thrift::BinaryProtocolReader reader;
5774 return apache::thrift::detail::ac::recv_wrapped<result>(
5775 &reader, state, _return);
5776 }
5777 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5778 {
5779 apache::thrift::CompactProtocolReader reader;
5780 return apache::thrift::detail::ac::recv_wrapped<result>(
5781 &reader, state, _return);
5782 }
5783 default:
5784 {
5785 }
5786 }
5787 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5788 }
5789
recv_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion & _return,::apache::thrift::ClientReceiveState & state)5790 void ParamServiceAsyncClient::recv_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion& _return, ::apache::thrift::ClientReceiveState& state) {
5791 auto ew = recv_wrapped_union_ret_i32_i32_param(_return, state);
5792 if (ew) {
5793 ew.throw_exception();
5794 }
5795 }
5796
recv_instance_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion & _return,::apache::thrift::ClientReceiveState & state)5797 void ParamServiceAsyncClient::recv_instance_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion& _return, ::apache::thrift::ClientReceiveState& state) {
5798 return recv_union_ret_i32_i32_param(_return, state);
5799 }
5800
recv_instance_wrapped_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion & _return,::apache::thrift::ClientReceiveState & state)5801 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_union_ret_i32_i32_param(::some::valid::ns::ComplexUnion& _return, ::apache::thrift::ClientReceiveState& state) {
5802 return recv_wrapped_union_ret_i32_i32_param(_return, state);
5803 }
5804
listunion_string_param(std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)5805 void ParamServiceAsyncClient::listunion_string_param(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
5806 ::apache::thrift::RpcOptions rpcOptions;
5807 listunion_string_param(rpcOptions, std::move(callback), p_param1);
5808 }
5809
listunion_string_param(apache::thrift::RpcOptions & rpcOptions,std::unique_ptr<apache::thrift::RequestCallback> callback,const::std::string & p_param1)5810 void ParamServiceAsyncClient::listunion_string_param(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_param1) {
5811 auto [ctx, header] = listunion_string_paramCtx(&rpcOptions);
5812 apache::thrift::RequestCallback::Context callbackContext;
5813 callbackContext.protocolId =
5814 apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5815 auto* contextStack = ctx.get();
5816 if (callback) {
5817 callbackContext.ctx = std::move(ctx);
5818 }
5819 auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
5820 listunion_string_paramImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_param1);
5821 }
5822
listunion_string_paramImpl(apache::thrift::RpcOptions & rpcOptions,std::shared_ptr<apache::thrift::transport::THeader> header,apache::thrift::ContextStack * contextStack,apache::thrift::RequestClientCallback::Ptr callback,const::std::string & p_param1,bool stealRpcOptions)5823 void ParamServiceAsyncClient::listunion_string_paramImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_param1, bool stealRpcOptions) {
5824 switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
5825 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5826 {
5827 apache::thrift::BinaryProtocolWriter writer;
5828 if (stealRpcOptions) {
5829 listunion_string_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5830 } else {
5831 listunion_string_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5832 }
5833 break;
5834 }
5835 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5836 {
5837 apache::thrift::CompactProtocolWriter writer;
5838 if (stealRpcOptions) {
5839 listunion_string_paramT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_param1);
5840 } else {
5841 listunion_string_paramT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_param1);
5842 }
5843 break;
5844 }
5845 default:
5846 {
5847 apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
5848 }
5849 }
5850 }
5851
listunion_string_paramCtx(apache::thrift::RpcOptions * rpcOptions)5852 std::pair<std::unique_ptr<::apache::thrift::ContextStack>, std::shared_ptr<::apache::thrift::transport::THeader>> ParamServiceAsyncClient::listunion_string_paramCtx(apache::thrift::RpcOptions* rpcOptions) {
5853 auto header = std::make_shared<apache::thrift::transport::THeader>(
5854 apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
5855 header->setProtocolId(channel_->getProtocolId());
5856 if (rpcOptions) {
5857 header->setHeaders(rpcOptions->releaseWriteHeaders());
5858 }
5859
5860 auto ctx = apache::thrift::ContextStack::createWithClientContext(
5861 handlers_,
5862 getServiceName(),
5863 "ParamService.listunion_string_param",
5864 *header);
5865
5866 return {std::move(ctx), std::move(header)};
5867 }
5868
sync_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion> & _return,const::std::string & p_param1)5869 void ParamServiceAsyncClient::sync_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion>& _return, const ::std::string& p_param1) {
5870 ::apache::thrift::RpcOptions rpcOptions;
5871 sync_listunion_string_param(rpcOptions, _return, p_param1);
5872 }
5873
sync_listunion_string_param(apache::thrift::RpcOptions & rpcOptions,::std::vector<::some::valid::ns::ComplexUnion> & _return,const::std::string & p_param1)5874 void ParamServiceAsyncClient::sync_listunion_string_param(apache::thrift::RpcOptions& rpcOptions, ::std::vector<::some::valid::ns::ComplexUnion>& _return, const ::std::string& p_param1) {
5875 apache::thrift::ClientReceiveState returnState;
5876 apache::thrift::ClientSyncCallback<false> callback(&returnState);
5877 auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
5878 auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
5879 auto ctxAndHeader = listunion_string_paramCtx(&rpcOptions);
5880 auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
5881 callback.waitUntilDone(
5882 evb,
5883 [&] {
5884 listunion_string_paramImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_param1);
5885 });
5886
5887 if (returnState.isException()) {
5888 returnState.exception().throw_exception();
5889 }
5890 returnState.resetProtocolId(protocolId);
5891 returnState.resetCtx(std::move(ctxAndHeader.first));
5892 SCOPE_EXIT {
5893 if (returnState.header() && !returnState.header()->getHeaders().empty()) {
5894 rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
5895 }
5896 };
5897 return folly::fibers::runInMainContext([&] {
5898 recv_listunion_string_param(_return, returnState);
5899 });
5900 }
5901
5902
future_listunion_string_param(const::std::string & p_param1)5903 folly::Future<::std::vector<::some::valid::ns::ComplexUnion>> ParamServiceAsyncClient::future_listunion_string_param(const ::std::string& p_param1) {
5904 ::apache::thrift::RpcOptions rpcOptions;
5905 return future_listunion_string_param(rpcOptions, p_param1);
5906 }
5907
semifuture_listunion_string_param(const::std::string & p_param1)5908 folly::SemiFuture<::std::vector<::some::valid::ns::ComplexUnion>> ParamServiceAsyncClient::semifuture_listunion_string_param(const ::std::string& p_param1) {
5909 ::apache::thrift::RpcOptions rpcOptions;
5910 return semifuture_listunion_string_param(rpcOptions, p_param1);
5911 }
5912
future_listunion_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)5913 folly::Future<::std::vector<::some::valid::ns::ComplexUnion>> ParamServiceAsyncClient::future_listunion_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
5914 folly::Promise<::std::vector<::some::valid::ns::ComplexUnion>> promise;
5915 auto future = promise.getFuture();
5916 auto callback = std::make_unique<apache::thrift::FutureCallback<::std::vector<::some::valid::ns::ComplexUnion>>>(std::move(promise), recv_wrapped_listunion_string_param, channel_);
5917 listunion_string_param(rpcOptions, std::move(callback), p_param1);
5918 return future;
5919 }
5920
semifuture_listunion_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)5921 folly::SemiFuture<::std::vector<::some::valid::ns::ComplexUnion>> ParamServiceAsyncClient::semifuture_listunion_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
5922 auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_listunion_string_param, channel_);
5923 auto callback = std::move(callbackAndFuture.first);
5924 listunion_string_param(rpcOptions, std::move(callback), p_param1);
5925 return std::move(callbackAndFuture.second);
5926 }
5927
header_future_listunion_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)5928 folly::Future<std::pair<::std::vector<::some::valid::ns::ComplexUnion>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_future_listunion_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
5929 folly::Promise<std::pair<::std::vector<::some::valid::ns::ComplexUnion>, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
5930 auto future = promise.getFuture();
5931 auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<::std::vector<::some::valid::ns::ComplexUnion>>>(std::move(promise), recv_wrapped_listunion_string_param, channel_);
5932 listunion_string_param(rpcOptions, std::move(callback), p_param1);
5933 return future;
5934 }
5935
header_semifuture_listunion_string_param(apache::thrift::RpcOptions & rpcOptions,const::std::string & p_param1)5936 folly::SemiFuture<std::pair<::std::vector<::some::valid::ns::ComplexUnion>, std::unique_ptr<apache::thrift::transport::THeader>>> ParamServiceAsyncClient::header_semifuture_listunion_string_param(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_param1) {
5937 auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_listunion_string_param, channel_);
5938 auto callback = std::move(callbackAndFuture.first);
5939 listunion_string_param(rpcOptions, std::move(callback), p_param1);
5940 return std::move(callbackAndFuture.second);
5941 }
5942
listunion_string_param(folly::Function<void (::apache::thrift::ClientReceiveState &&)> callback,const::std::string & p_param1)5943 void ParamServiceAsyncClient::listunion_string_param(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_param1) {
5944 listunion_string_param(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)), p_param1);
5945 }
5946
5947 #if FOLLY_HAS_COROUTINES
5948 #endif // FOLLY_HAS_COROUTINES
recv_wrapped_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion> & _return,::apache::thrift::ClientReceiveState & state)5949 folly::exception_wrapper ParamServiceAsyncClient::recv_wrapped_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion>& _return, ::apache::thrift::ClientReceiveState& state) {
5950 if (state.isException()) {
5951 return std::move(state.exception());
5952 }
5953 if (!state.hasResponseBuffer()) {
5954 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
5955 }
5956
5957 using result = ParamService_listunion_string_param_presult;
5958 switch (state.protocolId()) {
5959 case apache::thrift::protocol::T_BINARY_PROTOCOL:
5960 {
5961 apache::thrift::BinaryProtocolReader reader;
5962 return apache::thrift::detail::ac::recv_wrapped<result>(
5963 &reader, state, _return);
5964 }
5965 case apache::thrift::protocol::T_COMPACT_PROTOCOL:
5966 {
5967 apache::thrift::CompactProtocolReader reader;
5968 return apache::thrift::detail::ac::recv_wrapped<result>(
5969 &reader, state, _return);
5970 }
5971 default:
5972 {
5973 }
5974 }
5975 return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
5976 }
5977
recv_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion> & _return,::apache::thrift::ClientReceiveState & state)5978 void ParamServiceAsyncClient::recv_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion>& _return, ::apache::thrift::ClientReceiveState& state) {
5979 auto ew = recv_wrapped_listunion_string_param(_return, state);
5980 if (ew) {
5981 ew.throw_exception();
5982 }
5983 }
5984
recv_instance_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion> & _return,::apache::thrift::ClientReceiveState & state)5985 void ParamServiceAsyncClient::recv_instance_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion>& _return, ::apache::thrift::ClientReceiveState& state) {
5986 return recv_listunion_string_param(_return, state);
5987 }
5988
recv_instance_wrapped_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion> & _return,::apache::thrift::ClientReceiveState & state)5989 folly::exception_wrapper ParamServiceAsyncClient::recv_instance_wrapped_listunion_string_param(::std::vector<::some::valid::ns::ComplexUnion>& _return, ::apache::thrift::ClientReceiveState& state) {
5990 return recv_wrapped_listunion_string_param(_return, state);
5991 }
5992
5993
5994 }}} // some::valid::ns
5995