From e4a44766bda67a4fd7c8ae0f70f9e63736bb4138 Mon Sep 17 00:00:00 2001 From: Brat-vseznamus Date: Mon, 29 Jul 2024 16:56:28 +0300 Subject: [PATCH] push factory amd meta --- .../test/gen/cases_cpp/__factory/details.cpp | 691 ++++ .../test/gen/cases_cpp/__factory/headers.hpp | 7 + .../test/gen/cases_cpp/__meta/details.cpp | 95 + .../test/gen/cases_cpp/__meta/headers.hpp | 42 + .../tlcodegen/test/gen/schema_cpp/Makefile | 41 + .../__common/details/headers/Bool.hpp | 12 + .../__common/details/headers/dictionary.hpp | 15 + .../details/headers/dictionaryField.hpp | 23 + .../__common/details/headers/int.hpp | 29 + .../__common/details/headers/true.hpp | 15 + .../__common/details/headers/tuple.hpp | 16 + .../__common/details/headers/vector.hpp | 27 + .../__common/details/namespace_details.cpp | 270 ++ .../__common/functions/boxedArray.hpp | 25 + .../__common/functions/boxedInt.hpp | 24 + .../__common/functions/boxedString.hpp | 24 + .../__common/functions/boxedTuple.hpp | 24 + .../__common/functions/boxedTupleSlice1.hpp | 25 + .../__common/functions/boxedTupleSlice2.hpp | 25 + .../__common/functions/boxedTupleSlice3.hpp | 25 + .../__common/functions/boxedVector32.hpp | 24 + .../functions/boxedVector32BoxedElem.hpp | 24 + .../__common/functions/boxedVector64.hpp | 24 + .../__common/functions/getDouble.hpp | 24 + .../__common/functions/getFloat.hpp | 24 + .../__common/functions/getMaybeIface.hpp | 25 + .../__common/functions/getMyDictOfInt.hpp | 25 + .../__common/functions/getMyDouble.hpp | 25 + .../__common/functions/getMyValue.hpp | 25 + .../__common/functions/getNonOptNat.hpp | 25 + .../__common/functions/getStats.hpp | 25 + .../__common/functions/get_arrays.hpp | 26 + .../gen/schema_cpp/__common/types/Bool.hpp | 11 + .../gen/schema_cpp/__common/types/Either.hpp | 22 + .../gen/schema_cpp/__common/types/MyValue.hpp | 24 + .../schema_cpp/__common/types/benchObject.hpp | 23 + .../schema_cpp/__common/types/boolStat.hpp | 23 + .../schema_cpp/__common/types/dictionary.hpp | 11 + .../__common/types/dictionaryField.hpp | 17 + .../gen/schema_cpp/__common/types/double.hpp | 9 + .../__common/types/fieldConflict1.hpp | 22 + .../__common/types/fieldConflict2.hpp | 22 + .../__common/types/fieldConflict3.hpp | 22 + .../__common/types/fieldConflict4.hpp | 22 + .../gen/schema_cpp/__common/types/float.hpp | 9 + .../gen/schema_cpp/__common/types/int.hpp | 9 + .../gen/schema_cpp/__common/types/integer.hpp | 21 + .../schema_cpp/__common/types/issue3498.hpp | 24 + .../gen/schema_cpp/__common/types/left.hpp | 16 + .../gen/schema_cpp/__common/types/long.hpp | 9 + .../gen/schema_cpp/__common/types/map.hpp | 17 + .../__common/types/myAnonMcValue.hpp | 10 + .../__common/types/myBoxedArray.hpp | 21 + .../__common/types/myBoxedTupleSlice.hpp | 22 + .../__common/types/myBoxedVectorSlice.hpp | 21 + .../schema_cpp/__common/types/myDictOfInt.hpp | 10 + .../schema_cpp/__common/types/myDouble.hpp | 9 + .../gen/schema_cpp/__common/types/myInt.hpp | 21 + .../schema_cpp/__common/types/myMaybe1.hpp | 10 + .../schema_cpp/__common/types/myMaybe2.hpp | 10 + .../schema_cpp/__common/types/myMcValue.hpp | 22 + .../__common/types/myMcValueTuple.hpp | 22 + .../__common/types/myMcValueVector.hpp | 22 + .../schema_cpp/__common/types/myString.hpp | 21 + .../gen/schema_cpp/__common/types/myTuple.hpp | 10 + .../schema_cpp/__common/types/myTwoDicts.hpp | 23 + .../schema_cpp/__common/types/nonOptNat.hpp | 22 + .../gen/schema_cpp/__common/types/right.hpp | 16 + .../__common/types/rpcInvokeReqExtra.hpp | 27 + .../gen/schema_cpp/__common/types/statOne.hpp | 22 + .../gen/schema_cpp/__common/types/string.hpp | 9 + .../gen/schema_cpp/__common/types/true.hpp | 20 + .../gen/schema_cpp/__common/types/tuple.hpp | 15 + .../gen/schema_cpp/__common/types/vector.hpp | 10 + .../schema_cpp/__common/types/withFloat.hpp | 23 + .../test/gen/schema_cpp/__factory/details.cpp | 3107 +++++++++++++++ .../test/gen/schema_cpp/__factory/headers.hpp | 7 + .../details/headers/Either.hpp | 40 + .../details/headers/MyValue.hpp | 13 + .../details/headers/benchObject.hpp | 15 + .../details/headers/boxedArray.hpp | 19 + .../details/headers/boxedInt.hpp | 18 + .../details/headers/boxedString.hpp | 18 + .../details/headers/boxedTuple.hpp | 19 + .../details/headers/boxedTupleSlice1.hpp | 19 + .../details/headers/boxedTupleSlice2.hpp | 19 + .../details/headers/boxedTupleSlice3.hpp | 19 + .../details/headers/boxedVector32.hpp | 19 + .../headers/boxedVector32BoxedElem.hpp | 19 + .../details/headers/boxedVector64.hpp | 19 + .../details/headers/double.hpp | 15 + .../details/headers/fieldConflict1.hpp | 15 + .../details/headers/fieldConflict2.hpp | 15 + .../details/headers/fieldConflict3.hpp | 15 + .../details/headers/fieldConflict4.hpp | 15 + .../details/headers/float.hpp | 15 + .../details/headers/getDouble.hpp | 18 + .../details/headers/getFloat.hpp | 18 + .../details/headers/getMaybeIface.hpp | 19 + .../details/headers/getMyDictOfInt.hpp | 19 + .../details/headers/getMyDouble.hpp | 19 + .../details/headers/getMyValue.hpp | 19 + .../details/headers/getNonOptNat.hpp | 19 + .../details/headers/getStats.hpp | 19 + .../details/headers/get_arrays.hpp | 19 + .../details/headers/int.hpp | 63 + .../details/headers/integer.hpp | 23 + .../details/headers/issue3498.hpp | 15 + .../details/headers/left.hpp | 28 + .../details/headers/long.hpp | 23 + .../details/headers/map.hpp | 23 + .../details/headers/myAnonMcValue.hpp | 15 + .../details/headers/myBoxedArray.hpp | 15 + .../details/headers/myBoxedTupleSlice.hpp | 15 + .../details/headers/myBoxedVectorSlice.hpp | 15 + .../details/headers/myDictOfInt.hpp | 15 + .../details/headers/myDouble.hpp | 15 + .../details/headers/myInt.hpp | 15 + .../details/headers/myMaybe1.hpp | 15 + .../details/headers/myMaybe2.hpp | 15 + .../details/headers/myMcValue.hpp | 15 + .../details/headers/myMcValueTuple.hpp | 15 + .../details/headers/myMcValueVector.hpp | 15 + .../details/headers/myString.hpp | 15 + .../details/headers/myTuple.hpp | 23 + .../details/headers/myTwoDicts.hpp | 15 + .../details/headers/nonOptNat.hpp | 15 + .../details/headers/right.hpp | 28 + .../details/headers/rpcInvokeReqExtra.hpp | 15 + .../details/headers/statOne.hpp | 15 + .../details/headers/string.hpp | 23 + .../details/headers/tuple.hpp | 78 + .../details/headers/vector.hpp | 126 + .../details/headers/withFloat.hpp | 15 + .../details/namespace_details.cpp | 3489 +++++++++++++++++ .../test/gen/schema_cpp/__meta/details.cpp | 191 + .../test/gen/schema_cpp/__meta/headers.hpp | 42 + .../gen/schema_cpp/a_tlgen_helpers_code.hpp | 303 ++ .../details/headers/antispam.PatternFull.hpp | 13 + .../details/headers/antispam.getPattern.hpp | 19 + .../details/headers/antispam.patternFound.hpp | 15 + .../headers/antispam.patternNotFound.hpp | 15 + .../antispam/details/namespace_details.cpp | 212 + .../functions/antispam.getPattern.hpp | 25 + .../antispam/types/antispam.PatternFull.hpp | 25 + .../antispam/types/antispam.patternFound.hpp | 25 + .../types/antispam.patternNotFound.hpp | 20 + .../tlcodegen/test/gen/schema_cpp/main.cpp | 1 + .../pkg2/details/headers/pkg2.foo.hpp | 15 + .../pkg2/details/headers/pkg2.t1.hpp | 15 + .../pkg2/details/headers/pkg2.t2.hpp | 15 + .../pkg2/details/namespace_details.cpp | 116 + .../gen/schema_cpp/pkg2/types/pkg2.foo.hpp | 21 + .../gen/schema_cpp/pkg2/types/pkg2.t1.hpp | 22 + .../gen/schema_cpp/pkg2/types/pkg2.t2.hpp | 10 + .../details/headers/service1.Value.hpp | 37 + .../service1/details/headers/service1.add.hpp | 19 + .../details/headers/service1.addOrGet.hpp | 19 + .../details/headers/service1.addOrIncr.hpp | 19 + .../details/headers/service1.append.hpp | 19 + .../service1/details/headers/service1.cas.hpp | 19 + .../details/headers/service1.decr.hpp | 19 + .../details/headers/service1.delete.hpp | 19 + .../headers/service1.disableExpiration.hpp | 19 + .../headers/service1.disableKeysStat.hpp | 19 + .../headers/service1.enableExpiration.hpp | 19 + .../headers/service1.enableKeysStat.hpp | 19 + .../details/headers/service1.exists.hpp | 19 + .../service1/details/headers/service1.get.hpp | 19 + .../headers/service1.getExpireTime.hpp | 19 + .../details/headers/service1.getKeysStat.hpp | 19 + .../headers/service1.getKeysStatPeriods.hpp | 19 + .../details/headers/service1.getWildcard.hpp | 19 + .../headers/service1.getWildcardDict.hpp | 19 + .../headers/service1.getWildcardList.hpp | 19 + .../headers/service1.getWildcardWithFlags.hpp | 20 + .../details/headers/service1.incr.hpp | 19 + .../details/headers/service1.keysStat.hpp | 23 + .../details/headers/service1.longvalue.hpp | 15 + .../headers/service1.longvalueWithTime.hpp | 15 + .../details/headers/service1.not_found.hpp | 15 + .../details/headers/service1.replace.hpp | 19 + .../headers/service1.replaceOrIncr.hpp | 19 + .../service1/details/headers/service1.set.hpp | 19 + .../details/headers/service1.setOrIncr.hpp | 19 + .../details/headers/service1.strvalue.hpp | 15 + .../headers/service1.strvalueWithTime.hpp | 15 + .../details/headers/service1.touch.hpp | 19 + .../details/headers/service1_dictionary.hpp | 36 + .../headers/service1_dictionaryField.hpp | 61 + .../details/headers/service1_vector.hpp | 38 + .../service1/details/namespace_details.cpp | 2432 ++++++++++++ .../service1/functions/service1.add.hpp | 27 + .../service1/functions/service1.addOrGet.hpp | 28 + .../service1/functions/service1.addOrIncr.hpp | 28 + .../service1/functions/service1.append.hpp | 27 + .../service1/functions/service1.cas.hpp | 28 + .../service1/functions/service1.decr.hpp | 26 + .../service1/functions/service1.delete.hpp | 24 + .../functions/service1.disableExpiration.hpp | 24 + .../functions/service1.disableKeysStat.hpp | 24 + .../functions/service1.enableExpiration.hpp | 24 + .../functions/service1.enableKeysStat.hpp | 24 + .../service1/functions/service1.exists.hpp | 24 + .../service1/functions/service1.get.hpp | 25 + .../functions/service1.getExpireTime.hpp | 24 + .../functions/service1.getKeysStat.hpp | 25 + .../functions/service1.getKeysStatPeriods.hpp | 23 + .../functions/service1.getWildcard.hpp | 25 + .../functions/service1.getWildcardDict.hpp | 25 + .../functions/service1.getWildcardList.hpp | 24 + .../service1.getWildcardWithFlags.hpp | 26 + .../service1/functions/service1.incr.hpp | 26 + .../service1/functions/service1.replace.hpp | 27 + .../functions/service1.replaceOrIncr.hpp | 28 + .../service1/functions/service1.set.hpp | 27 + .../service1/functions/service1.setOrIncr.hpp | 28 + .../service1/functions/service1.touch.hpp | 25 + .../service1/types/service1.Value.hpp | 31 + .../service1/types/service1.keysStat.hpp | 23 + .../service1/types/service1.longvalue.hpp | 22 + .../types/service1.longvalueWithTime.hpp | 23 + .../service1/types/service1.not_found.hpp | 20 + .../service1/types/service1.strvalue.hpp | 22 + .../types/service1.strvalueWithTime.hpp | 23 + .../headers/service2.addOrIncrMany.hpp | 19 + .../details/headers/service2.counterSet.hpp | 23 + .../details/headers/service2.deltaSet.hpp | 23 + .../details/headers/service2.objectId.hpp | 15 + .../service2/details/headers/service2.set.hpp | 19 + .../details/headers/service2.setObjectTtl.hpp | 19 + .../details/headers/service2_double.hpp | 13 + .../details/headers/service2_tuple.hpp | 27 + .../service2/details/namespace_details.cpp | 484 +++ .../functions/service2.addOrIncrMany.hpp | 32 + .../service2/functions/service2.set.hpp | 31 + .../functions/service2.setObjectTtl.hpp | 28 + .../service2/types/service2.counterSet.hpp | 22 + .../service2/types/service2.deltaSet.hpp | 24 + .../service2/types/service2.objectId.hpp | 21 + .../headers/service3.createProduct.hpp | 19 + .../headers/service3.deleteAllProducts.hpp | 19 + .../service3.deleteGroupedProducts.hpp | 19 + .../headers/service3.deleteProduct.hpp | 19 + .../service3.getLastVisitTimestamp.hpp | 19 + .../details/headers/service3.getLimits.hpp | 19 + .../headers/service3.getProductStats.hpp | 20 + .../details/headers/service3.getProducts.hpp | 20 + .../headers/service3.getScheduledProducts.hpp | 20 + .../headers/service3.groupCountLimit.hpp | 23 + .../headers/service3.groupSizeLimit.hpp | 23 + .../details/headers/service3.limits.hpp | 15 + .../details/headers/service3.product.hpp | 41 + .../headers/service3.productStatsOld.hpp | 23 + .../headers/service3.restoreAllProducts.hpp | 19 + .../service3.restoreGroupedProducts.hpp | 19 + .../headers/service3.restoreProduct.hpp | 19 + .../service3.setLastVisitTimestamp.hpp | 19 + .../details/headers/service3.setLimits.hpp | 19 + .../details/headers/service3_boolStat.hpp | 15 + .../details/headers/service3_vector.hpp | 83 + .../service3/details/namespace_details.cpp | 1630 ++++++++ .../functions/service3.createProduct.hpp | 29 + .../functions/service3.deleteAllProducts.hpp | 27 + .../service3.deleteGroupedProducts.hpp | 28 + .../functions/service3.deleteProduct.hpp | 27 + .../service3.getLastVisitTimestamp.hpp | 24 + .../service3/functions/service3.getLimits.hpp | 24 + .../functions/service3.getProductStats.hpp | 26 + .../functions/service3.getProducts.hpp | 32 + .../service3.getScheduledProducts.hpp | 26 + .../functions/service3.restoreAllProducts.hpp | 27 + .../service3.restoreGroupedProducts.hpp | 28 + .../functions/service3.restoreProduct.hpp | 27 + .../service3.setLastVisitTimestamp.hpp | 25 + .../service3/functions/service3.setLimits.hpp | 26 + .../types/service3.groupCountLimit.hpp | 22 + .../types/service3.groupSizeLimit.hpp | 22 + .../service3/types/service3.limits.hpp | 26 + .../service3/types/service3.product.hpp | 42 + .../types/service3.productStatsOld.hpp | 25 + .../headers/service4.modifiedNewsEntry.hpp | 15 + .../details/headers/service4.object.hpp | 15 + .../service4/details/namespace_details.cpp | 132 + .../types/service4.modifiedNewsEntry.hpp | 27 + .../service4/types/service4.object.hpp | 23 + .../details/headers/service5.Output.hpp | 13 + .../details/headers/service5.emptyOutput.hpp | 15 + .../details/headers/service5.insert.hpp | 19 + .../details/headers/service5.params.hpp | 15 + .../details/headers/service5.performQuery.hpp | 19 + .../details/headers/service5.query.hpp | 19 + .../details/headers/service5.stringOutput.hpp | 15 + .../service5/details/namespace_details.cpp | 394 ++ .../service5/functions/service5.insert.hpp | 26 + .../functions/service5.performQuery.hpp | 25 + .../service5/functions/service5.query.hpp | 27 + .../service5/types/service5.Output.hpp | 25 + .../service5/types/service5.emptyOutput.hpp | 20 + .../service5/types/service5.params.hpp | 23 + .../service5/types/service5.stringOutput.hpp | 22 + .../details/headers/service6.error.hpp | 15 + .../headers/service6.findResultRow.hpp | 23 + .../headers/service6.findWithBoundsResult.hpp | 23 + .../details/headers/service6.multiFind.hpp | 21 + .../headers/service6.multiFindWithBounds.hpp | 20 + .../service6/details/namespace_details.cpp | 316 ++ .../service6/functions/service6.multiFind.hpp | 29 + .../service6.multiFindWithBounds.hpp | 26 + .../service6/types/service6.error.hpp | 21 + .../service6/types/service6.findResultRow.hpp | 21 + .../types/service6.findWithBoundsResult.hpp | 21 + .../details/headers/tasks.TaskStatus.hpp | 13 + .../details/headers/tasks.TaskStatusItems.hpp | 45 + .../tasks/details/headers/tasks.addTask.hpp | 18 + .../tasks/details/headers/tasks.cronTask.hpp | 15 + .../details/headers/tasks.cronTaskWithId.hpp | 15 + .../tasks/details/headers/tasks.cronTime.hpp | 15 + .../details/headers/tasks.getAnyTask.hpp | 19 + .../details/headers/tasks.getQueueSize.hpp | 19 + .../details/headers/tasks.getQueueTypes.hpp | 19 + .../headers/tasks.getTaskFromQueue.hpp | 19 + .../details/headers/tasks.queueStats.hpp | 15 + .../details/headers/tasks.queueTypeInfo.hpp | 23 + .../headers/tasks.queueTypeSettings.hpp | 15 + .../details/headers/tasks.queueTypeStats.hpp | 15 + .../tasks/details/headers/tasks.task.hpp | 15 + .../tasks/details/headers/tasks.taskInfo.hpp | 23 + .../tasks/details/namespace_details.cpp | 1262 ++++++ .../tasks/functions/tasks.addTask.hpp | 27 + .../tasks/functions/tasks.getAnyTask.hpp | 24 + .../tasks/functions/tasks.getQueueSize.hpp | 27 + .../tasks/functions/tasks.getQueueTypes.hpp | 26 + .../functions/tasks.getTaskFromQueue.hpp | 26 + .../tasks/types/tasks.TaskStatus.hpp | 29 + .../tasks/types/tasks.TaskStatusItems.hpp | 65 + .../schema_cpp/tasks/types/tasks.cronTask.hpp | 26 + .../tasks/types/tasks.cronTaskWithId.hpp | 24 + .../schema_cpp/tasks/types/tasks.cronTime.hpp | 27 + .../tasks/types/tasks.queueStats.hpp | 23 + .../tasks/types/tasks.queueTypeInfo.hpp | 25 + .../tasks/types/tasks.queueTypeSettings.hpp | 30 + .../tasks/types/tasks.queueTypeStats.hpp | 25 + .../gen/schema_cpp/tasks/types/tasks.task.hpp | 28 + .../schema_cpp/tasks/types/tasks.taskInfo.hpp | 24 + .../test/gen/schema_cpp/tlgen2_version.txt | 4 + .../headers/tree_stats.ObjectLimitValue.hpp | 13 + .../tree_stats.objectLimitValueDouble.hpp | 15 + .../tree_stats.objectLimitValueLong.hpp | 15 + .../tree_stats/details/namespace_details.cpp | 119 + .../types/tree_stats.ObjectLimitValue.hpp | 25 + .../tree_stats.objectLimitValueDouble.hpp | 9 + .../types/tree_stats.objectLimitValueLong.hpp | 20 + .../unique/details/headers/unique.get.hpp | 19 + .../details/headers/unique.stringToInt.hpp | 18 + .../unique/details/namespace_details.cpp | 126 + .../unique/functions/unique.get.hpp | 24 + .../unique/functions/unique.stringToInt.hpp | 24 + 358 files changed, 22802 insertions(+) create mode 100644 internal/tlcodegen/test/gen/cases_cpp/__factory/details.cpp create mode 100644 internal/tlcodegen/test/gen/cases_cpp/__factory/headers.hpp create mode 100644 internal/tlcodegen/test/gen/cases_cpp/__meta/details.cpp create mode 100644 internal/tlcodegen/test/gen/cases_cpp/__meta/headers.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/Makefile create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/Bool.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionary.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionaryField.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/int.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/true.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/tuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/vector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedArray.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedString.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice3.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32BoxedElem.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector64.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getFloat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMaybeIface.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDictOfInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getNonOptNat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/getStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/functions/get_arrays.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/Bool.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/Either.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/MyValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/benchObject.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/boolStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionary.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionaryField.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/double.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict3.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict4.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/float.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/int.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/integer.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/issue3498.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/left.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/long.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/map.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myAnonMcValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedArray.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedTupleSlice.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedVectorSlice.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myDictOfInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueVector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myString.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/myTwoDicts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/nonOptNat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/right.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/rpcInvokeReqExtra.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/statOne.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/string.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/true.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/tuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/vector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__common/types/withFloat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__factory/details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__factory/headers.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/Either.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/MyValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/benchObject.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedArray.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedString.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice3.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32BoxedElem.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector64.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/double.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict3.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict4.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/float.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getFloat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMaybeIface.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDictOfInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getNonOptNat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/get_arrays.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/int.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/integer.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/issue3498.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/left.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/long.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/map.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myAnonMcValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedArray.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedTupleSlice.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedVectorSlice.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDictOfInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueVector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myString.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTwoDicts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/nonOptNat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/right.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/rpcInvokeReqExtra.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/statOne.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/string.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/tuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/vector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/withFloat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__meta/details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/__meta/headers.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/a_tlgen_helpers_code.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.PatternFull.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.getPattern.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternFound.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternNotFound.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/functions/antispam.getPattern.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.PatternFull.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternFound.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternNotFound.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/main.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.foo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.foo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t1.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t2.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.Value.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.add.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrGet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.append.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.cas.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.decr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.delete.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableExpiration.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableExpiration.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.exists.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.get.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getExpireTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStatPeriods.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcard.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardDict.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardList.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardWithFlags.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.incr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.keysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalueWithTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.not_found.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replace.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replaceOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.set.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.setOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalueWithTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.touch.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionary.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionaryField.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_vector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.add.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrGet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.append.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.cas.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.decr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.delete.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableExpiration.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableExpiration.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.exists.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.get.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getExpireTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStatPeriods.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcard.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardDict.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardList.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardWithFlags.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.incr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replace.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replaceOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.set.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.setOrIncr.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.touch.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.Value.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.keysStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalueWithTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.not_found.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalueWithTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.addOrIncrMany.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.counterSet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.deltaSet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.objectId.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.set.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.setObjectTtl.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_double.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_tuple.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.addOrIncrMany.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.set.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.setObjectTtl.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.counterSet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.deltaSet.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.objectId.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.createProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteAllProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteGroupedProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLastVisitTimestamp.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLimits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProductStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getScheduledProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupCountLimit.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupSizeLimit.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.limits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.product.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.productStatsOld.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreAllProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreGroupedProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLastVisitTimestamp.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLimits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_boolStat.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_vector.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.createProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteAllProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteGroupedProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLastVisitTimestamp.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLimits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProductStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getScheduledProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreAllProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreGroupedProducts.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreProduct.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLastVisitTimestamp.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLimits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupCountLimit.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupSizeLimit.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.limits.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.product.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.productStatsOld.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.modifiedNewsEntry.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.object.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service4/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.modifiedNewsEntry.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.object.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.Output.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.emptyOutput.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.insert.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.params.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.performQuery.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.query.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.stringOutput.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.insert.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.performQuery.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.query.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.Output.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.emptyOutput.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.params.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.stringOutput.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.error.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findResultRow.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findWithBoundsResult.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFind.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFindWithBounds.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFind.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFindWithBounds.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.error.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findResultRow.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findWithBoundsResult.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatus.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatusItems.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.addTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTaskWithId.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getAnyTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueSize.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueTypes.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getTaskFromQueue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeInfo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeSettings.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.task.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.taskInfo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.addTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getAnyTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueSize.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueTypes.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getTaskFromQueue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatus.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatusItems.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTask.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTaskWithId.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTime.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeInfo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeSettings.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeStats.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.task.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.taskInfo.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tlgen2_version.txt create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.ObjectLimitValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueLong.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.ObjectLimitValue.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueDouble.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueLong.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.get.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.stringToInt.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/unique/details/namespace_details.cpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.get.hpp create mode 100644 internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.stringToInt.hpp diff --git a/internal/tlcodegen/test/gen/cases_cpp/__factory/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/__factory/details.cpp new file mode 100644 index 00000000..8756eb50 --- /dev/null +++ b/internal/tlcodegen/test/gen/cases_cpp/__factory/details.cpp @@ -0,0 +1,691 @@ +#include "../__meta/headers.hpp" +#include "headers.hpp" + +#include "../cases/types/cases.testVector.hpp" +#include "../cases/types/cases.testUnionContainer.hpp" +#include "../cases/types/cases.testUnion2.hpp" +#include "../cases/types/cases.testUnion1.hpp" +#include "../cases/types/cases.testTuple.hpp" +#include "../cases/types/cases.testRecursiveFieldMask.hpp" +#include "../cases/types/cases.testOutFieldMaskContainer.hpp" +#include "../cases/types/cases.testMaybe.hpp" +#include "../cases/types/cases.testLocalFieldmask.hpp" +#include "../cases/types/cases.testEnumContainer.hpp" +#include "../cases/types/cases.testDictString.hpp" +#include "../cases/types/cases.testDictInt.hpp" +#include "../cases/types/cases.testDictAny.hpp" +#include "../cases/types/cases.testBeforeReadBitValidation.hpp" +#include "../cases/types/cases.testArray.hpp" +#include "../cases/types/cases.testAllPossibleFieldConfigsContainer.hpp" +#include "../cases/types/cases.replace7plusplus.hpp" +#include "../cases/types/cases.replace7plus.hpp" +#include "../cases/types/cases.replace7.hpp" +#include "../cases/types/cases.myCycle1.hpp" +#include "../cases/types/cases.myCycle2.hpp" +#include "../cases/types/cases.myCycle3.hpp" +#include "../cases_bytes/types/cases_bytes.testVector.hpp" +#include "../cases_bytes/types/cases_bytes.testTuple.hpp" +#include "../cases_bytes/types/cases_bytes.testEnumContainer.hpp" +#include "../cases/types/cases.TestEnumItems.hpp" +#include "../cases_bytes/types/cases_bytes.TestEnumItems.hpp" +#include "../cases_bytes/types/cases_bytes.testDictStringString.hpp" +#include "../cases_bytes/types/cases_bytes.testDictString.hpp" +#include "../cases_bytes/types/cases_bytes.testDictInt.hpp" +#include "../cases_bytes/types/cases_bytes.testDictAny.hpp" +#include "../cases_bytes/types/cases_bytes.testArray.hpp" +#include "../benchmarks/types/benchmarks.vrutoyTopLevelContainerWithDependency.hpp" +#include "../benchmarks/types/benchmarks.vrutoyTopLevelContainer.hpp" +#include "../benchmarks/types/benchmarks.vrutoytopLevelUnionEmpty.hpp" +#include "../benchmarks/types/benchmarks.vrutoytopLevelUnionBig.hpp" +#include "../benchmarks/types/benchmarks.vruposition.hpp" +#include "../__common/types/true.hpp" +#include "../benchmarks/types/benchmarks.vruhash.hpp" + +void tl2::factory::set_all_factories() { + + struct tl2_benchmarks_Vruhash_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::Vruhash object; + explicit tl2_benchmarks_Vruhash_tl_object(tl2::benchmarks::Vruhash o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vruhash", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::Vruhash{}); + }); + + struct tl2_benchmarks_Vruposition_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::Vruposition object; + explicit tl2_benchmarks_Vruposition_tl_object(tl2::benchmarks::Vruposition o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vruposition", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::Vruposition{}); + }); + + struct tl2_benchmarks_VrutoyTopLevelContainer_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::VrutoyTopLevelContainer object; + explicit tl2_benchmarks_VrutoyTopLevelContainer_tl_object(tl2::benchmarks::VrutoyTopLevelContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vrutoyTopLevelContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::VrutoyTopLevelContainer{}); + }); + + struct tl2_benchmarks_VrutoyTopLevelContainerWithDependency_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::VrutoyTopLevelContainerWithDependency object; + explicit tl2_benchmarks_VrutoyTopLevelContainerWithDependency_tl_object(tl2::benchmarks::VrutoyTopLevelContainerWithDependency o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vrutoyTopLevelContainerWithDependency", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::VrutoyTopLevelContainerWithDependency{}); + }); + + struct tl2_benchmarks_VrutoytopLevelUnionBig_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::VrutoytopLevelUnionBig object; + explicit tl2_benchmarks_VrutoytopLevelUnionBig_tl_object(tl2::benchmarks::VrutoytopLevelUnionBig o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vrutoytopLevelUnionBig", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::VrutoytopLevelUnionBig{}); + }); + + struct tl2_benchmarks_VrutoytopLevelUnionEmpty_tl_object : public tl2::meta::tl_object { + tl2::benchmarks::VrutoytopLevelUnionEmpty object; + explicit tl2_benchmarks_VrutoytopLevelUnionEmpty_tl_object(tl2::benchmarks::VrutoytopLevelUnionEmpty o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchmarks.vrutoytopLevelUnionEmpty", []() -> std::unique_ptr { + return std::make_unique(tl2::benchmarks::VrutoytopLevelUnionEmpty{}); + }); + + struct tl2_cases_bytes_TestArray_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestArray object; + explicit tl2_cases_bytes_TestArray_tl_object(tl2::cases_bytes::TestArray o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testArray", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestArray{}); + }); + + struct tl2_cases_bytes_TestDictAny_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestDictAny object; + explicit tl2_cases_bytes_TestDictAny_tl_object(tl2::cases_bytes::TestDictAny o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testDictAny", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestDictAny{}); + }); + + struct tl2_cases_bytes_TestDictInt_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestDictInt object; + explicit tl2_cases_bytes_TestDictInt_tl_object(tl2::cases_bytes::TestDictInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testDictInt", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestDictInt{}); + }); + + struct tl2_cases_bytes_TestDictString_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestDictString object; + explicit tl2_cases_bytes_TestDictString_tl_object(tl2::cases_bytes::TestDictString o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testDictString", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestDictString{}); + }); + + struct tl2_cases_bytes_TestDictStringString_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestDictStringString object; + explicit tl2_cases_bytes_TestDictStringString_tl_object(tl2::cases_bytes::TestDictStringString o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testDictStringString", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestDictStringString{}); + }); + + struct tl2_cases_bytes_TestEnum1_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestEnum1 object; + explicit tl2_cases_bytes_TestEnum1_tl_object(tl2::cases_bytes::TestEnum1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testEnum1", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestEnum1{}); + }); + + struct tl2_cases_bytes_TestEnum2_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestEnum2 object; + explicit tl2_cases_bytes_TestEnum2_tl_object(tl2::cases_bytes::TestEnum2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testEnum2", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestEnum2{}); + }); + + struct tl2_cases_bytes_TestEnum3_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestEnum3 object; + explicit tl2_cases_bytes_TestEnum3_tl_object(tl2::cases_bytes::TestEnum3 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testEnum3", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestEnum3{}); + }); + + struct tl2_cases_bytes_TestEnumContainer_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestEnumContainer object; + explicit tl2_cases_bytes_TestEnumContainer_tl_object(tl2::cases_bytes::TestEnumContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testEnumContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestEnumContainer{}); + }); + + struct tl2_cases_bytes_TestTuple_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestTuple object; + explicit tl2_cases_bytes_TestTuple_tl_object(tl2::cases_bytes::TestTuple o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testTuple", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestTuple{}); + }); + + struct tl2_cases_bytes_TestVector_tl_object : public tl2::meta::tl_object { + tl2::cases_bytes::TestVector object; + explicit tl2_cases_bytes_TestVector_tl_object(tl2::cases_bytes::TestVector o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases_bytes.testVector", []() -> std::unique_ptr { + return std::make_unique(tl2::cases_bytes::TestVector{}); + }); + + struct tl2_cases_MyCycle1_tl_object : public tl2::meta::tl_object { + tl2::cases::MyCycle1 object; + explicit tl2_cases_MyCycle1_tl_object(tl2::cases::MyCycle1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.myCycle1", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::MyCycle1{}); + }); + + struct tl2_cases_MyCycle2_tl_object : public tl2::meta::tl_object { + tl2::cases::MyCycle2 object; + explicit tl2_cases_MyCycle2_tl_object(tl2::cases::MyCycle2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.myCycle2", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::MyCycle2{}); + }); + + struct tl2_cases_MyCycle3_tl_object : public tl2::meta::tl_object { + tl2::cases::MyCycle3 object; + explicit tl2_cases_MyCycle3_tl_object(tl2::cases::MyCycle3 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.myCycle3", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::MyCycle3{}); + }); + + struct tl2_cases_Replace7_tl_object : public tl2::meta::tl_object { + tl2::cases::Replace7 object; + explicit tl2_cases_Replace7_tl_object(tl2::cases::Replace7 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.replace7", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::Replace7{}); + }); + + struct tl2_cases_Replace7plus_tl_object : public tl2::meta::tl_object { + tl2::cases::Replace7plus object; + explicit tl2_cases_Replace7plus_tl_object(tl2::cases::Replace7plus o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.replace7plus", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::Replace7plus{}); + }); + + struct tl2_cases_Replace7plusplus_tl_object : public tl2::meta::tl_object { + tl2::cases::Replace7plusplus object; + explicit tl2_cases_Replace7plusplus_tl_object(tl2::cases::Replace7plusplus o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.replace7plusplus", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::Replace7plusplus{}); + }); + + struct tl2_cases_TestAllPossibleFieldConfigsContainer_tl_object : public tl2::meta::tl_object { + tl2::cases::TestAllPossibleFieldConfigsContainer object; + explicit tl2_cases_TestAllPossibleFieldConfigsContainer_tl_object(tl2::cases::TestAllPossibleFieldConfigsContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testAllPossibleFieldConfigsContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestAllPossibleFieldConfigsContainer{}); + }); + + struct tl2_cases_TestArray_tl_object : public tl2::meta::tl_object { + tl2::cases::TestArray object; + explicit tl2_cases_TestArray_tl_object(tl2::cases::TestArray o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testArray", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestArray{}); + }); + + struct tl2_cases_TestBeforeReadBitValidation_tl_object : public tl2::meta::tl_object { + tl2::cases::TestBeforeReadBitValidation object; + explicit tl2_cases_TestBeforeReadBitValidation_tl_object(tl2::cases::TestBeforeReadBitValidation o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testBeforeReadBitValidation", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestBeforeReadBitValidation{}); + }); + + struct tl2_cases_TestDictAny_tl_object : public tl2::meta::tl_object { + tl2::cases::TestDictAny object; + explicit tl2_cases_TestDictAny_tl_object(tl2::cases::TestDictAny o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testDictAny", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestDictAny{}); + }); + + struct tl2_cases_TestDictInt_tl_object : public tl2::meta::tl_object { + tl2::cases::TestDictInt object; + explicit tl2_cases_TestDictInt_tl_object(tl2::cases::TestDictInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testDictInt", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestDictInt{}); + }); + + struct tl2_cases_TestDictString_tl_object : public tl2::meta::tl_object { + tl2::cases::TestDictString object; + explicit tl2_cases_TestDictString_tl_object(tl2::cases::TestDictString o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testDictString", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestDictString{}); + }); + + struct tl2_cases_TestEnum1_tl_object : public tl2::meta::tl_object { + tl2::cases::TestEnum1 object; + explicit tl2_cases_TestEnum1_tl_object(tl2::cases::TestEnum1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testEnum1", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestEnum1{}); + }); + + struct tl2_cases_TestEnum2_tl_object : public tl2::meta::tl_object { + tl2::cases::TestEnum2 object; + explicit tl2_cases_TestEnum2_tl_object(tl2::cases::TestEnum2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testEnum2", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestEnum2{}); + }); + + struct tl2_cases_TestEnum3_tl_object : public tl2::meta::tl_object { + tl2::cases::TestEnum3 object; + explicit tl2_cases_TestEnum3_tl_object(tl2::cases::TestEnum3 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testEnum3", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestEnum3{}); + }); + + struct tl2_cases_TestEnumContainer_tl_object : public tl2::meta::tl_object { + tl2::cases::TestEnumContainer object; + explicit tl2_cases_TestEnumContainer_tl_object(tl2::cases::TestEnumContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testEnumContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestEnumContainer{}); + }); + + struct tl2_cases_TestLocalFieldmask_tl_object : public tl2::meta::tl_object { + tl2::cases::TestLocalFieldmask object; + explicit tl2_cases_TestLocalFieldmask_tl_object(tl2::cases::TestLocalFieldmask o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testLocalFieldmask", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestLocalFieldmask{}); + }); + + struct tl2_cases_TestMaybe_tl_object : public tl2::meta::tl_object { + tl2::cases::TestMaybe object; + explicit tl2_cases_TestMaybe_tl_object(tl2::cases::TestMaybe o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testMaybe", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestMaybe{}); + }); + + struct tl2_cases_TestOutFieldMaskContainer_tl_object : public tl2::meta::tl_object { + tl2::cases::TestOutFieldMaskContainer object; + explicit tl2_cases_TestOutFieldMaskContainer_tl_object(tl2::cases::TestOutFieldMaskContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testOutFieldMaskContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestOutFieldMaskContainer{}); + }); + + struct tl2_cases_TestRecursiveFieldMask_tl_object : public tl2::meta::tl_object { + tl2::cases::TestRecursiveFieldMask object; + explicit tl2_cases_TestRecursiveFieldMask_tl_object(tl2::cases::TestRecursiveFieldMask o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testRecursiveFieldMask", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestRecursiveFieldMask{}); + }); + + struct tl2_cases_TestTuple_tl_object : public tl2::meta::tl_object { + tl2::cases::TestTuple object; + explicit tl2_cases_TestTuple_tl_object(tl2::cases::TestTuple o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testTuple", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestTuple{}); + }); + + struct tl2_cases_TestUnion1_tl_object : public tl2::meta::tl_object { + tl2::cases::TestUnion1 object; + explicit tl2_cases_TestUnion1_tl_object(tl2::cases::TestUnion1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testUnion1", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestUnion1{}); + }); + + struct tl2_cases_TestUnion2_tl_object : public tl2::meta::tl_object { + tl2::cases::TestUnion2 object; + explicit tl2_cases_TestUnion2_tl_object(tl2::cases::TestUnion2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testUnion2", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestUnion2{}); + }); + + struct tl2_cases_TestUnionContainer_tl_object : public tl2::meta::tl_object { + tl2::cases::TestUnionContainer object; + explicit tl2_cases_TestUnionContainer_tl_object(tl2::cases::TestUnionContainer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testUnionContainer", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestUnionContainer{}); + }); + + struct tl2_cases_TestVector_tl_object : public tl2::meta::tl_object { + tl2::cases::TestVector object; + explicit tl2_cases_TestVector_tl_object(tl2::cases::TestVector o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("cases.testVector", []() -> std::unique_ptr { + return std::make_unique(tl2::cases::TestVector{}); + }); + + struct tl2_True_tl_object : public tl2::meta::tl_object { + tl2::True object; + explicit tl2_True_tl_object(tl2::True o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("true", []() -> std::unique_ptr { + return std::make_unique(tl2::True{}); + }); + +} diff --git a/internal/tlcodegen/test/gen/cases_cpp/__factory/headers.hpp b/internal/tlcodegen/test/gen/cases_cpp/__factory/headers.hpp new file mode 100644 index 00000000..2b9f810c --- /dev/null +++ b/internal/tlcodegen/test/gen/cases_cpp/__factory/headers.hpp @@ -0,0 +1,7 @@ + +#pragma once +namespace tl2 { + namespace factory { + void set_all_factories(); + } +} \ No newline at end of file diff --git a/internal/tlcodegen/test/gen/cases_cpp/__meta/details.cpp b/internal/tlcodegen/test/gen/cases_cpp/__meta/details.cpp new file mode 100644 index 00000000..23a13c3f --- /dev/null +++ b/internal/tlcodegen/test/gen/cases_cpp/__meta/details.cpp @@ -0,0 +1,95 @@ +#include "../a_tlgen_helpers_code.hpp" + +#include + +#include "headers.hpp" + +namespace { + struct tl_items { + public: + std::map items; + tl_items(); + }; + + tl_items items; + std::function()> no_object_generator = []() -> std::unique_ptr { + throw std::runtime_error("no generation for this type of objects"); + }; + std::function()> no_function_generator = []() -> std::unique_ptr { + throw std::runtime_error("no generation for this type of functions"); + }; +} + +tl2::meta::tl_item tl2::meta::get_item_by_name(std::string &&s) { + if (items.items.count(s)) { + return items.items[s]; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +void tl2::meta::set_create_object_by_name(std::string &&s, std::function()>&& gen) { + if (items.items.count(s)) { + items.items[s].create_object = gen; + return; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +void tl2::meta::set_create_function_by_name(std::string &&s, std::function()>&& gen) { + if (items.items.count(s)) { + items.items[s].create_function = gen; + return; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +tl_items::tl_items() { + (this->items)["benchmarks.vruhash"] = tl2::meta::tl_item{.tag=0xd31bd0fd,.annotations=0x0,.name="benchmarks.vruhash",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchmarks.vruposition"] = tl2::meta::tl_item{.tag=0x32792c04,.annotations=0x0,.name="benchmarks.vruposition",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchmarks.vrutoyTopLevelContainer"] = tl2::meta::tl_item{.tag=0xfb442ca5,.annotations=0x0,.name="benchmarks.vrutoyTopLevelContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchmarks.vrutoyTopLevelContainerWithDependency"] = tl2::meta::tl_item{.tag=0xc176008e,.annotations=0x0,.name="benchmarks.vrutoyTopLevelContainerWithDependency",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchmarks.vrutoytopLevelUnionBig"] = tl2::meta::tl_item{.tag=0xef556bee,.annotations=0x0,.name="benchmarks.vrutoytopLevelUnionBig",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchmarks.vrutoytopLevelUnionEmpty"] = tl2::meta::tl_item{.tag=0xce27c770,.annotations=0x0,.name="benchmarks.vrutoytopLevelUnionEmpty",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testArray"] = tl2::meta::tl_item{.tag=0x3762fb81,.annotations=0x0,.name="cases_bytes.testArray",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testDictAny"] = tl2::meta::tl_item{.tag=0x5a5fce57,.annotations=0x0,.name="cases_bytes.testDictAny",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testDictInt"] = tl2::meta::tl_item{.tag=0x453ace07,.annotations=0x0,.name="cases_bytes.testDictInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testDictString"] = tl2::meta::tl_item{.tag=0x6c04d6ce,.annotations=0x0,.name="cases_bytes.testDictString",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testDictStringString"] = tl2::meta::tl_item{.tag=0xad69c772,.annotations=0x0,.name="cases_bytes.testDictStringString",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testEnum1"] = tl2::meta::tl_item{.tag=0x58aad3f5,.annotations=0x0,.name="cases_bytes.testEnum1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testEnum2"] = tl2::meta::tl_item{.tag=0x00b47add,.annotations=0x0,.name="cases_bytes.testEnum2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testEnum3"] = tl2::meta::tl_item{.tag=0x81911ffa,.annotations=0x0,.name="cases_bytes.testEnum3",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testEnumContainer"] = tl2::meta::tl_item{.tag=0x32b92037,.annotations=0x0,.name="cases_bytes.testEnumContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testTuple"] = tl2::meta::tl_item{.tag=0x2dd3bacf,.annotations=0x0,.name="cases_bytes.testTuple",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases_bytes.testVector"] = tl2::meta::tl_item{.tag=0x3647c8ae,.annotations=0x0,.name="cases_bytes.testVector",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.myCycle1"] = tl2::meta::tl_item{.tag=0xd3ca919d,.annotations=0x0,.name="cases.myCycle1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.myCycle2"] = tl2::meta::tl_item{.tag=0x5444c9a2,.annotations=0x0,.name="cases.myCycle2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.myCycle3"] = tl2::meta::tl_item{.tag=0x7624f86b,.annotations=0x0,.name="cases.myCycle3",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.replace7"] = tl2::meta::tl_item{.tag=0x6ccce4be,.annotations=0x0,.name="cases.replace7",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.replace7plus"] = tl2::meta::tl_item{.tag=0x197858f5,.annotations=0x0,.name="cases.replace7plus",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.replace7plusplus"] = tl2::meta::tl_item{.tag=0xabc39b68,.annotations=0x0,.name="cases.replace7plusplus",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testAllPossibleFieldConfigsContainer"] = tl2::meta::tl_item{.tag=0xe3fae936,.annotations=0x0,.name="cases.testAllPossibleFieldConfigsContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testArray"] = tl2::meta::tl_item{.tag=0xa888030d,.annotations=0x0,.name="cases.testArray",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testBeforeReadBitValidation"] = tl2::meta::tl_item{.tag=0x9b2396db,.annotations=0x0,.name="cases.testBeforeReadBitValidation",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testDictAny"] = tl2::meta::tl_item{.tag=0xe29b8ae6,.annotations=0x0,.name="cases.testDictAny",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testDictInt"] = tl2::meta::tl_item{.tag=0xd3877643,.annotations=0x0,.name="cases.testDictInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testDictString"] = tl2::meta::tl_item{.tag=0xc463c79b,.annotations=0x0,.name="cases.testDictString",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testEnum1"] = tl2::meta::tl_item{.tag=0x6c6c55ac,.annotations=0x0,.name="cases.testEnum1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testEnum2"] = tl2::meta::tl_item{.tag=0x86ea88ce,.annotations=0x0,.name="cases.testEnum2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testEnum3"] = tl2::meta::tl_item{.tag=0x69b83e2f,.annotations=0x0,.name="cases.testEnum3",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testEnumContainer"] = tl2::meta::tl_item{.tag=0xcb684231,.annotations=0x0,.name="cases.testEnumContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testLocalFieldmask"] = tl2::meta::tl_item{.tag=0xf68fd3f9,.annotations=0x0,.name="cases.testLocalFieldmask",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testMaybe"] = tl2::meta::tl_item{.tag=0xd6602613,.annotations=0x0,.name="cases.testMaybe",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testOutFieldMaskContainer"] = tl2::meta::tl_item{.tag=0x1850ffe4,.annotations=0x0,.name="cases.testOutFieldMaskContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testRecursiveFieldMask"] = tl2::meta::tl_item{.tag=0xc58cf85e,.annotations=0x0,.name="cases.testRecursiveFieldMask",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testTuple"] = tl2::meta::tl_item{.tag=0x4b9caf8f,.annotations=0x0,.name="cases.testTuple",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testUnion1"] = tl2::meta::tl_item{.tag=0x4b4f09b1,.annotations=0x0,.name="cases.testUnion1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testUnion2"] = tl2::meta::tl_item{.tag=0x464f96c4,.annotations=0x0,.name="cases.testUnion2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testUnionContainer"] = tl2::meta::tl_item{.tag=0x4497a381,.annotations=0x0,.name="cases.testUnionContainer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["cases.testVector"] = tl2::meta::tl_item{.tag=0x4975695c,.annotations=0x0,.name="cases.testVector",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["int"] = tl2::meta::tl_item{.tag=0xa8509bda,.annotations=0x0,.name="int",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["int32"] = tl2::meta::tl_item{.tag=0x7934e71f,.annotations=0x0,.name="int32",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["int64"] = tl2::meta::tl_item{.tag=0xf5609de0,.annotations=0x0,.name="int64",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["long"] = tl2::meta::tl_item{.tag=0x22076cba,.annotations=0x0,.name="long",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["string"] = tl2::meta::tl_item{.tag=0xb5286e24,.annotations=0x0,.name="string",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["true"] = tl2::meta::tl_item{.tag=0x3fedd339,.annotations=0x0,.name="true",.create_object=no_object_generator,.create_function=no_function_generator}; +} diff --git a/internal/tlcodegen/test/gen/cases_cpp/__meta/headers.hpp b/internal/tlcodegen/test/gen/cases_cpp/__meta/headers.hpp new file mode 100644 index 00000000..c539d5e5 --- /dev/null +++ b/internal/tlcodegen/test/gen/cases_cpp/__meta/headers.hpp @@ -0,0 +1,42 @@ + +#pragma once + +#include +#include + +#include "../a_tlgen_helpers_code.hpp" + +namespace tl2 { + namespace meta { + struct tl_object { + virtual bool read(::basictl::tl_istream &s) = 0; + virtual bool write(::basictl::tl_ostream &s) = 0; + + virtual bool read_boxed(::basictl::tl_istream &s) = 0; + virtual bool write_boxed(::basictl::tl_ostream &s) = 0; + + virtual ~tl_object() = default; + }; + + struct tl_function : public tl_object { + virtual bool read_write_result(::basictl::tl_istream &in, ::basictl::tl_ostream &out) = 0; + + virtual ~tl_function() = default; + }; + + struct tl_item { + uint32_t tag{}; + uint32_t annotations{}; + std::string name; + + std::function()> create_object; + std::function()> create_function; + }; + + tl_item get_item_by_name(std::string &&s); + + void set_create_object_by_name(std::string &&s, std::function()> &&factory); + void set_create_function_by_name(std::string &&s, std::function()> &&factory); + + } +} \ No newline at end of file diff --git a/internal/tlcodegen/test/gen/schema_cpp/Makefile b/internal/tlcodegen/test/gen/schema_cpp/Makefile new file mode 100644 index 00000000..24392a02 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/Makefile @@ -0,0 +1,41 @@ + +CC = g++ +CFLAGS = -std=c++17 -O3 -Wno-noexcept-type -g -Wall -Wextra -Werror=return-type -Wno-unused-parameter +all: main.o __build/__common.o __build/__independent_types.o __build/antispam.o __build/pkg2.o __build/service1.o __build/service2.o __build/service3.o __build/service4.o __build/service5.o __build/service6.o __build/tasks.o __build/tree_stats.o __build/unique.o + $(CC) $(CFLAGS) -o all main.o __build/__common.o __build/__independent_types.o __build/antispam.o __build/pkg2.o __build/service1.o __build/service2.o __build/service3.o __build/service4.o __build/service5.o __build/service6.o __build/tasks.o __build/tree_stats.o __build/unique.o + +main.o: main.cpp + $(CC) $(CFLAGS) -c main.cpp + +__build/__meta.o: __meta/headers.hpp __meta/details.cpp + $(CC) $(CFLAGS) -o __build/__meta.o -c __meta/details.cpp + +__build/__factory.o: __factory/headers.hpp __factory/details.cpp __common/types/withFloat.hpp __common/types/vector.hpp unique/functions/unique.stringToInt.hpp unique/functions/unique.get.hpp __common/types/tuple.hpp tree_stats/types/tree_stats.objectLimitValueLong.hpp tasks/types/tasks.TaskStatusItems.hpp tasks/types/tasks.taskInfo.hpp tasks/types/tasks.queueTypeInfo.hpp tasks/types/tasks.queueTypeSettings.hpp tasks/types/tasks.queueStats.hpp tasks/functions/tasks.getTaskFromQueue.hpp tasks/functions/tasks.getQueueTypes.hpp tasks/functions/tasks.getQueueSize.hpp tasks/functions/tasks.getAnyTask.hpp tasks/types/tasks.cronTaskWithId.hpp tasks/types/tasks.cronTask.hpp tasks/types/tasks.cronTime.hpp tasks/functions/tasks.addTask.hpp tasks/types/tasks.task.hpp __common/types/string.hpp __common/types/statOne.hpp service6/functions/service6.multiFindWithBounds.hpp service6/functions/service6.multiFind.hpp service6/types/service6.findWithBoundsResult.hpp service5/functions/service5.query.hpp service5/functions/service5.performQuery.hpp service5/types/service5.params.hpp service5/types/service5.Output.hpp service5/types/service5.stringOutput.hpp service5/functions/service5.insert.hpp service5/types/service5.emptyOutput.hpp service4/types/service4.modifiedNewsEntry.hpp service4/types/service4.object.hpp service3/functions/service3.setLimits.hpp service3/functions/service3.setLastVisitTimestamp.hpp service3/functions/service3.restoreProduct.hpp service3/functions/service3.restoreGroupedProducts.hpp service3/functions/service3.restoreAllProducts.hpp service3/types/service3.productStatsOld.hpp service3/types/service3.limits.hpp service3/types/service3.groupSizeLimit.hpp service3/types/service3.groupCountLimit.hpp service3/functions/service3.getScheduledProducts.hpp service3/functions/service3.getProducts.hpp service3/functions/service3.getProductStats.hpp service3/functions/service3.getLimits.hpp service3/functions/service3.getLastVisitTimestamp.hpp service3/functions/service3.deleteProduct.hpp service3/functions/service3.deleteGroupedProducts.hpp service3/functions/service3.deleteAllProducts.hpp service3/functions/service3.createProduct.hpp service2/functions/service2.setObjectTtl.hpp service2/functions/service2.set.hpp service2/functions/service2.addOrIncrMany.hpp service1/functions/service1.touch.hpp service1/functions/service1.setOrIncr.hpp service1/functions/service1.set.hpp service1/functions/service1.replaceOrIncr.hpp service1/functions/service1.replace.hpp service1/types/service1.keysStat.hpp service1/functions/service1.incr.hpp service1/functions/service1.getWildcardWithFlags.hpp service1/functions/service1.getWildcardList.hpp service1/functions/service1.getWildcardDict.hpp service1/functions/service1.getWildcard.hpp service1/functions/service1.getKeysStatPeriods.hpp service1/functions/service1.getKeysStat.hpp service1/functions/service1.getExpireTime.hpp service1/functions/service1.get.hpp service1/functions/service1.exists.hpp service1/functions/service1.enableKeysStat.hpp service1/functions/service1.enableExpiration.hpp service1/functions/service1.disableKeysStat.hpp service1/functions/service1.disableExpiration.hpp service1/functions/service1.delete.hpp service1/functions/service1.decr.hpp service1/functions/service1.cas.hpp service1/functions/service1.append.hpp service1/functions/service1.addOrIncr.hpp service1/functions/service1.addOrGet.hpp service1/functions/service1.add.hpp __common/types/rpcInvokeReqExtra.hpp __common/types/true.hpp pkg2/types/pkg2.t1.hpp pkg2/types/pkg2.foo.hpp __common/types/nonOptNat.hpp __common/types/myTwoDicts.hpp __common/types/myMcValueVector.hpp __common/types/myMcValueTuple.hpp __common/types/myMcValue.hpp __common/types/myBoxedVectorSlice.hpp __common/types/long.hpp __common/types/issue3498.hpp service6/types/service6.findResultRow.hpp service6/types/service6.error.hpp __common/types/int.hpp __common/functions/getStats.hpp tasks/types/tasks.queueTypeStats.hpp __common/functions/getNonOptNat.hpp __common/functions/getMyValue.hpp __common/types/MyValue.hpp __common/types/myString.hpp __common/types/myInt.hpp __common/functions/getMyDouble.hpp __common/types/myDouble.hpp __common/functions/getMyDictOfInt.hpp __common/types/myDictOfInt.hpp __common/functions/getMaybeIface.hpp service1/types/service1.Value.hpp service1/types/service1.strvalueWithTime.hpp service1/types/service1.strvalue.hpp service1/types/service1.not_found.hpp service1/types/service1.longvalueWithTime.hpp service1/types/service1.longvalue.hpp __common/functions/getFloat.hpp __common/functions/getDouble.hpp __common/functions/get_arrays.hpp __common/types/float.hpp __common/types/fieldConflict4.hpp __common/types/fieldConflict3.hpp __common/types/fieldConflict2.hpp __common/types/fieldConflict1.hpp __common/types/double.hpp __common/types/dictionary.hpp __common/functions/boxedVector64.hpp __common/functions/boxedVector32BoxedElem.hpp __common/functions/boxedVector32.hpp __common/functions/boxedTupleSlice3.hpp __common/functions/boxedTupleSlice2.hpp __common/types/myBoxedTupleSlice.hpp __common/functions/boxedTupleSlice1.hpp __common/functions/boxedTuple.hpp __common/functions/boxedString.hpp __common/functions/boxedInt.hpp __common/functions/boxedArray.hpp __common/types/myBoxedArray.hpp __common/types/boolStat.hpp __common/types/Bool.hpp __common/types/benchObject.hpp __common/types/integer.hpp antispam/types/antispam.PatternFull.hpp antispam/types/antispam.patternNotFound.hpp antispam/types/antispam.patternFound.hpp antispam/functions/antispam.getPattern.hpp + $(CC) $(CFLAGS) -o __build/__factory.o -c __factory/details.cpp + +__build/__common.o: __common/details/namespace_details.cpp __common/details/namespace_details.cpp __common/details/headers/Bool.hpp __common/details/headers/dictionary.hpp __common/details/headers/dictionaryField.hpp __common/details/headers/int.hpp __common/details/headers/true.hpp __common/details/headers/tuple.hpp __common/details/headers/vector.hpp + $(CC) $(CFLAGS) -o __build/__common.o -c __common/details/namespace_details.cpp +__build/__independent_types.o: __independent_types/details/namespace_details.cpp __independent_types/details/namespace_details.cpp __independent_types/details/headers/Either.hpp __independent_types/details/headers/MyValue.hpp __independent_types/details/headers/benchObject.hpp __independent_types/details/headers/boxedArray.hpp __independent_types/details/headers/boxedInt.hpp __independent_types/details/headers/boxedString.hpp __independent_types/details/headers/boxedTuple.hpp __independent_types/details/headers/boxedTupleSlice1.hpp __independent_types/details/headers/boxedTupleSlice2.hpp __independent_types/details/headers/boxedTupleSlice3.hpp __independent_types/details/headers/boxedVector32.hpp __independent_types/details/headers/boxedVector32BoxedElem.hpp __independent_types/details/headers/boxedVector64.hpp __independent_types/details/headers/double.hpp __independent_types/details/headers/fieldConflict1.hpp __independent_types/details/headers/fieldConflict2.hpp __independent_types/details/headers/fieldConflict3.hpp __independent_types/details/headers/fieldConflict4.hpp __independent_types/details/headers/float.hpp __independent_types/details/headers/getDouble.hpp __independent_types/details/headers/getFloat.hpp __independent_types/details/headers/getMaybeIface.hpp __independent_types/details/headers/getMyDictOfInt.hpp __independent_types/details/headers/getMyDouble.hpp __independent_types/details/headers/getMyValue.hpp __independent_types/details/headers/getNonOptNat.hpp __independent_types/details/headers/getStats.hpp __independent_types/details/headers/get_arrays.hpp __independent_types/details/headers/int.hpp __independent_types/details/headers/integer.hpp __independent_types/details/headers/issue3498.hpp __independent_types/details/headers/left.hpp __independent_types/details/headers/long.hpp __independent_types/details/headers/map.hpp __independent_types/details/headers/myAnonMcValue.hpp __independent_types/details/headers/myBoxedArray.hpp __independent_types/details/headers/myBoxedTupleSlice.hpp __independent_types/details/headers/myBoxedVectorSlice.hpp __independent_types/details/headers/myDictOfInt.hpp __independent_types/details/headers/myDouble.hpp __independent_types/details/headers/myInt.hpp __independent_types/details/headers/myMaybe1.hpp __independent_types/details/headers/myMaybe2.hpp __independent_types/details/headers/myMcValue.hpp __independent_types/details/headers/myMcValueTuple.hpp __independent_types/details/headers/myMcValueVector.hpp __independent_types/details/headers/myString.hpp __independent_types/details/headers/myTuple.hpp __independent_types/details/headers/myTwoDicts.hpp __independent_types/details/headers/nonOptNat.hpp __independent_types/details/headers/right.hpp __independent_types/details/headers/rpcInvokeReqExtra.hpp __independent_types/details/headers/statOne.hpp __independent_types/details/headers/string.hpp __independent_types/details/headers/tuple.hpp __independent_types/details/headers/vector.hpp __independent_types/details/headers/withFloat.hpp + $(CC) $(CFLAGS) -o __build/__independent_types.o -c __independent_types/details/namespace_details.cpp +__build/antispam.o: antispam/details/namespace_details.cpp antispam/details/namespace_details.cpp antispam/details/headers/antispam.PatternFull.hpp antispam/details/headers/antispam.getPattern.hpp antispam/details/headers/antispam.patternFound.hpp antispam/details/headers/antispam.patternNotFound.hpp + $(CC) $(CFLAGS) -o __build/antispam.o -c antispam/details/namespace_details.cpp +__build/pkg2.o: pkg2/details/namespace_details.cpp pkg2/details/namespace_details.cpp pkg2/details/headers/pkg2.foo.hpp pkg2/details/headers/pkg2.t1.hpp pkg2/details/headers/pkg2.t2.hpp + $(CC) $(CFLAGS) -o __build/pkg2.o -c pkg2/details/namespace_details.cpp +__build/service1.o: service1/details/namespace_details.cpp service1/details/namespace_details.cpp service1/details/headers/service1.Value.hpp service1/details/headers/service1.add.hpp service1/details/headers/service1.addOrGet.hpp service1/details/headers/service1.addOrIncr.hpp service1/details/headers/service1.append.hpp service1/details/headers/service1.cas.hpp service1/details/headers/service1.decr.hpp service1/details/headers/service1.delete.hpp service1/details/headers/service1.disableExpiration.hpp service1/details/headers/service1.disableKeysStat.hpp service1/details/headers/service1.enableExpiration.hpp service1/details/headers/service1.enableKeysStat.hpp service1/details/headers/service1.exists.hpp service1/details/headers/service1.get.hpp service1/details/headers/service1.getExpireTime.hpp service1/details/headers/service1.getKeysStat.hpp service1/details/headers/service1.getKeysStatPeriods.hpp service1/details/headers/service1.getWildcard.hpp service1/details/headers/service1.getWildcardDict.hpp service1/details/headers/service1.getWildcardList.hpp service1/details/headers/service1.getWildcardWithFlags.hpp service1/details/headers/service1.incr.hpp service1/details/headers/service1.keysStat.hpp service1/details/headers/service1.longvalue.hpp service1/details/headers/service1.longvalueWithTime.hpp service1/details/headers/service1.not_found.hpp service1/details/headers/service1.replace.hpp service1/details/headers/service1.replaceOrIncr.hpp service1/details/headers/service1.set.hpp service1/details/headers/service1.setOrIncr.hpp service1/details/headers/service1.strvalue.hpp service1/details/headers/service1.strvalueWithTime.hpp service1/details/headers/service1.touch.hpp service1/details/headers/service1_dictionary.hpp service1/details/headers/service1_dictionaryField.hpp service1/details/headers/service1_vector.hpp + $(CC) $(CFLAGS) -o __build/service1.o -c service1/details/namespace_details.cpp +__build/service2.o: service2/details/namespace_details.cpp service2/details/namespace_details.cpp service2/details/headers/service2.addOrIncrMany.hpp service2/details/headers/service2.counterSet.hpp service2/details/headers/service2.deltaSet.hpp service2/details/headers/service2.objectId.hpp service2/details/headers/service2.set.hpp service2/details/headers/service2.setObjectTtl.hpp service2/details/headers/service2_double.hpp service2/details/headers/service2_tuple.hpp + $(CC) $(CFLAGS) -o __build/service2.o -c service2/details/namespace_details.cpp +__build/service3.o: service3/details/namespace_details.cpp service3/details/namespace_details.cpp service3/details/headers/service3.createProduct.hpp service3/details/headers/service3.deleteAllProducts.hpp service3/details/headers/service3.deleteGroupedProducts.hpp service3/details/headers/service3.deleteProduct.hpp service3/details/headers/service3.getLastVisitTimestamp.hpp service3/details/headers/service3.getLimits.hpp service3/details/headers/service3.getProductStats.hpp service3/details/headers/service3.getProducts.hpp service3/details/headers/service3.getScheduledProducts.hpp service3/details/headers/service3.groupCountLimit.hpp service3/details/headers/service3.groupSizeLimit.hpp service3/details/headers/service3.limits.hpp service3/details/headers/service3.product.hpp service3/details/headers/service3.productStatsOld.hpp service3/details/headers/service3.restoreAllProducts.hpp service3/details/headers/service3.restoreGroupedProducts.hpp service3/details/headers/service3.restoreProduct.hpp service3/details/headers/service3.setLastVisitTimestamp.hpp service3/details/headers/service3.setLimits.hpp service3/details/headers/service3_boolStat.hpp service3/details/headers/service3_vector.hpp + $(CC) $(CFLAGS) -o __build/service3.o -c service3/details/namespace_details.cpp +__build/service4.o: service4/details/namespace_details.cpp service4/details/namespace_details.cpp service4/details/headers/service4.modifiedNewsEntry.hpp service4/details/headers/service4.object.hpp + $(CC) $(CFLAGS) -o __build/service4.o -c service4/details/namespace_details.cpp +__build/service5.o: service5/details/namespace_details.cpp service5/details/namespace_details.cpp service5/details/headers/service5.Output.hpp service5/details/headers/service5.emptyOutput.hpp service5/details/headers/service5.insert.hpp service5/details/headers/service5.params.hpp service5/details/headers/service5.performQuery.hpp service5/details/headers/service5.query.hpp service5/details/headers/service5.stringOutput.hpp + $(CC) $(CFLAGS) -o __build/service5.o -c service5/details/namespace_details.cpp +__build/service6.o: service6/details/namespace_details.cpp service6/details/namespace_details.cpp service6/details/headers/service6.error.hpp service6/details/headers/service6.findResultRow.hpp service6/details/headers/service6.findWithBoundsResult.hpp service6/details/headers/service6.multiFind.hpp service6/details/headers/service6.multiFindWithBounds.hpp + $(CC) $(CFLAGS) -o __build/service6.o -c service6/details/namespace_details.cpp +__build/tasks.o: tasks/details/namespace_details.cpp tasks/details/namespace_details.cpp tasks/details/headers/tasks.TaskStatus.hpp tasks/details/headers/tasks.TaskStatusItems.hpp tasks/details/headers/tasks.addTask.hpp tasks/details/headers/tasks.cronTask.hpp tasks/details/headers/tasks.cronTaskWithId.hpp tasks/details/headers/tasks.cronTime.hpp tasks/details/headers/tasks.getAnyTask.hpp tasks/details/headers/tasks.getQueueSize.hpp tasks/details/headers/tasks.getQueueTypes.hpp tasks/details/headers/tasks.getTaskFromQueue.hpp tasks/details/headers/tasks.queueStats.hpp tasks/details/headers/tasks.queueTypeInfo.hpp tasks/details/headers/tasks.queueTypeSettings.hpp tasks/details/headers/tasks.queueTypeStats.hpp tasks/details/headers/tasks.task.hpp tasks/details/headers/tasks.taskInfo.hpp + $(CC) $(CFLAGS) -o __build/tasks.o -c tasks/details/namespace_details.cpp +__build/tree_stats.o: tree_stats/details/namespace_details.cpp tree_stats/details/namespace_details.cpp tree_stats/details/headers/tree_stats.ObjectLimitValue.hpp tree_stats/details/headers/tree_stats.objectLimitValueDouble.hpp tree_stats/details/headers/tree_stats.objectLimitValueLong.hpp + $(CC) $(CFLAGS) -o __build/tree_stats.o -c tree_stats/details/namespace_details.cpp +__build/unique.o: unique/details/namespace_details.cpp unique/details/namespace_details.cpp unique/details/headers/unique.get.hpp unique/details/headers/unique.stringToInt.hpp + $(CC) $(CFLAGS) -o __build/unique.o -c unique/details/namespace_details.cpp diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/Bool.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/Bool.hpp new file mode 100644 index 00000000..f996f237 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/Bool.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/Bool.hpp" + +namespace tl2 { namespace details { + +bool BoolReadBoxed(::basictl::tl_istream & s, bool& item); +bool BoolWriteBoxed(::basictl::tl_ostream & s, bool item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionary.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionary.hpp new file mode 100644 index 00000000..b856897b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionary.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/dictionary.hpp" + +namespace tl2 { namespace details { + +void DictionaryIntReset(::tl2::Dictionary& item); +bool DictionaryIntRead(::basictl::tl_istream & s, ::tl2::Dictionary& item); +bool DictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary& item); +bool DictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary& item); +bool DictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionaryField.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionaryField.hpp new file mode 100644 index 00000000..d902c94d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/dictionaryField.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/dictionaryField.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorDictionaryFieldIntReset(std::vector<::tl2::DictionaryField>& item); +bool BuiltinVectorDictionaryFieldIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool BuiltinVectorDictionaryFieldIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryFieldIntReset(::tl2::DictionaryField& item); +bool DictionaryFieldIntRead(::basictl::tl_istream & s, ::tl2::DictionaryField& item); +bool DictionaryFieldIntWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item); +bool DictionaryFieldIntReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField& item); +bool DictionaryFieldIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/int.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/int.hpp new file mode 100644 index 00000000..603539ca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/int.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/int.hpp" + +namespace tl2 { namespace details { + +void BuiltinTupleIntReset(std::vector& item); +bool BuiltinTupleIntRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool BuiltinTupleIntWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorIntReset(std::vector& item); +bool BuiltinVectorIntRead(::basictl::tl_istream & s, std::vector& item); +bool BuiltinVectorIntWrite(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool IntMaybeReadBoxed(::basictl::tl_istream & s, std::optional& item); +bool IntMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/true.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/true.hpp new file mode 100644 index 00000000..658979b2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/true.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/true.hpp" + +namespace tl2 { namespace details { + +void TrueReset(::tl2::True& item); +bool TrueRead(::basictl::tl_istream & s, ::tl2::True& item); +bool TrueWrite(::basictl::tl_ostream & s, const ::tl2::True& item); +bool TrueReadBoxed(::basictl::tl_istream & s, ::tl2::True& item); +bool TrueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::True& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/tuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/tuple.hpp new file mode 100644 index 00000000..46de408f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/tuple.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tuple.hpp" +#include "../../types/int.hpp" + +namespace tl2 { namespace details { + +void TupleIntReset(std::vector& item); +bool TupleIntRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleIntWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); +bool TupleIntReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleIntWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/vector.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/vector.hpp new file mode 100644 index 00000000..689a4137 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/headers/vector.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/vector.hpp" +#include "../../types/dictionaryField.hpp" +#include "../../types/int.hpp" + +namespace tl2 { namespace details { + +void VectorDictionaryFieldIntReset(std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldIntReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldIntWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorIntReset(std::vector& item); +bool VectorIntRead(::basictl::tl_istream & s, std::vector& item); +bool VectorIntWrite(::basictl::tl_ostream & s, const std::vector& item); +bool VectorIntReadBoxed(::basictl::tl_istream & s, std::vector& item); +bool VectorIntWriteBoxed(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/__common/details/namespace_details.cpp new file mode 100644 index 00000000..0b414d85 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/details/namespace_details.cpp @@ -0,0 +1,270 @@ +#include "headers/vector.hpp" +#include "headers/tuple.hpp" +#include "headers/true.hpp" +#include "headers/int.hpp" +#include "headers/dictionary.hpp" +#include "headers/dictionaryField.hpp" +#include "headers/Bool.hpp" + + +bool tl2::details::BoolReadBoxed(::basictl::tl_istream & s, bool& item) { + return s.bool_read(item, 0xbc799737, 0x997275b5); +} + +bool tl2::details::BoolWriteBoxed(::basictl::tl_ostream & s, bool item) { + return s.nat_write(item ? 0x997275b5 : 0xbc799737); +} + +void tl2::details::BuiltinTupleIntReset(std::vector& item) { + item.resize(0); +} + +bool tl2::details::BuiltinTupleIntRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + // TODO - check length sanity + item.resize(nat_n); + for(auto && el : item) { + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTupleIntWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (item.size() != nat_n) + return s.set_error_sequence_length(); + for(const auto & el : item) { + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinVectorDictionaryFieldIntReset(std::vector<::tl2::DictionaryField>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorDictionaryFieldIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::DictionaryFieldIntRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorDictionaryFieldIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::DictionaryFieldIntWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorIntReset(std::vector& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorIntRead(::basictl::tl_istream & s, std::vector& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorIntWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::DictionaryFieldIntReset(::tl2::DictionaryField& item) { + item.key.clear(); + item.value = 0; +} + +bool tl2::details::DictionaryFieldIntRead(::basictl::tl_istream & s, ::tl2::DictionaryField& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldIntWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.value)) { return false;} + return true; +} + +bool tl2::details::DictionaryFieldIntReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField& item) { + if (!s.nat_read_exact_tag(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldIntRead(s, item); +} + +bool tl2::details::DictionaryFieldIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item) { + if (!s.nat_write(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldIntWrite(s, item); +} + +void tl2::details::DictionaryIntReset(::tl2::Dictionary& item) { + item.clear(); +} + +bool tl2::details::DictionaryIntRead(::basictl::tl_istream & s, ::tl2::Dictionary& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary& item) { + if (!s.nat_read_exact_tag(0x1f4c618f)) { return false; } + return tl2::details::DictionaryIntRead(s, item); +} + +bool tl2::details::DictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary& item) { + if (!s.nat_write(0x1f4c618f)) { return false; } + return tl2::details::DictionaryIntWrite(s, item); +} + +bool tl2::details::IntMaybeReadBoxed(::basictl::tl_istream & s, std::optional& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!s.int_read(*item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::IntMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!s.int_write(*item)) { return false;} + } + return true; +} + +bool tl2::True::read(::basictl::tl_istream & s) { + if (!::tl2::details::TrueRead(s, *this)) { return false; } + return true; +} + +bool tl2::True::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TrueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::True::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TrueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::True::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TrueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TrueReset(::tl2::True& item) { +} + +bool tl2::details::TrueRead(::basictl::tl_istream & s, ::tl2::True& item) { + return true; +} + +bool tl2::details::TrueWrite(::basictl::tl_ostream & s, const ::tl2::True& item) { + return true; +} + +bool tl2::details::TrueReadBoxed(::basictl::tl_istream & s, ::tl2::True& item) { + if (!s.nat_read_exact_tag(0x3fedd339)) { return false; } + return tl2::details::TrueRead(s, item); +} + +bool tl2::details::TrueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::True& item) { + if (!s.nat_write(0x3fedd339)) { return false; } + return tl2::details::TrueWrite(s, item); +} + +void tl2::details::TupleIntReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::TupleIntRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleIntRead(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleIntWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleIntWrite(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleIntReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleIntRead(s, item, nat_n); +} + +bool tl2::details::TupleIntWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleIntWrite(s, item, nat_n); +} + +void tl2::details::VectorDictionaryFieldIntReset(std::vector<::tl2::DictionaryField>& item) { + item.clear(); +} + +bool tl2::details::VectorDictionaryFieldIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldIntReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldIntRead(s, item); +} + +bool tl2::details::VectorDictionaryFieldIntWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldIntWrite(s, item); +} + +void tl2::details::VectorIntReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::VectorIntRead(::basictl::tl_istream & s, std::vector& item) { + if (!::tl2::details::BuiltinVectorIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntReadBoxed(::basictl::tl_istream & s, std::vector& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorIntRead(s, item); +} + +bool tl2::details::VectorIntWriteBoxed(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorIntWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedArray.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedArray.hpp new file mode 100644 index 00000000..155fdfbe --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedArray.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/myBoxedArray.hpp" + + +namespace tl2 { +struct BoxedArray { + ::tl2::MyBoxedArray x{}; + + std::string_view tl_name() const { return "boxedArray"; } + uint32_t tl_tag() const { return 0x95dcc8b7; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::MyBoxedArray & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedArray & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedInt.hpp new file mode 100644 index 00000000..09bc4a72 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedInt.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedInt { + int32_t x = 0; + + std::string_view tl_name() const { return "boxedInt"; } + uint32_t tl_tag() const { return 0x5688ebaf; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, int32_t & result); + bool write_result(::basictl::tl_ostream & s, int32_t & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedString.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedString.hpp new file mode 100644 index 00000000..7bf034cc --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedString.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedString { + std::string x; + + std::string_view tl_name() const { return "boxedString"; } + uint32_t tl_tag() const { return 0x548994db; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::string & result); + bool write_result(::basictl::tl_ostream & s, std::string & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTuple.hpp new file mode 100644 index 00000000..1d2be62f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTuple.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedTuple { + std::array x{}; + + std::string_view tl_name() const { return "boxedTuple"; } + uint32_t tl_tag() const { return 0x30c9d533; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::array & result); + bool write_result(::basictl::tl_ostream & s, std::array & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice1.hpp new file mode 100644 index 00000000..95aa0512 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice1.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedTupleSlice1 { + uint32_t n = 0; + std::vector x; + + std::string_view tl_name() const { return "boxedTupleSlice1"; } + uint32_t tl_tag() const { return 0x25230d40; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice2.hpp new file mode 100644 index 00000000..33f22a08 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice2.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/myBoxedTupleSlice.hpp" + + +namespace tl2 { +struct BoxedTupleSlice2 { + ::tl2::MyBoxedTupleSlice x{}; + + std::string_view tl_name() const { return "boxedTupleSlice2"; } + uint32_t tl_tag() const { return 0x1cdf4705; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedTupleSlice & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice3.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice3.hpp new file mode 100644 index 00000000..0639b08b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedTupleSlice3.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedTupleSlice3 { + uint32_t n = 0; + std::vector x; + + std::string_view tl_name() const { return "boxedTupleSlice3"; } + uint32_t tl_tag() const { return 0xa19b8106; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32.hpp new file mode 100644 index 00000000..d484a905 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedVector32 { + std::vector x; + + std::string_view tl_name() const { return "boxedVector32"; } + uint32_t tl_tag() const { return 0xbbadef07; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32BoxedElem.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32BoxedElem.hpp new file mode 100644 index 00000000..ebb49e8a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector32BoxedElem.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedVector32BoxedElem { + std::vector x; + + std::string_view tl_name() const { return "boxedVector32BoxedElem"; } + uint32_t tl_tag() const { return 0x591cecd4; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector64.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector64.hpp new file mode 100644 index 00000000..9e0c7b50 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/boxedVector64.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoxedVector64 { + std::vector x; + + std::string_view tl_name() const { return "boxedVector64"; } + uint32_t tl_tag() const { return 0x83659ba8; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getDouble.hpp new file mode 100644 index 00000000..aa018ae3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getDouble.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct GetDouble { + double x = 0; + + std::string_view tl_name() const { return "getDouble"; } + uint32_t tl_tag() const { return 0x39711d7b; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, double & result); + bool write_result(::basictl::tl_ostream & s, double & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getFloat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getFloat.hpp new file mode 100644 index 00000000..68d14b56 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getFloat.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct GetFloat { + float x = 0; + + std::string_view tl_name() const { return "getFloat"; } + uint32_t tl_tag() const { return 0x25a7bc68; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, float & result); + bool write_result(::basictl::tl_ostream & s, float & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMaybeIface.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMaybeIface.hpp new file mode 100644 index 00000000..a2be57d4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMaybeIface.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service1/types/service1.Value.hpp" + + +namespace tl2 { +struct GetMaybeIface { + ::tl2::service1::Value x; + + std::string_view tl_name() const { return "getMaybeIface"; } + uint32_t tl_tag() const { return 0x6b055ae4; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::Value> & result); + bool write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::Value> & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDictOfInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDictOfInt.hpp new file mode 100644 index 00000000..818e9727 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDictOfInt.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/myDictOfInt.hpp" + + +namespace tl2 { +struct GetMyDictOfInt { + ::tl2::MyDictOfInt x{}; + + std::string_view tl_name() const { return "getMyDictOfInt"; } + uint32_t tl_tag() const { return 0x166f962c; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::MyDictOfInt & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::MyDictOfInt & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDouble.hpp new file mode 100644 index 00000000..073907f8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyDouble.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/myDouble.hpp" + + +namespace tl2 { +struct GetMyDouble { + ::tl2::MyDouble x{}; + + std::string_view tl_name() const { return "getMyDouble"; } + uint32_t tl_tag() const { return 0xb660ad10; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::MyDouble & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::MyDouble & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyValue.hpp new file mode 100644 index 00000000..2af02329 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getMyValue.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/MyValue.hpp" + + +namespace tl2 { +struct GetMyValue { + ::tl2::MyValue x; + + std::string_view tl_name() const { return "getMyValue"; } + uint32_t tl_tag() const { return 0xb3df27fe; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::MyValue & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::MyValue & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getNonOptNat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getNonOptNat.hpp new file mode 100644 index 00000000..10d5bfa2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getNonOptNat.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct GetNonOptNat { + uint32_t n = 0; + std::vector xs; + + std::string_view tl_name() const { return "getNonOptNat"; } + uint32_t tl_tag() const { return 0x67665961; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getStats.hpp new file mode 100644 index 00000000..a5e93b4f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/getStats.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../tasks/types/tasks.queueTypeStats.hpp" + + +namespace tl2 { +struct GetStats { + ::tl2::tasks::QueueTypeStats x{}; + + std::string_view tl_name() const { return "getStats"; } + uint32_t tl_tag() const { return 0xbaa6da35; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueTypeStats & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/functions/get_arrays.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/get_arrays.hpp new file mode 100644 index 00000000..1dd4234f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/functions/get_arrays.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct Get_arrays { + uint32_t n = 0; + std::vector a; + std::array b{}; + + std::string_view tl_name() const { return "get_arrays"; } + uint32_t tl_tag() const { return 0x90658cdb; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::array & result); + bool write_result(::basictl::tl_ostream & s, std::array & result); +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/Bool.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/Bool.hpp new file mode 100644 index 00000000..62a94887 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/Bool.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { + + enum { BoolFalse = 0xbc799737, BoolTrue = 0x997275b5 }; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/Either.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/Either.hpp new file mode 100644 index 00000000..cd53cfac --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/Either.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "right.hpp" +#include "left.hpp" + + +namespace tl2 { +template +struct Either { + std::variant<::tl2::Left, ::tl2::Right> value; + + bool is_left() const { return value.index() == 0; } + bool is_right() const { return value.index() == 1; } + + + std::string_view tl_name() const; + uint32_t tl_tag() const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/MyValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/MyValue.hpp new file mode 100644 index 00000000..b563f397 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/MyValue.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "myString.hpp" +#include "myInt.hpp" + + +namespace tl2 { +struct MyValue { + std::variant<::tl2::MyInt, ::tl2::MyString> value; + + bool is_myInt() const { return value.index() == 0; } + bool is_myString() const { return value.index() == 1; } + + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/benchObject.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/benchObject.hpp new file mode 100644 index 00000000..af331dc8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/benchObject.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "integer.hpp" + + +namespace tl2 { +struct BenchObject { + std::vector xs; + std::vector<::tl2::Integer> ys; + + std::string_view tl_name() const { return "benchObject"; } + uint32_t tl_tag() const { return 0xb697e865; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/boolStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/boolStat.hpp new file mode 100644 index 00000000..7e2f5503 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/boolStat.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct BoolStat { + int32_t statTrue = 0; + int32_t statFalse = 0; + int32_t statUnknown = 0; + + std::string_view tl_name() const { return "boolStat"; } + uint32_t tl_tag() const { return 0x92cbcbfa; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionary.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionary.hpp new file mode 100644 index 00000000..76688e0f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionary.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "dictionaryField.hpp" + + +namespace tl2 { +template +using Dictionary = std::vector<::tl2::DictionaryField>; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionaryField.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionaryField.hpp new file mode 100644 index 00000000..f6340159 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/dictionaryField.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +struct DictionaryField { + std::string key; + t value{}; + + std::string_view tl_name() const { return "dictionaryField"; } + uint32_t tl_tag() const { return 0x239c1b62; } +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/double.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/double.hpp new file mode 100644 index 00000000..780c3a83 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/double.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using Double = double; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict1.hpp new file mode 100644 index 00000000..7e106f5c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict1.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct FieldConflict1 { + int32_t x = 0; + int32_t set_x = 0; + + std::string_view tl_name() const { return "fieldConflict1"; } + uint32_t tl_tag() const { return 0xf314bd09; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict2.hpp new file mode 100644 index 00000000..2db07462 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict2.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct FieldConflict2 { + int32_t x = 0; + int32_t setX = 0; + + std::string_view tl_name() const { return "fieldConflict2"; } + uint32_t tl_tag() const { return 0x1bba76b8; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict3.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict3.hpp new file mode 100644 index 00000000..0e70f61c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict3.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct FieldConflict3 { + int32_t x = 0; + int32_t SetX = 0; + + std::string_view tl_name() const { return "fieldConflict3"; } + uint32_t tl_tag() const { return 0x2cf6e157; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict4.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict4.hpp new file mode 100644 index 00000000..da4abc08 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/fieldConflict4.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct FieldConflict4 { + int32_t X = 0; + int32_t SetX = 0; + + std::string_view tl_name() const { return "fieldConflict4"; } + uint32_t tl_tag() const { return 0xd93c186a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/float.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/float.hpp new file mode 100644 index 00000000..fa9834b7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/float.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using Float = float; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/int.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/int.hpp new file mode 100644 index 00000000..95bcfbc7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/int.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using Int = int32_t; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/integer.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/integer.hpp new file mode 100644 index 00000000..54d69bff --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/integer.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct Integer { + int32_t value = 0; + + std::string_view tl_name() const { return "integer"; } + uint32_t tl_tag() const { return 0x7e194796; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/issue3498.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/issue3498.hpp new file mode 100644 index 00000000..7b5a720f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/issue3498.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service6/types/service6.findResultRow.hpp" +#include "../../service6/types/service6.error.hpp" +#include "Either.hpp" + + +namespace tl2 { +struct Issue3498 { + std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> x; + + std::string_view tl_name() const { return "issue3498"; } + uint32_t tl_tag() const { return 0xf54b7b0a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/left.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/left.hpp new file mode 100644 index 00000000..18a9d7f7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/left.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +struct Left { + X value{}; + + std::string_view tl_name() const { return "left"; } + uint32_t tl_tag() const { return 0x0a29cd5d; } +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/long.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/long.hpp new file mode 100644 index 00000000..cd9546fe --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/long.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using Long = int64_t; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/map.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/map.hpp new file mode 100644 index 00000000..67c0e2f4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/map.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +struct Map { + X key{}; + Y value{}; + + std::string_view tl_name() const { return "map"; } + uint32_t tl_tag() const { return 0x79c473a4; } +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myAnonMcValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myAnonMcValue.hpp new file mode 100644 index 00000000..6a0cc8f1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myAnonMcValue.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service1/types/service1.Value.hpp" + + +namespace tl2 { +using MyAnonMcValue = ::tl2::service1::Value; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedArray.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedArray.hpp new file mode 100644 index 00000000..769bbb73 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedArray.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct MyBoxedArray { + std::array data{}; + + std::string_view tl_name() const { return "myBoxedArray"; } + uint32_t tl_tag() const { return 0x288f64f0; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedTupleSlice.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedTupleSlice.hpp new file mode 100644 index 00000000..855a0d6d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedTupleSlice.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct MyBoxedTupleSlice { + uint32_t n = 0; + std::vector data; + + std::string_view tl_name() const { return "myBoxedTupleSlice"; } + uint32_t tl_tag() const { return 0x25d1a1be; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedVectorSlice.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedVectorSlice.hpp new file mode 100644 index 00000000..e5b14f4f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myBoxedVectorSlice.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct MyBoxedVectorSlice { + std::vector data; + + std::string_view tl_name() const { return "myBoxedVectorSlice"; } + uint32_t tl_tag() const { return 0x57d164bb; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDictOfInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDictOfInt.hpp new file mode 100644 index 00000000..f8c2af2e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDictOfInt.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "dictionary.hpp" + + +namespace tl2 { +using MyDictOfInt = ::tl2::Dictionary; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDouble.hpp new file mode 100644 index 00000000..0d56f0f7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myDouble.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using MyDouble = double; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myInt.hpp new file mode 100644 index 00000000..1d7bb79e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myInt.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct MyInt { + int32_t val1 = 0; + + std::string_view tl_name() const { return "myInt"; } + uint32_t tl_tag() const { return 0xc12375b7; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe1.hpp new file mode 100644 index 00000000..0021a7e6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe1.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "myTuple.hpp" + + +namespace tl2 { +using MyMaybe1 = std::optional<::tl2::MyTuplen<10>>; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe2.hpp new file mode 100644 index 00000000..6cb2f9fe --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMaybe2.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "myTuple.hpp" + + +namespace tl2 { +using MyMaybe2 = std::optional<::tl2::MyTuplen<10>>; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValue.hpp new file mode 100644 index 00000000..9d776b59 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValue.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service1/types/service1.Value.hpp" + + +namespace tl2 { +struct MyMcValue { + ::tl2::service1::Value x; + + std::string_view tl_name() const { return "myMcValue"; } + uint32_t tl_tag() const { return 0xe2ffd978; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueTuple.hpp new file mode 100644 index 00000000..40b8939f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueTuple.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service1/types/service1.Value.hpp" + + +namespace tl2 { +struct MyMcValueTuple { + std::array<::tl2::service1::Value, 3> xs{}; + + std::string_view tl_name() const { return "myMcValueTuple"; } + uint32_t tl_tag() const { return 0x1287d116; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueVector.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueVector.hpp new file mode 100644 index 00000000..57ad3dc5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myMcValueVector.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../service1/types/service1.Value.hpp" + + +namespace tl2 { +struct MyMcValueVector { + std::vector<::tl2::service1::Value> xs; + + std::string_view tl_name() const { return "myMcValueVector"; } + uint32_t tl_tag() const { return 0x761d6d58; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myString.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myString.hpp new file mode 100644 index 00000000..b7ceb227 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myString.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct MyString { + std::string val2; + + std::string_view tl_name() const { return "myString"; } + uint32_t tl_tag() const { return 0xc8bfa969; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTuple.hpp new file mode 100644 index 00000000..e9a9b3d6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTuple.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +using MyTuplen = std::array; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTwoDicts.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTwoDicts.hpp new file mode 100644 index 00000000..bc9889f8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/myTwoDicts.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "dictionary.hpp" + + +namespace tl2 { +struct MyTwoDicts { + ::tl2::Dictionary a{}; + ::tl2::Dictionary b{}; + + std::string_view tl_name() const { return "myTwoDicts"; } + uint32_t tl_tag() const { return 0xa859581d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/nonOptNat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/nonOptNat.hpp new file mode 100644 index 00000000..18cd4481 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/nonOptNat.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct NonOptNat { + uint32_t n = 0; + std::vector xs; + + std::string_view tl_name() const { return "nonOptNat"; } + uint32_t tl_tag() const { return 0x45366605; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/right.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/right.hpp new file mode 100644 index 00000000..49b74c1d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/right.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +struct Right { + Y value{}; + + std::string_view tl_name() const { return "right"; } + uint32_t tl_tag() const { return 0xdf3ecb3b; } +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/rpcInvokeReqExtra.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/rpcInvokeReqExtra.hpp new file mode 100644 index 00000000..ae821f4d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/rpcInvokeReqExtra.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "true.hpp" + + +namespace tl2 { +struct RpcInvokeReqExtra { + uint32_t fields_mask = 0; + ::tl2::True query{}; + ::tl2::True sort{}; + ::tl2::True sort_reverse{}; + int64_t wait_binlog_pos = 0; + std::vector string_forward_keys; + + std::string_view tl_name() const { return "rpcInvokeReqExtra"; } + uint32_t tl_tag() const { return 0xf3ef81a9; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/statOne.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/statOne.hpp new file mode 100644 index 00000000..89bc2eab --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/statOne.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct StatOne { + std::string key; + std::string value; + + std::string_view tl_name() const { return "statOne"; } + uint32_t tl_tag() const { return 0x74b0604b; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/string.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/string.hpp new file mode 100644 index 00000000..8030fc84 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/string.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +using String = std::string; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/true.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/true.hpp new file mode 100644 index 00000000..4dbb5117 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/true.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct True { + + std::string_view tl_name() const { return "true"; } + uint32_t tl_tag() const { return 0x3fedd339; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/tuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/tuple.hpp new file mode 100644 index 00000000..9f00b0d7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/tuple.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +using Tuple = std::vector; +} // namespace tl2 + +namespace tl2 { +template +using Tuplen = std::array; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/vector.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/vector.hpp new file mode 100644 index 00000000..14003173 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/vector.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +template +using Vector = std::vector; +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__common/types/withFloat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__common/types/withFloat.hpp new file mode 100644 index 00000000..90cf18d0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__common/types/withFloat.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { +struct WithFloat { + float x = 0; + float y = 0; + float z = 0; + + std::string_view tl_name() const { return "withFloat"; } + uint32_t tl_tag() const { return 0x071b8685; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +} // namespace tl2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__factory/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/__factory/details.cpp new file mode 100644 index 00000000..9cbb018b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__factory/details.cpp @@ -0,0 +1,3107 @@ +#include "../__meta/headers.hpp" +#include "headers.hpp" + +#include "../__common/types/withFloat.hpp" +#include "../__common/types/vector.hpp" +#include "../unique/functions/unique.stringToInt.hpp" +#include "../unique/functions/unique.get.hpp" +#include "../__common/types/tuple.hpp" +#include "../tree_stats/types/tree_stats.objectLimitValueLong.hpp" +#include "../tasks/types/tasks.TaskStatusItems.hpp" +#include "../tasks/types/tasks.taskInfo.hpp" +#include "../tasks/types/tasks.queueTypeInfo.hpp" +#include "../tasks/types/tasks.queueTypeSettings.hpp" +#include "../tasks/types/tasks.queueStats.hpp" +#include "../tasks/functions/tasks.getTaskFromQueue.hpp" +#include "../tasks/functions/tasks.getQueueTypes.hpp" +#include "../tasks/functions/tasks.getQueueSize.hpp" +#include "../tasks/functions/tasks.getAnyTask.hpp" +#include "../tasks/types/tasks.cronTaskWithId.hpp" +#include "../tasks/types/tasks.cronTask.hpp" +#include "../tasks/types/tasks.cronTime.hpp" +#include "../tasks/functions/tasks.addTask.hpp" +#include "../tasks/types/tasks.task.hpp" +#include "../__common/types/string.hpp" +#include "../__common/types/statOne.hpp" +#include "../service6/functions/service6.multiFindWithBounds.hpp" +#include "../service6/functions/service6.multiFind.hpp" +#include "../service6/types/service6.findWithBoundsResult.hpp" +#include "../service5/functions/service5.query.hpp" +#include "../service5/functions/service5.performQuery.hpp" +#include "../service5/types/service5.params.hpp" +#include "../service5/types/service5.Output.hpp" +#include "../service5/types/service5.stringOutput.hpp" +#include "../service5/functions/service5.insert.hpp" +#include "../service5/types/service5.emptyOutput.hpp" +#include "../service4/types/service4.modifiedNewsEntry.hpp" +#include "../service4/types/service4.object.hpp" +#include "../service3/functions/service3.setLimits.hpp" +#include "../service3/functions/service3.setLastVisitTimestamp.hpp" +#include "../service3/functions/service3.restoreProduct.hpp" +#include "../service3/functions/service3.restoreGroupedProducts.hpp" +#include "../service3/functions/service3.restoreAllProducts.hpp" +#include "../service3/types/service3.productStatsOld.hpp" +#include "../service3/types/service3.limits.hpp" +#include "../service3/types/service3.groupSizeLimit.hpp" +#include "../service3/types/service3.groupCountLimit.hpp" +#include "../service3/functions/service3.getScheduledProducts.hpp" +#include "../service3/functions/service3.getProducts.hpp" +#include "../service3/functions/service3.getProductStats.hpp" +#include "../service3/functions/service3.getLimits.hpp" +#include "../service3/functions/service3.getLastVisitTimestamp.hpp" +#include "../service3/functions/service3.deleteProduct.hpp" +#include "../service3/functions/service3.deleteGroupedProducts.hpp" +#include "../service3/functions/service3.deleteAllProducts.hpp" +#include "../service3/functions/service3.createProduct.hpp" +#include "../service2/functions/service2.setObjectTtl.hpp" +#include "../service2/functions/service2.set.hpp" +#include "../service2/functions/service2.addOrIncrMany.hpp" +#include "../service1/functions/service1.touch.hpp" +#include "../service1/functions/service1.setOrIncr.hpp" +#include "../service1/functions/service1.set.hpp" +#include "../service1/functions/service1.replaceOrIncr.hpp" +#include "../service1/functions/service1.replace.hpp" +#include "../service1/types/service1.keysStat.hpp" +#include "../service1/functions/service1.incr.hpp" +#include "../service1/functions/service1.getWildcardWithFlags.hpp" +#include "../service1/functions/service1.getWildcardList.hpp" +#include "../service1/functions/service1.getWildcardDict.hpp" +#include "../service1/functions/service1.getWildcard.hpp" +#include "../service1/functions/service1.getKeysStatPeriods.hpp" +#include "../service1/functions/service1.getKeysStat.hpp" +#include "../service1/functions/service1.getExpireTime.hpp" +#include "../service1/functions/service1.get.hpp" +#include "../service1/functions/service1.exists.hpp" +#include "../service1/functions/service1.enableKeysStat.hpp" +#include "../service1/functions/service1.enableExpiration.hpp" +#include "../service1/functions/service1.disableKeysStat.hpp" +#include "../service1/functions/service1.disableExpiration.hpp" +#include "../service1/functions/service1.delete.hpp" +#include "../service1/functions/service1.decr.hpp" +#include "../service1/functions/service1.cas.hpp" +#include "../service1/functions/service1.append.hpp" +#include "../service1/functions/service1.addOrIncr.hpp" +#include "../service1/functions/service1.addOrGet.hpp" +#include "../service1/functions/service1.add.hpp" +#include "../__common/types/rpcInvokeReqExtra.hpp" +#include "../__common/types/true.hpp" +#include "../pkg2/types/pkg2.t1.hpp" +#include "../pkg2/types/pkg2.foo.hpp" +#include "../__common/types/nonOptNat.hpp" +#include "../__common/types/myTwoDicts.hpp" +#include "../__common/types/myMcValueVector.hpp" +#include "../__common/types/myMcValueTuple.hpp" +#include "../__common/types/myMcValue.hpp" +#include "../__common/types/myBoxedVectorSlice.hpp" +#include "../__common/types/long.hpp" +#include "../__common/types/issue3498.hpp" +#include "../service6/types/service6.findResultRow.hpp" +#include "../service6/types/service6.error.hpp" +#include "../__common/types/int.hpp" +#include "../__common/functions/getStats.hpp" +#include "../tasks/types/tasks.queueTypeStats.hpp" +#include "../__common/functions/getNonOptNat.hpp" +#include "../__common/functions/getMyValue.hpp" +#include "../__common/types/MyValue.hpp" +#include "../__common/types/myString.hpp" +#include "../__common/types/myInt.hpp" +#include "../__common/functions/getMyDouble.hpp" +#include "../__common/types/myDouble.hpp" +#include "../__common/functions/getMyDictOfInt.hpp" +#include "../__common/types/myDictOfInt.hpp" +#include "../__common/functions/getMaybeIface.hpp" +#include "../service1/types/service1.Value.hpp" +#include "../service1/types/service1.strvalueWithTime.hpp" +#include "../service1/types/service1.strvalue.hpp" +#include "../service1/types/service1.not_found.hpp" +#include "../service1/types/service1.longvalueWithTime.hpp" +#include "../service1/types/service1.longvalue.hpp" +#include "../__common/functions/getFloat.hpp" +#include "../__common/functions/getDouble.hpp" +#include "../__common/functions/get_arrays.hpp" +#include "../__common/types/float.hpp" +#include "../__common/types/fieldConflict4.hpp" +#include "../__common/types/fieldConflict3.hpp" +#include "../__common/types/fieldConflict2.hpp" +#include "../__common/types/fieldConflict1.hpp" +#include "../__common/types/double.hpp" +#include "../__common/types/dictionary.hpp" +#include "../__common/functions/boxedVector64.hpp" +#include "../__common/functions/boxedVector32BoxedElem.hpp" +#include "../__common/functions/boxedVector32.hpp" +#include "../__common/functions/boxedTupleSlice3.hpp" +#include "../__common/functions/boxedTupleSlice2.hpp" +#include "../__common/types/myBoxedTupleSlice.hpp" +#include "../__common/functions/boxedTupleSlice1.hpp" +#include "../__common/functions/boxedTuple.hpp" +#include "../__common/functions/boxedString.hpp" +#include "../__common/functions/boxedInt.hpp" +#include "../__common/functions/boxedArray.hpp" +#include "../__common/types/myBoxedArray.hpp" +#include "../__common/types/boolStat.hpp" +#include "../__common/types/Bool.hpp" +#include "../__common/types/benchObject.hpp" +#include "../__common/types/integer.hpp" +#include "../antispam/types/antispam.PatternFull.hpp" +#include "../antispam/types/antispam.patternNotFound.hpp" +#include "../antispam/types/antispam.patternFound.hpp" +#include "../antispam/functions/antispam.getPattern.hpp" + +void tl2::factory::set_all_factories() { + + struct tl2_antispam_GetPattern_tl_function : public tl2::meta::tl_function { + tl2::antispam::GetPattern object; + explicit tl2_antispam_GetPattern_tl_function(tl2::antispam::GetPattern o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::antispam::PatternFull result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("antispam.getPattern", []() -> std::unique_ptr { + return std::make_unique(tl2::antispam::GetPattern{}); + }); + + tl2::meta::set_create_function_by_name("antispam.getPattern", []() -> std::unique_ptr { + return std::make_unique(tl2::antispam::GetPattern{}); + }); + + struct tl2_antispam_PatternFound_tl_object : public tl2::meta::tl_object { + tl2::antispam::PatternFound object; + explicit tl2_antispam_PatternFound_tl_object(tl2::antispam::PatternFound o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("antispam.patternFound", []() -> std::unique_ptr { + return std::make_unique(tl2::antispam::PatternFound{}); + }); + + struct tl2_antispam_PatternNotFound_tl_object : public tl2::meta::tl_object { + tl2::antispam::PatternNotFound object; + explicit tl2_antispam_PatternNotFound_tl_object(tl2::antispam::PatternNotFound o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("antispam.patternNotFound", []() -> std::unique_ptr { + return std::make_unique(tl2::antispam::PatternNotFound{}); + }); + + struct tl2_BenchObject_tl_object : public tl2::meta::tl_object { + tl2::BenchObject object; + explicit tl2_BenchObject_tl_object(tl2::BenchObject o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("benchObject", []() -> std::unique_ptr { + return std::make_unique(tl2::BenchObject{}); + }); + + struct tl2_BoolStat_tl_object : public tl2::meta::tl_object { + tl2::BoolStat object; + explicit tl2_BoolStat_tl_object(tl2::BoolStat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("boolStat", []() -> std::unique_ptr { + return std::make_unique(tl2::BoolStat{}); + }); + + struct tl2_BoxedArray_tl_function : public tl2::meta::tl_function { + tl2::BoxedArray object; + explicit tl2_BoxedArray_tl_function(tl2::BoxedArray o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::MyBoxedArray result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedArray", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedArray{}); + }); + + tl2::meta::set_create_function_by_name("boxedArray", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedArray{}); + }); + + struct tl2_BoxedInt_tl_function : public tl2::meta::tl_function { + tl2::BoxedInt object; + explicit tl2_BoxedInt_tl_function(tl2::BoxedInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + int32_t result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedInt", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedInt{}); + }); + + tl2::meta::set_create_function_by_name("boxedInt", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedInt{}); + }); + + struct tl2_BoxedString_tl_function : public tl2::meta::tl_function { + tl2::BoxedString object; + explicit tl2_BoxedString_tl_function(tl2::BoxedString o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::string result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedString", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedString{}); + }); + + tl2::meta::set_create_function_by_name("boxedString", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedString{}); + }); + + struct tl2_BoxedTuple_tl_function : public tl2::meta::tl_function { + tl2::BoxedTuple object; + explicit tl2_BoxedTuple_tl_function(tl2::BoxedTuple o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::array result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedTuple", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTuple{}); + }); + + tl2::meta::set_create_function_by_name("boxedTuple", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTuple{}); + }); + + struct tl2_BoxedTupleSlice1_tl_function : public tl2::meta::tl_function { + tl2::BoxedTupleSlice1 object; + explicit tl2_BoxedTupleSlice1_tl_function(tl2::BoxedTupleSlice1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedTupleSlice1", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice1{}); + }); + + tl2::meta::set_create_function_by_name("boxedTupleSlice1", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice1{}); + }); + + struct tl2_BoxedTupleSlice2_tl_function : public tl2::meta::tl_function { + tl2::BoxedTupleSlice2 object; + explicit tl2_BoxedTupleSlice2_tl_function(tl2::BoxedTupleSlice2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::MyBoxedTupleSlice result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedTupleSlice2", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice2{}); + }); + + tl2::meta::set_create_function_by_name("boxedTupleSlice2", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice2{}); + }); + + struct tl2_BoxedTupleSlice3_tl_function : public tl2::meta::tl_function { + tl2::BoxedTupleSlice3 object; + explicit tl2_BoxedTupleSlice3_tl_function(tl2::BoxedTupleSlice3 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedTupleSlice3", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice3{}); + }); + + tl2::meta::set_create_function_by_name("boxedTupleSlice3", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedTupleSlice3{}); + }); + + struct tl2_BoxedVector32_tl_function : public tl2::meta::tl_function { + tl2::BoxedVector32 object; + explicit tl2_BoxedVector32_tl_function(tl2::BoxedVector32 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedVector32", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector32{}); + }); + + tl2::meta::set_create_function_by_name("boxedVector32", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector32{}); + }); + + struct tl2_BoxedVector32BoxedElem_tl_function : public tl2::meta::tl_function { + tl2::BoxedVector32BoxedElem object; + explicit tl2_BoxedVector32BoxedElem_tl_function(tl2::BoxedVector32BoxedElem o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedVector32BoxedElem", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector32BoxedElem{}); + }); + + tl2::meta::set_create_function_by_name("boxedVector32BoxedElem", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector32BoxedElem{}); + }); + + struct tl2_BoxedVector64_tl_function : public tl2::meta::tl_function { + tl2::BoxedVector64 object; + explicit tl2_BoxedVector64_tl_function(tl2::BoxedVector64 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("boxedVector64", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector64{}); + }); + + tl2::meta::set_create_function_by_name("boxedVector64", []() -> std::unique_ptr { + return std::make_unique(tl2::BoxedVector64{}); + }); + + struct tl2_FieldConflict1_tl_object : public tl2::meta::tl_object { + tl2::FieldConflict1 object; + explicit tl2_FieldConflict1_tl_object(tl2::FieldConflict1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("fieldConflict1", []() -> std::unique_ptr { + return std::make_unique(tl2::FieldConflict1{}); + }); + + struct tl2_FieldConflict2_tl_object : public tl2::meta::tl_object { + tl2::FieldConflict2 object; + explicit tl2_FieldConflict2_tl_object(tl2::FieldConflict2 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("fieldConflict2", []() -> std::unique_ptr { + return std::make_unique(tl2::FieldConflict2{}); + }); + + struct tl2_FieldConflict3_tl_object : public tl2::meta::tl_object { + tl2::FieldConflict3 object; + explicit tl2_FieldConflict3_tl_object(tl2::FieldConflict3 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("fieldConflict3", []() -> std::unique_ptr { + return std::make_unique(tl2::FieldConflict3{}); + }); + + struct tl2_FieldConflict4_tl_object : public tl2::meta::tl_object { + tl2::FieldConflict4 object; + explicit tl2_FieldConflict4_tl_object(tl2::FieldConflict4 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("fieldConflict4", []() -> std::unique_ptr { + return std::make_unique(tl2::FieldConflict4{}); + }); + + struct tl2_Get_arrays_tl_function : public tl2::meta::tl_function { + tl2::Get_arrays object; + explicit tl2_Get_arrays_tl_function(tl2::Get_arrays o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::array result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("get_arrays", []() -> std::unique_ptr { + return std::make_unique(tl2::Get_arrays{}); + }); + + tl2::meta::set_create_function_by_name("get_arrays", []() -> std::unique_ptr { + return std::make_unique(tl2::Get_arrays{}); + }); + + struct tl2_GetDouble_tl_function : public tl2::meta::tl_function { + tl2::GetDouble object; + explicit tl2_GetDouble_tl_function(tl2::GetDouble o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + double result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getDouble", []() -> std::unique_ptr { + return std::make_unique(tl2::GetDouble{}); + }); + + tl2::meta::set_create_function_by_name("getDouble", []() -> std::unique_ptr { + return std::make_unique(tl2::GetDouble{}); + }); + + struct tl2_GetFloat_tl_function : public tl2::meta::tl_function { + tl2::GetFloat object; + explicit tl2_GetFloat_tl_function(tl2::GetFloat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + float result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getFloat", []() -> std::unique_ptr { + return std::make_unique(tl2::GetFloat{}); + }); + + tl2::meta::set_create_function_by_name("getFloat", []() -> std::unique_ptr { + return std::make_unique(tl2::GetFloat{}); + }); + + struct tl2_GetMaybeIface_tl_function : public tl2::meta::tl_function { + tl2::GetMaybeIface object; + explicit tl2_GetMaybeIface_tl_function(tl2::GetMaybeIface o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional<::tl2::service1::Value> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getMaybeIface", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMaybeIface{}); + }); + + tl2::meta::set_create_function_by_name("getMaybeIface", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMaybeIface{}); + }); + + struct tl2_GetMyDictOfInt_tl_function : public tl2::meta::tl_function { + tl2::GetMyDictOfInt object; + explicit tl2_GetMyDictOfInt_tl_function(tl2::GetMyDictOfInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::MyDictOfInt result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getMyDictOfInt", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyDictOfInt{}); + }); + + tl2::meta::set_create_function_by_name("getMyDictOfInt", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyDictOfInt{}); + }); + + struct tl2_GetMyDouble_tl_function : public tl2::meta::tl_function { + tl2::GetMyDouble object; + explicit tl2_GetMyDouble_tl_function(tl2::GetMyDouble o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::MyDouble result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getMyDouble", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyDouble{}); + }); + + tl2::meta::set_create_function_by_name("getMyDouble", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyDouble{}); + }); + + struct tl2_GetMyValue_tl_function : public tl2::meta::tl_function { + tl2::GetMyValue object; + explicit tl2_GetMyValue_tl_function(tl2::GetMyValue o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::MyValue result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getMyValue", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyValue{}); + }); + + tl2::meta::set_create_function_by_name("getMyValue", []() -> std::unique_ptr { + return std::make_unique(tl2::GetMyValue{}); + }); + + struct tl2_GetNonOptNat_tl_function : public tl2::meta::tl_function { + tl2::GetNonOptNat object; + explicit tl2_GetNonOptNat_tl_function(tl2::GetNonOptNat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getNonOptNat", []() -> std::unique_ptr { + return std::make_unique(tl2::GetNonOptNat{}); + }); + + tl2::meta::set_create_function_by_name("getNonOptNat", []() -> std::unique_ptr { + return std::make_unique(tl2::GetNonOptNat{}); + }); + + struct tl2_GetStats_tl_function : public tl2::meta::tl_function { + tl2::GetStats object; + explicit tl2_GetStats_tl_function(tl2::GetStats o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::tasks::QueueTypeStats result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("getStats", []() -> std::unique_ptr { + return std::make_unique(tl2::GetStats{}); + }); + + tl2::meta::set_create_function_by_name("getStats", []() -> std::unique_ptr { + return std::make_unique(tl2::GetStats{}); + }); + + struct tl2_Integer_tl_object : public tl2::meta::tl_object { + tl2::Integer object; + explicit tl2_Integer_tl_object(tl2::Integer o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("integer", []() -> std::unique_ptr { + return std::make_unique(tl2::Integer{}); + }); + + struct tl2_Issue3498_tl_object : public tl2::meta::tl_object { + tl2::Issue3498 object; + explicit tl2_Issue3498_tl_object(tl2::Issue3498 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("issue3498", []() -> std::unique_ptr { + return std::make_unique(tl2::Issue3498{}); + }); + + struct tl2_MyBoxedArray_tl_object : public tl2::meta::tl_object { + tl2::MyBoxedArray object; + explicit tl2_MyBoxedArray_tl_object(tl2::MyBoxedArray o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myBoxedArray", []() -> std::unique_ptr { + return std::make_unique(tl2::MyBoxedArray{}); + }); + + struct tl2_MyBoxedTupleSlice_tl_object : public tl2::meta::tl_object { + tl2::MyBoxedTupleSlice object; + explicit tl2_MyBoxedTupleSlice_tl_object(tl2::MyBoxedTupleSlice o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myBoxedTupleSlice", []() -> std::unique_ptr { + return std::make_unique(tl2::MyBoxedTupleSlice{}); + }); + + struct tl2_MyBoxedVectorSlice_tl_object : public tl2::meta::tl_object { + tl2::MyBoxedVectorSlice object; + explicit tl2_MyBoxedVectorSlice_tl_object(tl2::MyBoxedVectorSlice o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myBoxedVectorSlice", []() -> std::unique_ptr { + return std::make_unique(tl2::MyBoxedVectorSlice{}); + }); + + struct tl2_MyInt_tl_object : public tl2::meta::tl_object { + tl2::MyInt object; + explicit tl2_MyInt_tl_object(tl2::MyInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myInt", []() -> std::unique_ptr { + return std::make_unique(tl2::MyInt{}); + }); + + struct tl2_MyMcValue_tl_object : public tl2::meta::tl_object { + tl2::MyMcValue object; + explicit tl2_MyMcValue_tl_object(tl2::MyMcValue o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myMcValue", []() -> std::unique_ptr { + return std::make_unique(tl2::MyMcValue{}); + }); + + struct tl2_MyMcValueTuple_tl_object : public tl2::meta::tl_object { + tl2::MyMcValueTuple object; + explicit tl2_MyMcValueTuple_tl_object(tl2::MyMcValueTuple o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myMcValueTuple", []() -> std::unique_ptr { + return std::make_unique(tl2::MyMcValueTuple{}); + }); + + struct tl2_MyMcValueVector_tl_object : public tl2::meta::tl_object { + tl2::MyMcValueVector object; + explicit tl2_MyMcValueVector_tl_object(tl2::MyMcValueVector o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myMcValueVector", []() -> std::unique_ptr { + return std::make_unique(tl2::MyMcValueVector{}); + }); + + struct tl2_MyString_tl_object : public tl2::meta::tl_object { + tl2::MyString object; + explicit tl2_MyString_tl_object(tl2::MyString o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myString", []() -> std::unique_ptr { + return std::make_unique(tl2::MyString{}); + }); + + struct tl2_MyTwoDicts_tl_object : public tl2::meta::tl_object { + tl2::MyTwoDicts object; + explicit tl2_MyTwoDicts_tl_object(tl2::MyTwoDicts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("myTwoDicts", []() -> std::unique_ptr { + return std::make_unique(tl2::MyTwoDicts{}); + }); + + struct tl2_NonOptNat_tl_object : public tl2::meta::tl_object { + tl2::NonOptNat object; + explicit tl2_NonOptNat_tl_object(tl2::NonOptNat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("nonOptNat", []() -> std::unique_ptr { + return std::make_unique(tl2::NonOptNat{}); + }); + + struct tl2_pkg2_Foo_tl_object : public tl2::meta::tl_object { + tl2::pkg2::Foo object; + explicit tl2_pkg2_Foo_tl_object(tl2::pkg2::Foo o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("pkg2.foo", []() -> std::unique_ptr { + return std::make_unique(tl2::pkg2::Foo{}); + }); + + struct tl2_pkg2_T1_tl_object : public tl2::meta::tl_object { + tl2::pkg2::T1 object; + explicit tl2_pkg2_T1_tl_object(tl2::pkg2::T1 o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("pkg2.t1", []() -> std::unique_ptr { + return std::make_unique(tl2::pkg2::T1{}); + }); + + struct tl2_RpcInvokeReqExtra_tl_object : public tl2::meta::tl_object { + tl2::RpcInvokeReqExtra object; + explicit tl2_RpcInvokeReqExtra_tl_object(tl2::RpcInvokeReqExtra o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("rpcInvokeReqExtra", []() -> std::unique_ptr { + return std::make_unique(tl2::RpcInvokeReqExtra{}); + }); + + struct tl2_service1_Add_tl_function : public tl2::meta::tl_function { + tl2::service1::Add object; + explicit tl2_service1_Add_tl_function(tl2::service1::Add o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.add", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Add{}); + }); + + tl2::meta::set_create_function_by_name("service1.add", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Add{}); + }); + + struct tl2_service1_AddOrGet_tl_function : public tl2::meta::tl_function { + tl2::service1::AddOrGet object; + explicit tl2_service1_AddOrGet_tl_function(tl2::service1::AddOrGet o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.addOrGet", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::AddOrGet{}); + }); + + tl2::meta::set_create_function_by_name("service1.addOrGet", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::AddOrGet{}); + }); + + struct tl2_service1_AddOrIncr_tl_function : public tl2::meta::tl_function { + tl2::service1::AddOrIncr object; + explicit tl2_service1_AddOrIncr_tl_function(tl2::service1::AddOrIncr o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.addOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::AddOrIncr{}); + }); + + tl2::meta::set_create_function_by_name("service1.addOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::AddOrIncr{}); + }); + + struct tl2_service1_Append_tl_function : public tl2::meta::tl_function { + tl2::service1::Append object; + explicit tl2_service1_Append_tl_function(tl2::service1::Append o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.append", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Append{}); + }); + + tl2::meta::set_create_function_by_name("service1.append", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Append{}); + }); + + struct tl2_service1_Cas_tl_function : public tl2::meta::tl_function { + tl2::service1::Cas object; + explicit tl2_service1_Cas_tl_function(tl2::service1::Cas o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.cas", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Cas{}); + }); + + tl2::meta::set_create_function_by_name("service1.cas", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Cas{}); + }); + + struct tl2_service1_Decr_tl_function : public tl2::meta::tl_function { + tl2::service1::Decr object; + explicit tl2_service1_Decr_tl_function(tl2::service1::Decr o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.decr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Decr{}); + }); + + tl2::meta::set_create_function_by_name("service1.decr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Decr{}); + }); + + struct tl2_service1_Delete_tl_function : public tl2::meta::tl_function { + tl2::service1::Delete object; + explicit tl2_service1_Delete_tl_function(tl2::service1::Delete o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.delete", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Delete{}); + }); + + tl2::meta::set_create_function_by_name("service1.delete", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Delete{}); + }); + + struct tl2_service1_DisableExpiration_tl_function : public tl2::meta::tl_function { + tl2::service1::DisableExpiration object; + explicit tl2_service1_DisableExpiration_tl_function(tl2::service1::DisableExpiration o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.disableExpiration", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::DisableExpiration{}); + }); + + tl2::meta::set_create_function_by_name("service1.disableExpiration", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::DisableExpiration{}); + }); + + struct tl2_service1_DisableKeysStat_tl_function : public tl2::meta::tl_function { + tl2::service1::DisableKeysStat object; + explicit tl2_service1_DisableKeysStat_tl_function(tl2::service1::DisableKeysStat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.disableKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::DisableKeysStat{}); + }); + + tl2::meta::set_create_function_by_name("service1.disableKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::DisableKeysStat{}); + }); + + struct tl2_service1_EnableExpiration_tl_function : public tl2::meta::tl_function { + tl2::service1::EnableExpiration object; + explicit tl2_service1_EnableExpiration_tl_function(tl2::service1::EnableExpiration o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.enableExpiration", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::EnableExpiration{}); + }); + + tl2::meta::set_create_function_by_name("service1.enableExpiration", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::EnableExpiration{}); + }); + + struct tl2_service1_EnableKeysStat_tl_function : public tl2::meta::tl_function { + tl2::service1::EnableKeysStat object; + explicit tl2_service1_EnableKeysStat_tl_function(tl2::service1::EnableKeysStat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.enableKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::EnableKeysStat{}); + }); + + tl2::meta::set_create_function_by_name("service1.enableKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::EnableKeysStat{}); + }); + + struct tl2_service1_Exists_tl_function : public tl2::meta::tl_function { + tl2::service1::Exists object; + explicit tl2_service1_Exists_tl_function(tl2::service1::Exists o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.exists", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Exists{}); + }); + + tl2::meta::set_create_function_by_name("service1.exists", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Exists{}); + }); + + struct tl2_service1_Get_tl_function : public tl2::meta::tl_function { + tl2::service1::Get object; + explicit tl2_service1_Get_tl_function(tl2::service1::Get o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.get", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Get{}); + }); + + tl2::meta::set_create_function_by_name("service1.get", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Get{}); + }); + + struct tl2_service1_GetExpireTime_tl_function : public tl2::meta::tl_function { + tl2::service1::GetExpireTime object; + explicit tl2_service1_GetExpireTime_tl_function(tl2::service1::GetExpireTime o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getExpireTime", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetExpireTime{}); + }); + + tl2::meta::set_create_function_by_name("service1.getExpireTime", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetExpireTime{}); + }); + + struct tl2_service1_GetKeysStat_tl_function : public tl2::meta::tl_function { + tl2::service1::GetKeysStat object; + explicit tl2_service1_GetKeysStat_tl_function(tl2::service1::GetKeysStat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional<::tl2::service1::KeysStat> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetKeysStat{}); + }); + + tl2::meta::set_create_function_by_name("service1.getKeysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetKeysStat{}); + }); + + struct tl2_service1_GetKeysStatPeriods_tl_function : public tl2::meta::tl_function { + tl2::service1::GetKeysStatPeriods object; + explicit tl2_service1_GetKeysStatPeriods_tl_function(tl2::service1::GetKeysStatPeriods o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getKeysStatPeriods", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetKeysStatPeriods{}); + }); + + tl2::meta::set_create_function_by_name("service1.getKeysStatPeriods", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetKeysStatPeriods{}); + }); + + struct tl2_service1_GetWildcard_tl_function : public tl2::meta::tl_function { + tl2::service1::GetWildcard object; + explicit tl2_service1_GetWildcard_tl_function(tl2::service1::GetWildcard o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector<::tl2::Map> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getWildcard", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcard{}); + }); + + tl2::meta::set_create_function_by_name("service1.getWildcard", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcard{}); + }); + + struct tl2_service1_GetWildcardDict_tl_function : public tl2::meta::tl_function { + tl2::service1::GetWildcardDict object; + explicit tl2_service1_GetWildcardDict_tl_function(tl2::service1::GetWildcardDict o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::Dictionary result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getWildcardDict", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardDict{}); + }); + + tl2::meta::set_create_function_by_name("service1.getWildcardDict", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardDict{}); + }); + + struct tl2_service1_GetWildcardList_tl_function : public tl2::meta::tl_function { + tl2::service1::GetWildcardList object; + explicit tl2_service1_GetWildcardList_tl_function(tl2::service1::GetWildcardList o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getWildcardList", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardList{}); + }); + + tl2::meta::set_create_function_by_name("service1.getWildcardList", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardList{}); + }); + + struct tl2_service1_GetWildcardWithFlags_tl_function : public tl2::meta::tl_function { + tl2::service1::GetWildcardWithFlags object; + explicit tl2_service1_GetWildcardWithFlags_tl_function(tl2::service1::GetWildcardWithFlags o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::Dictionary<::tl2::service1::Value> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.getWildcardWithFlags", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardWithFlags{}); + }); + + tl2::meta::set_create_function_by_name("service1.getWildcardWithFlags", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::GetWildcardWithFlags{}); + }); + + struct tl2_service1_Incr_tl_function : public tl2::meta::tl_function { + tl2::service1::Incr object; + explicit tl2_service1_Incr_tl_function(tl2::service1::Incr o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.incr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Incr{}); + }); + + tl2::meta::set_create_function_by_name("service1.incr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Incr{}); + }); + + struct tl2_service1_KeysStat_tl_object : public tl2::meta::tl_object { + tl2::service1::KeysStat object; + explicit tl2_service1_KeysStat_tl_object(tl2::service1::KeysStat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.keysStat", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::KeysStat{}); + }); + + struct tl2_service1_Longvalue_tl_object : public tl2::meta::tl_object { + tl2::service1::Longvalue object; + explicit tl2_service1_Longvalue_tl_object(tl2::service1::Longvalue o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.longvalue", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Longvalue{}); + }); + + struct tl2_service1_LongvalueWithTime_tl_object : public tl2::meta::tl_object { + tl2::service1::LongvalueWithTime object; + explicit tl2_service1_LongvalueWithTime_tl_object(tl2::service1::LongvalueWithTime o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.longvalueWithTime", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::LongvalueWithTime{}); + }); + + struct tl2_service1_Not_found_tl_object : public tl2::meta::tl_object { + tl2::service1::Not_found object; + explicit tl2_service1_Not_found_tl_object(tl2::service1::Not_found o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.not_found", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Not_found{}); + }); + + struct tl2_service1_Replace_tl_function : public tl2::meta::tl_function { + tl2::service1::Replace object; + explicit tl2_service1_Replace_tl_function(tl2::service1::Replace o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.replace", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Replace{}); + }); + + tl2::meta::set_create_function_by_name("service1.replace", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Replace{}); + }); + + struct tl2_service1_ReplaceOrIncr_tl_function : public tl2::meta::tl_function { + tl2::service1::ReplaceOrIncr object; + explicit tl2_service1_ReplaceOrIncr_tl_function(tl2::service1::ReplaceOrIncr o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.replaceOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::ReplaceOrIncr{}); + }); + + tl2::meta::set_create_function_by_name("service1.replaceOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::ReplaceOrIncr{}); + }); + + struct tl2_service1_Set_tl_function : public tl2::meta::tl_function { + tl2::service1::Set object; + explicit tl2_service1_Set_tl_function(tl2::service1::Set o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.set", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Set{}); + }); + + tl2::meta::set_create_function_by_name("service1.set", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Set{}); + }); + + struct tl2_service1_SetOrIncr_tl_function : public tl2::meta::tl_function { + tl2::service1::SetOrIncr object; + explicit tl2_service1_SetOrIncr_tl_function(tl2::service1::SetOrIncr o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service1::Value result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.setOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::SetOrIncr{}); + }); + + tl2::meta::set_create_function_by_name("service1.setOrIncr", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::SetOrIncr{}); + }); + + struct tl2_service1_Strvalue_tl_object : public tl2::meta::tl_object { + tl2::service1::Strvalue object; + explicit tl2_service1_Strvalue_tl_object(tl2::service1::Strvalue o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.strvalue", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Strvalue{}); + }); + + struct tl2_service1_StrvalueWithTime_tl_object : public tl2::meta::tl_object { + tl2::service1::StrvalueWithTime object; + explicit tl2_service1_StrvalueWithTime_tl_object(tl2::service1::StrvalueWithTime o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service1.strvalueWithTime", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::StrvalueWithTime{}); + }); + + struct tl2_service1_Touch_tl_function : public tl2::meta::tl_function { + tl2::service1::Touch object; + explicit tl2_service1_Touch_tl_function(tl2::service1::Touch o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service1.touch", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Touch{}); + }); + + tl2::meta::set_create_function_by_name("service1.touch", []() -> std::unique_ptr { + return std::make_unique(tl2::service1::Touch{}); + }); + + struct tl2_service2_AddOrIncrMany_tl_function : public tl2::meta::tl_function { + tl2::service2::AddOrIncrMany object; + explicit tl2_service2_AddOrIncrMany_tl_function(tl2::service2::AddOrIncrMany o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector<::tl2::service2::CounterSet> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service2.addOrIncrMany", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::AddOrIncrMany{}); + }); + + tl2::meta::set_create_function_by_name("service2.addOrIncrMany", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::AddOrIncrMany{}); + }); + + struct tl2_service2_Set_tl_function : public tl2::meta::tl_function { + tl2::service2::Set object; + explicit tl2_service2_Set_tl_function(tl2::service2::Set o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::True result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service2.set", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::Set{}); + }); + + tl2::meta::set_create_function_by_name("service2.set", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::Set{}); + }); + + struct tl2_service2_SetObjectTtl_tl_function : public tl2::meta::tl_function { + tl2::service2::SetObjectTtl object; + explicit tl2_service2_SetObjectTtl_tl_function(tl2::service2::SetObjectTtl o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::True result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service2.setObjectTtl", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::SetObjectTtl{}); + }); + + tl2::meta::set_create_function_by_name("service2.setObjectTtl", []() -> std::unique_ptr { + return std::make_unique(tl2::service2::SetObjectTtl{}); + }); + + struct tl2_service3_CreateProduct_tl_function : public tl2::meta::tl_function { + tl2::service3::CreateProduct object; + explicit tl2_service3_CreateProduct_tl_function(tl2::service3::CreateProduct o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.createProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::CreateProduct{}); + }); + + tl2::meta::set_create_function_by_name("service3.createProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::CreateProduct{}); + }); + + struct tl2_service3_DeleteAllProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::DeleteAllProducts object; + explicit tl2_service3_DeleteAllProducts_tl_function(tl2::service3::DeleteAllProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.deleteAllProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteAllProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.deleteAllProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteAllProducts{}); + }); + + struct tl2_service3_DeleteGroupedProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::DeleteGroupedProducts object; + explicit tl2_service3_DeleteGroupedProducts_tl_function(tl2::service3::DeleteGroupedProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.deleteGroupedProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteGroupedProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.deleteGroupedProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteGroupedProducts{}); + }); + + struct tl2_service3_DeleteProduct_tl_function : public tl2::meta::tl_function { + tl2::service3::DeleteProduct object; + explicit tl2_service3_DeleteProduct_tl_function(tl2::service3::DeleteProduct o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.deleteProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteProduct{}); + }); + + tl2::meta::set_create_function_by_name("service3.deleteProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::DeleteProduct{}); + }); + + struct tl2_service3_GetLastVisitTimestamp_tl_function : public tl2::meta::tl_function { + tl2::service3::GetLastVisitTimestamp object; + explicit tl2_service3_GetLastVisitTimestamp_tl_function(tl2::service3::GetLastVisitTimestamp o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.getLastVisitTimestamp", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetLastVisitTimestamp{}); + }); + + tl2::meta::set_create_function_by_name("service3.getLastVisitTimestamp", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetLastVisitTimestamp{}); + }); + + struct tl2_service3_GetLimits_tl_function : public tl2::meta::tl_function { + tl2::service3::GetLimits object; + explicit tl2_service3_GetLimits_tl_function(tl2::service3::GetLimits o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service3::Limits result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.getLimits", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetLimits{}); + }); + + tl2::meta::set_create_function_by_name("service3.getLimits", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetLimits{}); + }); + + struct tl2_service3_GetProductStats_tl_function : public tl2::meta::tl_function { + tl2::service3::GetProductStats object; + explicit tl2_service3_GetProductStats_tl_function(tl2::service3::GetProductStats o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.getProductStats", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetProductStats{}); + }); + + tl2::meta::set_create_function_by_name("service3.getProductStats", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetProductStats{}); + }); + + struct tl2_service3_GetProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::GetProducts object; + explicit tl2_service3_GetProducts_tl_function(tl2::service3::GetProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.getProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.getProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetProducts{}); + }); + + struct tl2_service3_GetScheduledProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::GetScheduledProducts object; + explicit tl2_service3_GetScheduledProducts_tl_function(tl2::service3::GetScheduledProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional>> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.getScheduledProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetScheduledProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.getScheduledProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GetScheduledProducts{}); + }); + + struct tl2_service3_GroupCountLimit_tl_object : public tl2::meta::tl_object { + tl2::service3::GroupCountLimit object; + explicit tl2_service3_GroupCountLimit_tl_object(tl2::service3::GroupCountLimit o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service3.groupCountLimit", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GroupCountLimit{}); + }); + + struct tl2_service3_GroupSizeLimit_tl_object : public tl2::meta::tl_object { + tl2::service3::GroupSizeLimit object; + explicit tl2_service3_GroupSizeLimit_tl_object(tl2::service3::GroupSizeLimit o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service3.groupSizeLimit", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::GroupSizeLimit{}); + }); + + struct tl2_service3_Limits_tl_object : public tl2::meta::tl_object { + tl2::service3::Limits object; + explicit tl2_service3_Limits_tl_object(tl2::service3::Limits o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service3.limits", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::Limits{}); + }); + + struct tl2_service3_ProductStatsOld_tl_object : public tl2::meta::tl_object { + tl2::service3::ProductStatsOld object; + explicit tl2_service3_ProductStatsOld_tl_object(tl2::service3::ProductStatsOld o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service3.productStatsOld", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::ProductStatsOld{}); + }); + + struct tl2_service3_RestoreAllProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::RestoreAllProducts object; + explicit tl2_service3_RestoreAllProducts_tl_function(tl2::service3::RestoreAllProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.restoreAllProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreAllProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.restoreAllProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreAllProducts{}); + }); + + struct tl2_service3_RestoreGroupedProducts_tl_function : public tl2::meta::tl_function { + tl2::service3::RestoreGroupedProducts object; + explicit tl2_service3_RestoreGroupedProducts_tl_function(tl2::service3::RestoreGroupedProducts o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.restoreGroupedProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreGroupedProducts{}); + }); + + tl2::meta::set_create_function_by_name("service3.restoreGroupedProducts", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreGroupedProducts{}); + }); + + struct tl2_service3_RestoreProduct_tl_function : public tl2::meta::tl_function { + tl2::service3::RestoreProduct object; + explicit tl2_service3_RestoreProduct_tl_function(tl2::service3::RestoreProduct o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.restoreProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreProduct{}); + }); + + tl2::meta::set_create_function_by_name("service3.restoreProduct", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::RestoreProduct{}); + }); + + struct tl2_service3_SetLastVisitTimestamp_tl_function : public tl2::meta::tl_function { + tl2::service3::SetLastVisitTimestamp object; + explicit tl2_service3_SetLastVisitTimestamp_tl_function(tl2::service3::SetLastVisitTimestamp o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + bool result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.setLastVisitTimestamp", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::SetLastVisitTimestamp{}); + }); + + tl2::meta::set_create_function_by_name("service3.setLastVisitTimestamp", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::SetLastVisitTimestamp{}); + }); + + struct tl2_service3_SetLimits_tl_function : public tl2::meta::tl_function { + tl2::service3::SetLimits object; + explicit tl2_service3_SetLimits_tl_function(tl2::service3::SetLimits o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::BoolStat result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service3.setLimits", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::SetLimits{}); + }); + + tl2::meta::set_create_function_by_name("service3.setLimits", []() -> std::unique_ptr { + return std::make_unique(tl2::service3::SetLimits{}); + }); + + struct tl2_service4_ModifiedNewsEntry_tl_object : public tl2::meta::tl_object { + tl2::service4::ModifiedNewsEntry object; + explicit tl2_service4_ModifiedNewsEntry_tl_object(tl2::service4::ModifiedNewsEntry o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service4.modifiedNewsEntry", []() -> std::unique_ptr { + return std::make_unique(tl2::service4::ModifiedNewsEntry{}); + }); + + struct tl2_service4_Object_tl_object : public tl2::meta::tl_object { + tl2::service4::Object object; + explicit tl2_service4_Object_tl_object(tl2::service4::Object o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service4.object", []() -> std::unique_ptr { + return std::make_unique(tl2::service4::Object{}); + }); + + struct tl2_service5_EmptyOutput_tl_object : public tl2::meta::tl_object { + tl2::service5::EmptyOutput object; + explicit tl2_service5_EmptyOutput_tl_object(tl2::service5::EmptyOutput o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service5.emptyOutput", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::EmptyOutput{}); + }); + + struct tl2_service5_Insert_tl_function : public tl2::meta::tl_function { + tl2::service5::Insert object; + explicit tl2_service5_Insert_tl_function(tl2::service5::Insert o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service5::Output result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service5.insert", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::Insert{}); + }); + + tl2::meta::set_create_function_by_name("service5.insert", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::Insert{}); + }); + + struct tl2_service5_Params_tl_object : public tl2::meta::tl_object { + tl2::service5::Params object; + explicit tl2_service5_Params_tl_object(tl2::service5::Params o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service5.params", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::Params{}); + }); + + struct tl2_service5_PerformQuery_tl_function : public tl2::meta::tl_function { + tl2::service5::PerformQuery object; + explicit tl2_service5_PerformQuery_tl_function(tl2::service5::PerformQuery o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service5::Output result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service5.performQuery", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::PerformQuery{}); + }); + + tl2::meta::set_create_function_by_name("service5.performQuery", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::PerformQuery{}); + }); + + struct tl2_service5_Query_tl_function : public tl2::meta::tl_function { + tl2::service5::Query object; + explicit tl2_service5_Query_tl_function(tl2::service5::Query o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::service5::Output result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service5.query", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::Query{}); + }); + + tl2::meta::set_create_function_by_name("service5.query", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::Query{}); + }); + + struct tl2_service5_StringOutput_tl_object : public tl2::meta::tl_object { + tl2::service5::StringOutput object; + explicit tl2_service5_StringOutput_tl_object(tl2::service5::StringOutput o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service5.stringOutput", []() -> std::unique_ptr { + return std::make_unique(tl2::service5::StringOutput{}); + }); + + struct tl2_service6_Error_tl_object : public tl2::meta::tl_object { + tl2::service6::Error object; + explicit tl2_service6_Error_tl_object(tl2::service6::Error o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service6.error", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::Error{}); + }); + + struct tl2_service6_FindResultRow_tl_object : public tl2::meta::tl_object { + tl2::service6::FindResultRow object; + explicit tl2_service6_FindResultRow_tl_object(tl2::service6::FindResultRow o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service6.findResultRow", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::FindResultRow{}); + }); + + struct tl2_service6_FindWithBoundsResult_tl_object : public tl2::meta::tl_object { + tl2::service6::FindWithBoundsResult object; + explicit tl2_service6_FindWithBoundsResult_tl_object(tl2::service6::FindWithBoundsResult o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("service6.findWithBoundsResult", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::FindWithBoundsResult{}); + }); + + struct tl2_service6_MultiFind_tl_function : public tl2::meta::tl_function { + tl2::service6::MultiFind object; + explicit tl2_service6_MultiFind_tl_function(tl2::service6::MultiFind o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service6.multiFind", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::MultiFind{}); + }); + + tl2::meta::set_create_function_by_name("service6.multiFind", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::MultiFind{}); + }); + + struct tl2_service6_MultiFindWithBounds_tl_function : public tl2::meta::tl_function { + tl2::service6::MultiFindWithBounds object; + explicit tl2_service6_MultiFindWithBounds_tl_function(tl2::service6::MultiFindWithBounds o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector<::tl2::Either>> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("service6.multiFindWithBounds", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::MultiFindWithBounds{}); + }); + + tl2::meta::set_create_function_by_name("service6.multiFindWithBounds", []() -> std::unique_ptr { + return std::make_unique(tl2::service6::MultiFindWithBounds{}); + }); + + struct tl2_StatOne_tl_object : public tl2::meta::tl_object { + tl2::StatOne object; + explicit tl2_StatOne_tl_object(tl2::StatOne o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("statOne", []() -> std::unique_ptr { + return std::make_unique(tl2::StatOne{}); + }); + + struct tl2_tasks_AddTask_tl_function : public tl2::meta::tl_function { + tl2::tasks::AddTask object; + explicit tl2_tasks_AddTask_tl_function(tl2::tasks::AddTask o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + int64_t result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("tasks.addTask", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::AddTask{}); + }); + + tl2::meta::set_create_function_by_name("tasks.addTask", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::AddTask{}); + }); + + struct tl2_tasks_CronTask_tl_object : public tl2::meta::tl_object { + tl2::tasks::CronTask object; + explicit tl2_tasks_CronTask_tl_object(tl2::tasks::CronTask o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.cronTask", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::CronTask{}); + }); + + struct tl2_tasks_CronTaskWithId_tl_object : public tl2::meta::tl_object { + tl2::tasks::CronTaskWithId object; + explicit tl2_tasks_CronTaskWithId_tl_object(tl2::tasks::CronTaskWithId o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.cronTaskWithId", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::CronTaskWithId{}); + }); + + struct tl2_tasks_CronTime_tl_object : public tl2::meta::tl_object { + tl2::tasks::CronTime object; + explicit tl2_tasks_CronTime_tl_object(tl2::tasks::CronTime o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.cronTime", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::CronTime{}); + }); + + struct tl2_tasks_GetAnyTask_tl_function : public tl2::meta::tl_function { + tl2::tasks::GetAnyTask object; + explicit tl2_tasks_GetAnyTask_tl_function(tl2::tasks::GetAnyTask o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional<::tl2::tasks::TaskInfo> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("tasks.getAnyTask", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetAnyTask{}); + }); + + tl2::meta::set_create_function_by_name("tasks.getAnyTask", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetAnyTask{}); + }); + + struct tl2_tasks_GetQueueSize_tl_function : public tl2::meta::tl_function { + tl2::tasks::GetQueueSize object; + explicit tl2_tasks_GetQueueSize_tl_function(tl2::tasks::GetQueueSize o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + tl2::tasks::QueueStats result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("tasks.getQueueSize", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetQueueSize{}); + }); + + tl2::meta::set_create_function_by_name("tasks.getQueueSize", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetQueueSize{}); + }); + + struct tl2_tasks_GetQueueTypes_tl_function : public tl2::meta::tl_function { + tl2::tasks::GetQueueTypes object; + explicit tl2_tasks_GetQueueTypes_tl_function(tl2::tasks::GetQueueTypes o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::vector<::tl2::tasks::QueueTypeInfo> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("tasks.getQueueTypes", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetQueueTypes{}); + }); + + tl2::meta::set_create_function_by_name("tasks.getQueueTypes", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetQueueTypes{}); + }); + + struct tl2_tasks_GetTaskFromQueue_tl_function : public tl2::meta::tl_function { + tl2::tasks::GetTaskFromQueue object; + explicit tl2_tasks_GetTaskFromQueue_tl_function(tl2::tasks::GetTaskFromQueue o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional<::tl2::tasks::TaskInfo> result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("tasks.getTaskFromQueue", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetTaskFromQueue{}); + }); + + tl2::meta::set_create_function_by_name("tasks.getTaskFromQueue", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::GetTaskFromQueue{}); + }); + + struct tl2_tasks_QueueTypeInfo_tl_object : public tl2::meta::tl_object { + tl2::tasks::QueueTypeInfo object; + explicit tl2_tasks_QueueTypeInfo_tl_object(tl2::tasks::QueueTypeInfo o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.queueTypeInfo", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::QueueTypeInfo{}); + }); + + struct tl2_tasks_QueueTypeSettings_tl_object : public tl2::meta::tl_object { + tl2::tasks::QueueTypeSettings object; + explicit tl2_tasks_QueueTypeSettings_tl_object(tl2::tasks::QueueTypeSettings o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.queueTypeSettings", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::QueueTypeSettings{}); + }); + + struct tl2_tasks_QueueTypeStats_tl_object : public tl2::meta::tl_object { + tl2::tasks::QueueTypeStats object; + explicit tl2_tasks_QueueTypeStats_tl_object(tl2::tasks::QueueTypeStats o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.queueTypeStats", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::QueueTypeStats{}); + }); + + struct tl2_tasks_Task_tl_object : public tl2::meta::tl_object { + tl2::tasks::Task object; + explicit tl2_tasks_Task_tl_object(tl2::tasks::Task o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.task", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::Task{}); + }); + + struct tl2_tasks_TaskInfo_tl_object : public tl2::meta::tl_object { + tl2::tasks::TaskInfo object; + explicit tl2_tasks_TaskInfo_tl_object(tl2::tasks::TaskInfo o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.taskInfo", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::TaskInfo{}); + }); + + struct tl2_tasks_TaskStatusInProgress_tl_object : public tl2::meta::tl_object { + tl2::tasks::TaskStatusInProgress object; + explicit tl2_tasks_TaskStatusInProgress_tl_object(tl2::tasks::TaskStatusInProgress o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.taskStatusInProgress", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::TaskStatusInProgress{}); + }); + + struct tl2_tasks_TaskStatusNotCurrentlyInEngine_tl_object : public tl2::meta::tl_object { + tl2::tasks::TaskStatusNotCurrentlyInEngine object; + explicit tl2_tasks_TaskStatusNotCurrentlyInEngine_tl_object(tl2::tasks::TaskStatusNotCurrentlyInEngine o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.taskStatusNotCurrentlyInEngine", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::TaskStatusNotCurrentlyInEngine{}); + }); + + struct tl2_tasks_TaskStatusScheduled_tl_object : public tl2::meta::tl_object { + tl2::tasks::TaskStatusScheduled object; + explicit tl2_tasks_TaskStatusScheduled_tl_object(tl2::tasks::TaskStatusScheduled o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.taskStatusScheduled", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::TaskStatusScheduled{}); + }); + + struct tl2_tasks_TaskStatusWaiting_tl_object : public tl2::meta::tl_object { + tl2::tasks::TaskStatusWaiting object; + explicit tl2_tasks_TaskStatusWaiting_tl_object(tl2::tasks::TaskStatusWaiting o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tasks.taskStatusWaiting", []() -> std::unique_ptr { + return std::make_unique(tl2::tasks::TaskStatusWaiting{}); + }); + + struct tl2_tree_stats_ObjectLimitValueLong_tl_object : public tl2::meta::tl_object { + tl2::tree_stats::ObjectLimitValueLong object; + explicit tl2_tree_stats_ObjectLimitValueLong_tl_object(tl2::tree_stats::ObjectLimitValueLong o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("tree_stats.objectLimitValueLong", []() -> std::unique_ptr { + return std::make_unique(tl2::tree_stats::ObjectLimitValueLong{}); + }); + + struct tl2_True_tl_object : public tl2::meta::tl_object { + tl2::True object; + explicit tl2_True_tl_object(tl2::True o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("true", []() -> std::unique_ptr { + return std::make_unique(tl2::True{}); + }); + + struct tl2_unique_Get_tl_function : public tl2::meta::tl_function { + tl2::unique::Get object; + explicit tl2_unique_Get_tl_function(tl2::unique::Get o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + std::optional result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("unique.get", []() -> std::unique_ptr { + return std::make_unique(tl2::unique::Get{}); + }); + + tl2::meta::set_create_function_by_name("unique.get", []() -> std::unique_ptr { + return std::make_unique(tl2::unique::Get{}); + }); + + struct tl2_unique_StringToInt_tl_function : public tl2::meta::tl_function { + tl2::unique::StringToInt object; + explicit tl2_unique_StringToInt_tl_function(tl2::unique::StringToInt o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + bool read_write_result(basictl::tl_istream &in, basictl::tl_ostream &out) { + int32_t result; + bool read_result = this->object.read_result(in, result); + if (!read_result) { + return false; + } + return this->object.write_result(out, result); + } + + }; + tl2::meta::set_create_object_by_name("unique.stringToInt", []() -> std::unique_ptr { + return std::make_unique(tl2::unique::StringToInt{}); + }); + + tl2::meta::set_create_function_by_name("unique.stringToInt", []() -> std::unique_ptr { + return std::make_unique(tl2::unique::StringToInt{}); + }); + + struct tl2_WithFloat_tl_object : public tl2::meta::tl_object { + tl2::WithFloat object; + explicit tl2_WithFloat_tl_object(tl2::WithFloat o) : object(std::move(o)) {} + + bool read(basictl::tl_istream &s) override {return object.read(s);} + bool write(basictl::tl_ostream &s) override {return object.write(s);} + + bool read_boxed(basictl::tl_istream &s) override {return object.read_boxed(s);} + bool write_boxed(basictl::tl_ostream &s) override {return object.write_boxed(s);} + + }; + tl2::meta::set_create_object_by_name("withFloat", []() -> std::unique_ptr { + return std::make_unique(tl2::WithFloat{}); + }); + +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/__factory/headers.hpp b/internal/tlcodegen/test/gen/schema_cpp/__factory/headers.hpp new file mode 100644 index 00000000..2b9f810c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__factory/headers.hpp @@ -0,0 +1,7 @@ + +#pragma once +namespace tl2 { + namespace factory { + void set_all_factories(); + } +} \ No newline at end of file diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/Either.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/Either.hpp new file mode 100644 index 00000000..71b30183 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/Either.hpp @@ -0,0 +1,40 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/Either.hpp" +#include "../../../service6/types/service6.findWithBoundsResult.hpp" +#include "../../../service6/types/service6.findResultRow.hpp" +#include "../../../service6/types/service6.error.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorEitherIntVectorService6FindWithBoundsResultReset(std::vector<::tl2::Either>>& item); +bool BuiltinVectorEitherIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item); +bool BuiltinVectorEitherIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorEitherService6ErrorVectorService6FindResultRowReset(std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool BuiltinVectorEitherService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool BuiltinVectorEitherService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void EitherIntVectorService6FindWithBoundsResultReset(::tl2::Either>& item); +bool EitherIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Either>& item); +bool EitherIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Either>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void EitherService6ErrorVectorService6FindResultRowReset(::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool EitherService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool EitherService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/MyValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/MyValue.hpp new file mode 100644 index 00000000..92e07d18 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/MyValue.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/MyValue.hpp" + +namespace tl2 { namespace details { + +void MyValueReset(::tl2::MyValue& item); +bool MyValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyValue& item); +bool MyValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyValue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/benchObject.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/benchObject.hpp new file mode 100644 index 00000000..80c6513d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/benchObject.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/benchObject.hpp" + +namespace tl2 { namespace details { + +void BenchObjectReset(::tl2::BenchObject& item); +bool BenchObjectRead(::basictl::tl_istream & s, ::tl2::BenchObject& item); +bool BenchObjectWrite(::basictl::tl_ostream & s, const ::tl2::BenchObject& item); +bool BenchObjectReadBoxed(::basictl::tl_istream & s, ::tl2::BenchObject& item); +bool BenchObjectWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BenchObject& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedArray.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedArray.hpp new file mode 100644 index 00000000..3616aa0b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedArray.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedArray.hpp" +#include "../../../__common/types/myBoxedArray.hpp" + +namespace tl2 { namespace details { + +void BoxedArrayReset(::tl2::BoxedArray& item); +bool BoxedArrayRead(::basictl::tl_istream & s, ::tl2::BoxedArray& item); +bool BoxedArrayWrite(::basictl::tl_ostream & s, const ::tl2::BoxedArray& item); +bool BoxedArrayReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedArray& item); +bool BoxedArrayWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedArray& item); + +bool BoxedArrayReadResult(::basictl::tl_istream & s, ::tl2::BoxedArray& item, ::tl2::MyBoxedArray& result); +bool BoxedArrayWriteResult(::basictl::tl_ostream & s, ::tl2::BoxedArray& item, ::tl2::MyBoxedArray& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedInt.hpp new file mode 100644 index 00000000..bb08e445 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedInt.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedInt.hpp" + +namespace tl2 { namespace details { + +void BoxedIntReset(::tl2::BoxedInt& item); +bool BoxedIntRead(::basictl::tl_istream & s, ::tl2::BoxedInt& item); +bool BoxedIntWrite(::basictl::tl_ostream & s, const ::tl2::BoxedInt& item); +bool BoxedIntReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedInt& item); +bool BoxedIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedInt& item); + +bool BoxedIntReadResult(::basictl::tl_istream & s, ::tl2::BoxedInt& item, int32_t& result); +bool BoxedIntWriteResult(::basictl::tl_ostream & s, ::tl2::BoxedInt& item, int32_t& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedString.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedString.hpp new file mode 100644 index 00000000..b0b323c9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedString.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedString.hpp" + +namespace tl2 { namespace details { + +void BoxedStringReset(::tl2::BoxedString& item); +bool BoxedStringRead(::basictl::tl_istream & s, ::tl2::BoxedString& item); +bool BoxedStringWrite(::basictl::tl_ostream & s, const ::tl2::BoxedString& item); +bool BoxedStringReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedString& item); +bool BoxedStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedString& item); + +bool BoxedStringReadResult(::basictl::tl_istream & s, ::tl2::BoxedString& item, std::string& result); +bool BoxedStringWriteResult(::basictl::tl_ostream & s, ::tl2::BoxedString& item, std::string& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTuple.hpp new file mode 100644 index 00000000..779663a9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTuple.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedTuple.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BoxedTupleReset(::tl2::BoxedTuple& item); +bool BoxedTupleRead(::basictl::tl_istream & s, ::tl2::BoxedTuple& item); +bool BoxedTupleWrite(::basictl::tl_ostream & s, const ::tl2::BoxedTuple& item); +bool BoxedTupleReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTuple& item); +bool BoxedTupleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTuple& item); + +bool BoxedTupleReadResult(::basictl::tl_istream & s, ::tl2::BoxedTuple& item, std::array& result); +bool BoxedTupleWriteResult(::basictl::tl_ostream & s, ::tl2::BoxedTuple& item, std::array& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice1.hpp new file mode 100644 index 00000000..87cb9f9d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice1.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedTupleSlice1.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BoxedTupleSlice1Reset(::tl2::BoxedTupleSlice1& item); +bool BoxedTupleSlice1Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice1& item); +bool BoxedTupleSlice1Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice1& item); +bool BoxedTupleSlice1ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice1& item); +bool BoxedTupleSlice1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice1& item); + +bool BoxedTupleSlice1ReadResult(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice1& item, std::vector& result); +bool BoxedTupleSlice1WriteResult(::basictl::tl_ostream & s, ::tl2::BoxedTupleSlice1& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice2.hpp new file mode 100644 index 00000000..5163ea09 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice2.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedTupleSlice2.hpp" +#include "../../../__common/types/myBoxedTupleSlice.hpp" + +namespace tl2 { namespace details { + +void BoxedTupleSlice2Reset(::tl2::BoxedTupleSlice2& item); +bool BoxedTupleSlice2Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice2& item); +bool BoxedTupleSlice2Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice2& item); +bool BoxedTupleSlice2ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice2& item); +bool BoxedTupleSlice2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice2& item); + +bool BoxedTupleSlice2ReadResult(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice2& item, ::tl2::MyBoxedTupleSlice& result); +bool BoxedTupleSlice2WriteResult(::basictl::tl_ostream & s, ::tl2::BoxedTupleSlice2& item, ::tl2::MyBoxedTupleSlice& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice3.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice3.hpp new file mode 100644 index 00000000..4441f788 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedTupleSlice3.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedTupleSlice3.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BoxedTupleSlice3Reset(::tl2::BoxedTupleSlice3& item); +bool BoxedTupleSlice3Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice3& item); +bool BoxedTupleSlice3Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice3& item); +bool BoxedTupleSlice3ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice3& item); +bool BoxedTupleSlice3WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice3& item); + +bool BoxedTupleSlice3ReadResult(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice3& item, std::vector& result); +bool BoxedTupleSlice3WriteResult(::basictl::tl_ostream & s, ::tl2::BoxedTupleSlice3& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32.hpp new file mode 100644 index 00000000..4d33c332 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedVector32.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BoxedVector32Reset(::tl2::BoxedVector32& item); +bool BoxedVector32Read(::basictl::tl_istream & s, ::tl2::BoxedVector32& item); +bool BoxedVector32Write(::basictl::tl_ostream & s, const ::tl2::BoxedVector32& item); +bool BoxedVector32ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector32& item); +bool BoxedVector32WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector32& item); + +bool BoxedVector32ReadResult(::basictl::tl_istream & s, ::tl2::BoxedVector32& item, std::vector& result); +bool BoxedVector32WriteResult(::basictl::tl_ostream & s, ::tl2::BoxedVector32& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32BoxedElem.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32BoxedElem.hpp new file mode 100644 index 00000000..ffb00bed --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector32BoxedElem.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedVector32BoxedElem.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BoxedVector32BoxedElemReset(::tl2::BoxedVector32BoxedElem& item); +bool BoxedVector32BoxedElemRead(::basictl::tl_istream & s, ::tl2::BoxedVector32BoxedElem& item); +bool BoxedVector32BoxedElemWrite(::basictl::tl_ostream & s, const ::tl2::BoxedVector32BoxedElem& item); +bool BoxedVector32BoxedElemReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector32BoxedElem& item); +bool BoxedVector32BoxedElemWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector32BoxedElem& item); + +bool BoxedVector32BoxedElemReadResult(::basictl::tl_istream & s, ::tl2::BoxedVector32BoxedElem& item, std::vector& result); +bool BoxedVector32BoxedElemWriteResult(::basictl::tl_ostream & s, ::tl2::BoxedVector32BoxedElem& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector64.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector64.hpp new file mode 100644 index 00000000..6d82041a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/boxedVector64.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/boxedVector64.hpp" +#include "../../../__common/types/long.hpp" + +namespace tl2 { namespace details { + +void BoxedVector64Reset(::tl2::BoxedVector64& item); +bool BoxedVector64Read(::basictl::tl_istream & s, ::tl2::BoxedVector64& item); +bool BoxedVector64Write(::basictl::tl_ostream & s, const ::tl2::BoxedVector64& item); +bool BoxedVector64ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector64& item); +bool BoxedVector64WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector64& item); + +bool BoxedVector64ReadResult(::basictl::tl_istream & s, ::tl2::BoxedVector64& item, std::vector& result); +bool BoxedVector64WriteResult(::basictl::tl_ostream & s, ::tl2::BoxedVector64& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/double.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/double.hpp new file mode 100644 index 00000000..3f488629 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/double.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/double.hpp" + +namespace tl2 { namespace details { + +void DoubleReset(double& item); +bool DoubleRead(::basictl::tl_istream & s, double& item); +bool DoubleWrite(::basictl::tl_ostream & s, const double& item); +bool DoubleReadBoxed(::basictl::tl_istream & s, double& item); +bool DoubleWriteBoxed(::basictl::tl_ostream & s, const double& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict1.hpp new file mode 100644 index 00000000..c5df8a2b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict1.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/fieldConflict1.hpp" + +namespace tl2 { namespace details { + +void FieldConflict1Reset(::tl2::FieldConflict1& item); +bool FieldConflict1Read(::basictl::tl_istream & s, ::tl2::FieldConflict1& item); +bool FieldConflict1Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict1& item); +bool FieldConflict1ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict1& item); +bool FieldConflict1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict1& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict2.hpp new file mode 100644 index 00000000..43607b74 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict2.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/fieldConflict2.hpp" + +namespace tl2 { namespace details { + +void FieldConflict2Reset(::tl2::FieldConflict2& item); +bool FieldConflict2Read(::basictl::tl_istream & s, ::tl2::FieldConflict2& item); +bool FieldConflict2Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict2& item); +bool FieldConflict2ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict2& item); +bool FieldConflict2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict2& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict3.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict3.hpp new file mode 100644 index 00000000..1accb578 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict3.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/fieldConflict3.hpp" + +namespace tl2 { namespace details { + +void FieldConflict3Reset(::tl2::FieldConflict3& item); +bool FieldConflict3Read(::basictl::tl_istream & s, ::tl2::FieldConflict3& item); +bool FieldConflict3Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict3& item); +bool FieldConflict3ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict3& item); +bool FieldConflict3WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict3& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict4.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict4.hpp new file mode 100644 index 00000000..f858cfcd --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/fieldConflict4.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/fieldConflict4.hpp" + +namespace tl2 { namespace details { + +void FieldConflict4Reset(::tl2::FieldConflict4& item); +bool FieldConflict4Read(::basictl::tl_istream & s, ::tl2::FieldConflict4& item); +bool FieldConflict4Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict4& item); +bool FieldConflict4ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict4& item); +bool FieldConflict4WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict4& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/float.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/float.hpp new file mode 100644 index 00000000..d4fcada9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/float.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/float.hpp" + +namespace tl2 { namespace details { + +void FloatReset(float& item); +bool FloatRead(::basictl::tl_istream & s, float& item); +bool FloatWrite(::basictl::tl_ostream & s, const float& item); +bool FloatReadBoxed(::basictl::tl_istream & s, float& item); +bool FloatWriteBoxed(::basictl::tl_ostream & s, const float& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getDouble.hpp new file mode 100644 index 00000000..9aecf696 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getDouble.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getDouble.hpp" + +namespace tl2 { namespace details { + +void GetDoubleReset(::tl2::GetDouble& item); +bool GetDoubleRead(::basictl::tl_istream & s, ::tl2::GetDouble& item); +bool GetDoubleWrite(::basictl::tl_ostream & s, const ::tl2::GetDouble& item); +bool GetDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::GetDouble& item); +bool GetDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetDouble& item); + +bool GetDoubleReadResult(::basictl::tl_istream & s, ::tl2::GetDouble& item, double& result); +bool GetDoubleWriteResult(::basictl::tl_ostream & s, ::tl2::GetDouble& item, double& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getFloat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getFloat.hpp new file mode 100644 index 00000000..6ff18201 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getFloat.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getFloat.hpp" + +namespace tl2 { namespace details { + +void GetFloatReset(::tl2::GetFloat& item); +bool GetFloatRead(::basictl::tl_istream & s, ::tl2::GetFloat& item); +bool GetFloatWrite(::basictl::tl_ostream & s, const ::tl2::GetFloat& item); +bool GetFloatReadBoxed(::basictl::tl_istream & s, ::tl2::GetFloat& item); +bool GetFloatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetFloat& item); + +bool GetFloatReadResult(::basictl::tl_istream & s, ::tl2::GetFloat& item, float& result); +bool GetFloatWriteResult(::basictl::tl_ostream & s, ::tl2::GetFloat& item, float& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMaybeIface.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMaybeIface.hpp new file mode 100644 index 00000000..4538204b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMaybeIface.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getMaybeIface.hpp" +#include "../../../service1/types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void GetMaybeIfaceReset(::tl2::GetMaybeIface& item); +bool GetMaybeIfaceRead(::basictl::tl_istream & s, ::tl2::GetMaybeIface& item); +bool GetMaybeIfaceWrite(::basictl::tl_ostream & s, const ::tl2::GetMaybeIface& item); +bool GetMaybeIfaceReadBoxed(::basictl::tl_istream & s, ::tl2::GetMaybeIface& item); +bool GetMaybeIfaceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMaybeIface& item); + +bool GetMaybeIfaceReadResult(::basictl::tl_istream & s, ::tl2::GetMaybeIface& item, std::optional<::tl2::service1::Value>& result); +bool GetMaybeIfaceWriteResult(::basictl::tl_ostream & s, ::tl2::GetMaybeIface& item, std::optional<::tl2::service1::Value>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDictOfInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDictOfInt.hpp new file mode 100644 index 00000000..ee7c13eb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDictOfInt.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getMyDictOfInt.hpp" +#include "../../../__common/types/myDictOfInt.hpp" + +namespace tl2 { namespace details { + +void GetMyDictOfIntReset(::tl2::GetMyDictOfInt& item); +bool GetMyDictOfIntRead(::basictl::tl_istream & s, ::tl2::GetMyDictOfInt& item); +bool GetMyDictOfIntWrite(::basictl::tl_ostream & s, const ::tl2::GetMyDictOfInt& item); +bool GetMyDictOfIntReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyDictOfInt& item); +bool GetMyDictOfIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyDictOfInt& item); + +bool GetMyDictOfIntReadResult(::basictl::tl_istream & s, ::tl2::GetMyDictOfInt& item, ::tl2::MyDictOfInt& result); +bool GetMyDictOfIntWriteResult(::basictl::tl_ostream & s, ::tl2::GetMyDictOfInt& item, ::tl2::MyDictOfInt& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDouble.hpp new file mode 100644 index 00000000..cf02100d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyDouble.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getMyDouble.hpp" +#include "../../../__common/types/myDouble.hpp" + +namespace tl2 { namespace details { + +void GetMyDoubleReset(::tl2::GetMyDouble& item); +bool GetMyDoubleRead(::basictl::tl_istream & s, ::tl2::GetMyDouble& item); +bool GetMyDoubleWrite(::basictl::tl_ostream & s, const ::tl2::GetMyDouble& item); +bool GetMyDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyDouble& item); +bool GetMyDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyDouble& item); + +bool GetMyDoubleReadResult(::basictl::tl_istream & s, ::tl2::GetMyDouble& item, ::tl2::MyDouble& result); +bool GetMyDoubleWriteResult(::basictl::tl_ostream & s, ::tl2::GetMyDouble& item, ::tl2::MyDouble& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyValue.hpp new file mode 100644 index 00000000..af9a9c8d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getMyValue.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getMyValue.hpp" +#include "../../../__common/types/MyValue.hpp" + +namespace tl2 { namespace details { + +void GetMyValueReset(::tl2::GetMyValue& item); +bool GetMyValueRead(::basictl::tl_istream & s, ::tl2::GetMyValue& item); +bool GetMyValueWrite(::basictl::tl_ostream & s, const ::tl2::GetMyValue& item); +bool GetMyValueReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyValue& item); +bool GetMyValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyValue& item); + +bool GetMyValueReadResult(::basictl::tl_istream & s, ::tl2::GetMyValue& item, ::tl2::MyValue& result); +bool GetMyValueWriteResult(::basictl::tl_ostream & s, ::tl2::GetMyValue& item, ::tl2::MyValue& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getNonOptNat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getNonOptNat.hpp new file mode 100644 index 00000000..ec6e5f72 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getNonOptNat.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getNonOptNat.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void GetNonOptNatReset(::tl2::GetNonOptNat& item); +bool GetNonOptNatRead(::basictl::tl_istream & s, ::tl2::GetNonOptNat& item); +bool GetNonOptNatWrite(::basictl::tl_ostream & s, const ::tl2::GetNonOptNat& item); +bool GetNonOptNatReadBoxed(::basictl::tl_istream & s, ::tl2::GetNonOptNat& item); +bool GetNonOptNatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetNonOptNat& item); + +bool GetNonOptNatReadResult(::basictl::tl_istream & s, ::tl2::GetNonOptNat& item, std::vector& result); +bool GetNonOptNatWriteResult(::basictl::tl_ostream & s, ::tl2::GetNonOptNat& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getStats.hpp new file mode 100644 index 00000000..6fc3c4f7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/getStats.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/getStats.hpp" +#include "../../../tasks/types/tasks.queueTypeStats.hpp" + +namespace tl2 { namespace details { + +void GetStatsReset(::tl2::GetStats& item); +bool GetStatsRead(::basictl::tl_istream & s, ::tl2::GetStats& item); +bool GetStatsWrite(::basictl::tl_ostream & s, const ::tl2::GetStats& item); +bool GetStatsReadBoxed(::basictl::tl_istream & s, ::tl2::GetStats& item); +bool GetStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetStats& item); + +bool GetStatsReadResult(::basictl::tl_istream & s, ::tl2::GetStats& item, ::tl2::tasks::QueueTypeStats& result); +bool GetStatsWriteResult(::basictl::tl_ostream & s, ::tl2::GetStats& item, ::tl2::tasks::QueueTypeStats& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/get_arrays.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/get_arrays.hpp new file mode 100644 index 00000000..eb22c3f3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/get_arrays.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/functions/get_arrays.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void GetArraysReset(::tl2::Get_arrays& item); +bool GetArraysRead(::basictl::tl_istream & s, ::tl2::Get_arrays& item); +bool GetArraysWrite(::basictl::tl_ostream & s, const ::tl2::Get_arrays& item); +bool GetArraysReadBoxed(::basictl::tl_istream & s, ::tl2::Get_arrays& item); +bool GetArraysWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Get_arrays& item); + +bool GetArraysReadResult(::basictl::tl_istream & s, ::tl2::Get_arrays& item, std::array& result); +bool GetArraysWriteResult(::basictl::tl_ostream & s, ::tl2::Get_arrays& item, std::array& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/int.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/int.hpp new file mode 100644 index 00000000..88ce6e23 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/int.hpp @@ -0,0 +1,63 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void BuiltinTuple10IntBoxedReset(std::array& item); +bool BuiltinTuple10IntBoxedRead(::basictl::tl_istream & s, std::array& item); +bool BuiltinTuple10IntBoxedWrite(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinTuple2IntBoxedReset(std::array& item); +bool BuiltinTuple2IntBoxedRead(::basictl::tl_istream & s, std::array& item); +bool BuiltinTuple2IntBoxedWrite(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinTuple3IntReset(std::array& item); +bool BuiltinTuple3IntRead(::basictl::tl_istream & s, std::array& item); +bool BuiltinTuple3IntWrite(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinTuple5IntReset(std::array& item); +bool BuiltinTuple5IntRead(::basictl::tl_istream & s, std::array& item); +bool BuiltinTuple5IntWrite(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinTupleIntBoxedReset(std::vector& item); +bool BuiltinTupleIntBoxedRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool BuiltinTupleIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorIntBoxedReset(std::vector& item); +bool BuiltinVectorIntBoxedRead(::basictl::tl_istream & s, std::vector& item); +bool BuiltinVectorIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void IntReset(int32_t& item); +bool IntRead(::basictl::tl_istream & s, int32_t& item); +bool IntWrite(::basictl::tl_ostream & s, const int32_t& item); +bool IntReadBoxed(::basictl::tl_istream & s, int32_t& item); +bool IntWriteBoxed(::basictl::tl_ostream & s, const int32_t& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/integer.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/integer.hpp new file mode 100644 index 00000000..5990e7a9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/integer.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/integer.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorIntegerReset(std::vector<::tl2::Integer>& item); +bool BuiltinVectorIntegerRead(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item); +bool BuiltinVectorIntegerWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void IntegerReset(::tl2::Integer& item); +bool IntegerRead(::basictl::tl_istream & s, ::tl2::Integer& item); +bool IntegerWrite(::basictl::tl_ostream & s, const ::tl2::Integer& item); +bool IntegerReadBoxed(::basictl::tl_istream & s, ::tl2::Integer& item); +bool IntegerWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Integer& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/issue3498.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/issue3498.hpp new file mode 100644 index 00000000..1a3ffe24 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/issue3498.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/issue3498.hpp" + +namespace tl2 { namespace details { + +void Issue3498Reset(::tl2::Issue3498& item); +bool Issue3498Read(::basictl::tl_istream & s, ::tl2::Issue3498& item); +bool Issue3498Write(::basictl::tl_ostream & s, const ::tl2::Issue3498& item); +bool Issue3498ReadBoxed(::basictl::tl_istream & s, ::tl2::Issue3498& item); +bool Issue3498WriteBoxed(::basictl::tl_ostream & s, const ::tl2::Issue3498& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/left.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/left.hpp new file mode 100644 index 00000000..cfa7434a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/left.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/left.hpp" +#include "../../../service6/types/service6.findWithBoundsResult.hpp" +#include "../../../service6/types/service6.findResultRow.hpp" +#include "../../../service6/types/service6.error.hpp" + +namespace tl2 { namespace details { + +void LeftIntVectorService6FindWithBoundsResultReset(::tl2::Left>& item); +bool LeftIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::Left>& item); +bool LeftIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::Left>& item); +bool LeftIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Left>& item); +bool LeftIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Left>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void LeftService6ErrorVectorService6FindResultRowReset(::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool LeftService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool LeftService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool LeftService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool LeftService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/long.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/long.hpp new file mode 100644 index 00000000..53c35b7a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/long.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/long.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorLongBoxedReset(std::vector& item); +bool BuiltinVectorLongBoxedRead(::basictl::tl_istream & s, std::vector& item); +bool BuiltinVectorLongBoxedWrite(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void LongReset(int64_t& item); +bool LongRead(::basictl::tl_istream & s, int64_t& item); +bool LongWrite(::basictl::tl_ostream & s, const int64_t& item); +bool LongReadBoxed(::basictl::tl_istream & s, int64_t& item); +bool LongWriteBoxed(::basictl::tl_ostream & s, const int64_t& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/map.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/map.hpp new file mode 100644 index 00000000..cef690ed --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/map.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/map.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorMapStringStringReset(std::vector<::tl2::Map>& item); +bool BuiltinVectorMapStringStringRead(::basictl::tl_istream & s, std::vector<::tl2::Map>& item); +bool BuiltinVectorMapStringStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void MapStringStringReset(::tl2::Map& item); +bool MapStringStringRead(::basictl::tl_istream & s, ::tl2::Map& item); +bool MapStringStringWrite(::basictl::tl_ostream & s, const ::tl2::Map& item); +bool MapStringStringReadBoxed(::basictl::tl_istream & s, ::tl2::Map& item); +bool MapStringStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Map& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myAnonMcValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myAnonMcValue.hpp new file mode 100644 index 00000000..773b7cca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myAnonMcValue.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myAnonMcValue.hpp" + +namespace tl2 { namespace details { + +void MyAnonMcValueReset(::tl2::MyAnonMcValue& item); +bool MyAnonMcValueRead(::basictl::tl_istream & s, ::tl2::MyAnonMcValue& item); +bool MyAnonMcValueWrite(::basictl::tl_ostream & s, const ::tl2::MyAnonMcValue& item); +bool MyAnonMcValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyAnonMcValue& item); +bool MyAnonMcValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyAnonMcValue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedArray.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedArray.hpp new file mode 100644 index 00000000..1232530e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedArray.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myBoxedArray.hpp" + +namespace tl2 { namespace details { + +void MyBoxedArrayReset(::tl2::MyBoxedArray& item); +bool MyBoxedArrayRead(::basictl::tl_istream & s, ::tl2::MyBoxedArray& item); +bool MyBoxedArrayWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedArray& item); +bool MyBoxedArrayReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedArray& item); +bool MyBoxedArrayWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedArray& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedTupleSlice.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedTupleSlice.hpp new file mode 100644 index 00000000..3ec249db --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedTupleSlice.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myBoxedTupleSlice.hpp" + +namespace tl2 { namespace details { + +void MyBoxedTupleSliceReset(::tl2::MyBoxedTupleSlice& item); +bool MyBoxedTupleSliceRead(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice& item); +bool MyBoxedTupleSliceWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedTupleSlice& item); +bool MyBoxedTupleSliceReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice& item); +bool MyBoxedTupleSliceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedTupleSlice& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedVectorSlice.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedVectorSlice.hpp new file mode 100644 index 00000000..608e02d0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myBoxedVectorSlice.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myBoxedVectorSlice.hpp" + +namespace tl2 { namespace details { + +void MyBoxedVectorSliceReset(::tl2::MyBoxedVectorSlice& item); +bool MyBoxedVectorSliceRead(::basictl::tl_istream & s, ::tl2::MyBoxedVectorSlice& item); +bool MyBoxedVectorSliceWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedVectorSlice& item); +bool MyBoxedVectorSliceReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedVectorSlice& item); +bool MyBoxedVectorSliceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedVectorSlice& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDictOfInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDictOfInt.hpp new file mode 100644 index 00000000..f11dd128 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDictOfInt.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myDictOfInt.hpp" + +namespace tl2 { namespace details { + +void MyDictOfIntReset(::tl2::MyDictOfInt& item); +bool MyDictOfIntRead(::basictl::tl_istream & s, ::tl2::MyDictOfInt& item); +bool MyDictOfIntWrite(::basictl::tl_ostream & s, const ::tl2::MyDictOfInt& item); +bool MyDictOfIntReadBoxed(::basictl::tl_istream & s, ::tl2::MyDictOfInt& item); +bool MyDictOfIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyDictOfInt& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDouble.hpp new file mode 100644 index 00000000..61a5a6d8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myDouble.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myDouble.hpp" + +namespace tl2 { namespace details { + +void MyDoubleReset(::tl2::MyDouble& item); +bool MyDoubleRead(::basictl::tl_istream & s, ::tl2::MyDouble& item); +bool MyDoubleWrite(::basictl::tl_ostream & s, const ::tl2::MyDouble& item); +bool MyDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::MyDouble& item); +bool MyDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyDouble& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myInt.hpp new file mode 100644 index 00000000..ff59c129 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myInt.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myInt.hpp" + +namespace tl2 { namespace details { + +void MyIntReset(::tl2::MyInt& item); +bool MyIntRead(::basictl::tl_istream & s, ::tl2::MyInt& item); +bool MyIntWrite(::basictl::tl_ostream & s, const ::tl2::MyInt& item); +bool MyIntReadBoxed(::basictl::tl_istream & s, ::tl2::MyInt& item); +bool MyIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyInt& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe1.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe1.hpp new file mode 100644 index 00000000..418cf8c1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe1.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myMaybe1.hpp" + +namespace tl2 { namespace details { + +void MyMaybe1Reset(::tl2::MyMaybe1& item); +bool MyMaybe1Read(::basictl::tl_istream & s, ::tl2::MyMaybe1& item); +bool MyMaybe1Write(::basictl::tl_ostream & s, const ::tl2::MyMaybe1& item); +bool MyMaybe1ReadBoxed(::basictl::tl_istream & s, ::tl2::MyMaybe1& item); +bool MyMaybe1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMaybe1& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe2.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe2.hpp new file mode 100644 index 00000000..acf38e00 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMaybe2.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myMaybe2.hpp" + +namespace tl2 { namespace details { + +void MyMaybe2Reset(::tl2::MyMaybe2& item); +bool MyMaybe2Read(::basictl::tl_istream & s, ::tl2::MyMaybe2& item); +bool MyMaybe2Write(::basictl::tl_ostream & s, const ::tl2::MyMaybe2& item); +bool MyMaybe2ReadBoxed(::basictl::tl_istream & s, ::tl2::MyMaybe2& item); +bool MyMaybe2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMaybe2& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValue.hpp new file mode 100644 index 00000000..25f63d6b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValue.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myMcValue.hpp" + +namespace tl2 { namespace details { + +void MyMcValueReset(::tl2::MyMcValue& item); +bool MyMcValueRead(::basictl::tl_istream & s, ::tl2::MyMcValue& item); +bool MyMcValueWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValue& item); +bool MyMcValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValue& item); +bool MyMcValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueTuple.hpp new file mode 100644 index 00000000..aa342614 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueTuple.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myMcValueTuple.hpp" + +namespace tl2 { namespace details { + +void MyMcValueTupleReset(::tl2::MyMcValueTuple& item); +bool MyMcValueTupleRead(::basictl::tl_istream & s, ::tl2::MyMcValueTuple& item); +bool MyMcValueTupleWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValueTuple& item); +bool MyMcValueTupleReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValueTuple& item); +bool MyMcValueTupleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValueTuple& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueVector.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueVector.hpp new file mode 100644 index 00000000..dfc2babe --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myMcValueVector.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myMcValueVector.hpp" + +namespace tl2 { namespace details { + +void MyMcValueVectorReset(::tl2::MyMcValueVector& item); +bool MyMcValueVectorRead(::basictl::tl_istream & s, ::tl2::MyMcValueVector& item); +bool MyMcValueVectorWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValueVector& item); +bool MyMcValueVectorReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValueVector& item); +bool MyMcValueVectorWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValueVector& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myString.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myString.hpp new file mode 100644 index 00000000..c0a3c259 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myString.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myString.hpp" + +namespace tl2 { namespace details { + +void MyStringReset(::tl2::MyString& item); +bool MyStringRead(::basictl::tl_istream & s, ::tl2::MyString& item); +bool MyStringWrite(::basictl::tl_ostream & s, const ::tl2::MyString& item); +bool MyStringReadBoxed(::basictl::tl_istream & s, ::tl2::MyString& item); +bool MyStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyString& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTuple.hpp new file mode 100644 index 00000000..f6567792 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTuple.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myTuple.hpp" + +namespace tl2 { namespace details { + +void MyTuple10Reset(::tl2::MyTuplen<10>& item); +bool MyTuple10Read(::basictl::tl_istream & s, ::tl2::MyTuplen<10>& item); +bool MyTuple10Write(::basictl::tl_ostream & s, const ::tl2::MyTuplen<10>& item); +bool MyTuple10ReadBoxed(::basictl::tl_istream & s, ::tl2::MyTuplen<10>& item); +bool MyTuple10WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyTuplen<10>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool MyTuple10MaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::MyTuplen<10>>& item); +bool MyTuple10MaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::MyTuplen<10>>& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTwoDicts.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTwoDicts.hpp new file mode 100644 index 00000000..91550ae8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/myTwoDicts.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/myTwoDicts.hpp" + +namespace tl2 { namespace details { + +void MyTwoDictsReset(::tl2::MyTwoDicts& item); +bool MyTwoDictsRead(::basictl::tl_istream & s, ::tl2::MyTwoDicts& item); +bool MyTwoDictsWrite(::basictl::tl_ostream & s, const ::tl2::MyTwoDicts& item); +bool MyTwoDictsReadBoxed(::basictl::tl_istream & s, ::tl2::MyTwoDicts& item); +bool MyTwoDictsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyTwoDicts& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/nonOptNat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/nonOptNat.hpp new file mode 100644 index 00000000..9a3b12f0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/nonOptNat.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/nonOptNat.hpp" + +namespace tl2 { namespace details { + +void NonOptNatReset(::tl2::NonOptNat& item); +bool NonOptNatRead(::basictl::tl_istream & s, ::tl2::NonOptNat& item); +bool NonOptNatWrite(::basictl::tl_ostream & s, const ::tl2::NonOptNat& item); +bool NonOptNatReadBoxed(::basictl::tl_istream & s, ::tl2::NonOptNat& item); +bool NonOptNatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::NonOptNat& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/right.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/right.hpp new file mode 100644 index 00000000..ec40df62 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/right.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/right.hpp" +#include "../../../service6/types/service6.findWithBoundsResult.hpp" +#include "../../../service6/types/service6.findResultRow.hpp" +#include "../../../service6/types/service6.error.hpp" + +namespace tl2 { namespace details { + +void RightIntVectorService6FindWithBoundsResultReset(::tl2::Right>& item); +bool RightIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::Right>& item); +bool RightIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::Right>& item); +bool RightIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Right>& item); +bool RightIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Right>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void RightService6ErrorVectorService6FindResultRowReset(::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool RightService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool RightService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool RightService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); +bool RightService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/rpcInvokeReqExtra.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/rpcInvokeReqExtra.hpp new file mode 100644 index 00000000..fc37b3db --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/rpcInvokeReqExtra.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/rpcInvokeReqExtra.hpp" + +namespace tl2 { namespace details { + +void RpcInvokeReqExtraReset(::tl2::RpcInvokeReqExtra& item); +bool RpcInvokeReqExtraRead(::basictl::tl_istream & s, ::tl2::RpcInvokeReqExtra& item); +bool RpcInvokeReqExtraWrite(::basictl::tl_ostream & s, const ::tl2::RpcInvokeReqExtra& item); +bool RpcInvokeReqExtraReadBoxed(::basictl::tl_istream & s, ::tl2::RpcInvokeReqExtra& item); +bool RpcInvokeReqExtraWriteBoxed(::basictl::tl_ostream & s, const ::tl2::RpcInvokeReqExtra& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/statOne.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/statOne.hpp new file mode 100644 index 00000000..8e5cbef0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/statOne.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/statOne.hpp" + +namespace tl2 { namespace details { + +void StatOneReset(::tl2::StatOne& item); +bool StatOneRead(::basictl::tl_istream & s, ::tl2::StatOne& item); +bool StatOneWrite(::basictl::tl_ostream & s, const ::tl2::StatOne& item); +bool StatOneReadBoxed(::basictl::tl_istream & s, ::tl2::StatOne& item); +bool StatOneWriteBoxed(::basictl::tl_ostream & s, const ::tl2::StatOne& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/string.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/string.hpp new file mode 100644 index 00000000..972bbb8f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/string.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/string.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorStringReset(std::vector& item); +bool BuiltinVectorStringRead(::basictl::tl_istream & s, std::vector& item); +bool BuiltinVectorStringWrite(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void StringReset(std::string& item); +bool StringRead(::basictl::tl_istream & s, std::string& item); +bool StringWrite(::basictl::tl_ostream & s, const std::string& item); +bool StringReadBoxed(::basictl::tl_istream & s, std::string& item); +bool StringWriteBoxed(::basictl::tl_ostream & s, const std::string& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/tuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/tuple.hpp new file mode 100644 index 00000000..eca400be --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/tuple.hpp @@ -0,0 +1,78 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/tuple.hpp" +#include "../../../service2/types/service2.counterSet.hpp" +#include "../../../service1/types/service1.Value.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void TupleInt3Reset(std::array& item); +bool TupleInt3Read(::basictl::tl_istream & s, std::array& item); +bool TupleInt3Write(::basictl::tl_ostream & s, const std::array& item); +bool TupleInt3ReadBoxed(::basictl::tl_istream & s, std::array& item); +bool TupleInt3WriteBoxed(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleInt5Reset(std::array& item); +bool TupleInt5Read(::basictl::tl_istream & s, std::array& item); +bool TupleInt5Write(::basictl::tl_ostream & s, const std::array& item); +bool TupleInt5ReadBoxed(::basictl::tl_istream & s, std::array& item); +bool TupleInt5WriteBoxed(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleIntBoxedReset(std::vector& item); +bool TupleIntBoxedRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); +bool TupleIntBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleIntBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleIntBoxed10Reset(std::array& item); +bool TupleIntBoxed10Read(::basictl::tl_istream & s, std::array& item); +bool TupleIntBoxed10Write(::basictl::tl_ostream & s, const std::array& item); +bool TupleIntBoxed10ReadBoxed(::basictl::tl_istream & s, std::array& item); +bool TupleIntBoxed10WriteBoxed(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleIntBoxed2Reset(std::array& item); +bool TupleIntBoxed2Read(::basictl::tl_istream & s, std::array& item); +bool TupleIntBoxed2Write(::basictl::tl_ostream & s, const std::array& item); +bool TupleIntBoxed2ReadBoxed(::basictl::tl_istream & s, std::array& item); +bool TupleIntBoxed2WriteBoxed(::basictl::tl_ostream & s, const std::array& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleService1Value3Reset(std::array<::tl2::service1::Value, 3>& item); +bool TupleService1Value3Read(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item); +bool TupleService1Value3Write(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item); +bool TupleService1Value3ReadBoxed(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item); +bool TupleService1Value3WriteBoxed(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleService2CounterSetReset(std::vector<::tl2::service2::CounterSet>& item); +bool TupleService2CounterSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2CounterSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2CounterSetReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2CounterSetWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/vector.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/vector.hpp new file mode 100644 index 00000000..cc8e41d9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/vector.hpp @@ -0,0 +1,126 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../../tasks/types/tasks.queueTypeInfo.hpp" +#include "../../../service6/types/service6.findWithBoundsResult.hpp" +#include "../../../__common/types/map.hpp" +#include "../../../service6/types/service6.findResultRow.hpp" +#include "../../../service6/types/service6.error.hpp" +#include "../../../service1/types/service1.Value.hpp" +#include "../../../__common/types/Either.hpp" +#include "../../../__common/types/string.hpp" +#include "../../../__common/types/long.hpp" +#include "../../../__common/types/integer.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void VectorEitherIntVectorService6FindWithBoundsResultReset(std::vector<::tl2::Either>>& item); +bool VectorEitherIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item); +bool VectorEitherIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item); +bool VectorEitherIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item); +bool VectorEitherIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorEitherService6ErrorVectorService6FindResultRowReset(std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool VectorEitherService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool VectorEitherService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool VectorEitherService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); +bool VectorEitherService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorIntBoxedReset(std::vector& item); +bool VectorIntBoxedRead(::basictl::tl_istream & s, std::vector& item); +bool VectorIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item); +bool VectorIntBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item); +bool VectorIntBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorIntegerReset(std::vector<::tl2::Integer>& item); +bool VectorIntegerRead(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item); +bool VectorIntegerWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item); +bool VectorIntegerReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item); +bool VectorIntegerWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorLongBoxedReset(std::vector& item); +bool VectorLongBoxedRead(::basictl::tl_istream & s, std::vector& item); +bool VectorLongBoxedWrite(::basictl::tl_ostream & s, const std::vector& item); +bool VectorLongBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item); +bool VectorLongBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorMapStringStringReset(std::vector<::tl2::Map>& item); +bool VectorMapStringStringRead(::basictl::tl_istream & s, std::vector<::tl2::Map>& item); +bool VectorMapStringStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item); +bool VectorMapStringStringReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Map>& item); +bool VectorMapStringStringWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService1ValueReset(std::vector<::tl2::service1::Value>& item); +bool VectorService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item); +bool VectorService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item); +bool VectorService1ValueReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item); +bool VectorService1ValueWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService6FindResultRowReset(std::vector<::tl2::service6::FindResultRow>& item); +bool VectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item); +bool VectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item); +bool VectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item); +bool VectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService6FindWithBoundsResultReset(std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool VectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool VectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool VectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool VectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorStringReset(std::vector& item); +bool VectorStringRead(::basictl::tl_istream & s, std::vector& item); +bool VectorStringWrite(::basictl::tl_ostream & s, const std::vector& item); +bool VectorStringReadBoxed(::basictl::tl_istream & s, std::vector& item); +bool VectorStringWriteBoxed(::basictl::tl_ostream & s, const std::vector& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorTasksQueueTypeInfoReset(std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool VectorTasksQueueTypeInfoRead(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool VectorTasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool VectorTasksQueueTypeInfoReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool VectorTasksQueueTypeInfoWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/withFloat.hpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/withFloat.hpp new file mode 100644 index 00000000..7d7e0244 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/headers/withFloat.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/withFloat.hpp" + +namespace tl2 { namespace details { + +void WithFloatReset(::tl2::WithFloat& item); +bool WithFloatRead(::basictl::tl_istream & s, ::tl2::WithFloat& item); +bool WithFloatWrite(::basictl::tl_ostream & s, const ::tl2::WithFloat& item); +bool WithFloatReadBoxed(::basictl::tl_istream & s, ::tl2::WithFloat& item); +bool WithFloatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::WithFloat& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/namespace_details.cpp new file mode 100644 index 00000000..5519e4c5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__independent_types/details/namespace_details.cpp @@ -0,0 +1,3489 @@ +#include "headers/withFloat.hpp" +#include "headers/vector.hpp" +#include "headers/tuple.hpp" +#include "../../tasks/details/headers/tasks.queueTypeInfo.hpp" +#include "headers/string.hpp" +#include "headers/statOne.hpp" +#include "../../service6/details/headers/service6.findWithBoundsResult.hpp" +#include "../../service2/details/headers/service2.counterSet.hpp" +#include "../../service1/details/headers/service1.Value.hpp" +#include "headers/rpcInvokeReqExtra.hpp" +#include "../../__common/details/headers/true.hpp" +#include "headers/nonOptNat.hpp" +#include "headers/myTwoDicts.hpp" +#include "headers/myMcValueVector.hpp" +#include "headers/myMcValueTuple.hpp" +#include "headers/myMcValue.hpp" +#include "headers/myMaybe2.hpp" +#include "headers/myMaybe1.hpp" +#include "headers/myTuple.hpp" +#include "headers/myBoxedVectorSlice.hpp" +#include "headers/myAnonMcValue.hpp" +#include "headers/map.hpp" +#include "headers/long.hpp" +#include "headers/issue3498.hpp" +#include "../../service6/details/headers/service6.findResultRow.hpp" +#include "../../service6/details/headers/service6.error.hpp" +#include "headers/int.hpp" +#include "headers/getStats.hpp" +#include "../../tasks/details/headers/tasks.queueTypeStats.hpp" +#include "headers/getNonOptNat.hpp" +#include "headers/getMyValue.hpp" +#include "headers/MyValue.hpp" +#include "headers/myString.hpp" +#include "headers/myInt.hpp" +#include "headers/getMyDouble.hpp" +#include "headers/myDouble.hpp" +#include "headers/getMyDictOfInt.hpp" +#include "headers/myDictOfInt.hpp" +#include "headers/getMaybeIface.hpp" +#include "headers/getFloat.hpp" +#include "headers/getDouble.hpp" +#include "headers/get_arrays.hpp" +#include "headers/float.hpp" +#include "headers/fieldConflict4.hpp" +#include "headers/fieldConflict3.hpp" +#include "headers/fieldConflict2.hpp" +#include "headers/fieldConflict1.hpp" +#include "headers/Either.hpp" +#include "headers/right.hpp" +#include "headers/left.hpp" +#include "headers/double.hpp" +#include "../../__common/details/headers/dictionary.hpp" +#include "headers/integer.hpp" +#include "../../__common/details/headers/int.hpp" +#include "headers/boxedVector64.hpp" +#include "headers/boxedVector32BoxedElem.hpp" +#include "headers/boxedVector32.hpp" +#include "headers/boxedTupleSlice3.hpp" +#include "headers/boxedTupleSlice2.hpp" +#include "headers/myBoxedTupleSlice.hpp" +#include "headers/boxedTupleSlice1.hpp" +#include "headers/boxedTuple.hpp" +#include "headers/boxedString.hpp" +#include "headers/boxedInt.hpp" +#include "headers/boxedArray.hpp" +#include "headers/myBoxedArray.hpp" +#include "headers/benchObject.hpp" + + +bool tl2::BenchObject::read(::basictl::tl_istream & s) { + if (!::tl2::details::BenchObjectRead(s, *this)) { return false; } + return true; +} + +bool tl2::BenchObject::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BenchObjectWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BenchObject::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BenchObjectReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BenchObject::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BenchObjectWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BenchObjectReset(::tl2::BenchObject& item) { + item.xs.clear(); + item.ys.clear(); +} + +bool tl2::details::BenchObjectRead(::basictl::tl_istream & s, ::tl2::BenchObject& item) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.xs)) { return false; } + if (!::tl2::details::BuiltinVectorIntegerRead(s, item.ys)) { return false; } + return true; +} + +bool tl2::details::BenchObjectWrite(::basictl::tl_ostream & s, const ::tl2::BenchObject& item) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.xs)) { return false; } + if (!::tl2::details::BuiltinVectorIntegerWrite(s, item.ys)) { return false; } + return true; +} + +bool tl2::details::BenchObjectReadBoxed(::basictl::tl_istream & s, ::tl2::BenchObject& item) { + if (!s.nat_read_exact_tag(0xb697e865)) { return false; } + return tl2::details::BenchObjectRead(s, item); +} + +bool tl2::details::BenchObjectWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BenchObject& item) { + if (!s.nat_write(0xb697e865)) { return false; } + return tl2::details::BenchObjectWrite(s, item); +} + +bool tl2::BoxedArray::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedArrayRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedArray::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedArrayWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedArray::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedArrayReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedArray::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedArrayWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedArrayReset(::tl2::BoxedArray& item) { + ::tl2::details::MyBoxedArrayReset(item.x); +} + +bool tl2::details::BoxedArrayRead(::basictl::tl_istream & s, ::tl2::BoxedArray& item) { + if (!::tl2::details::MyBoxedArrayReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedArrayWrite(::basictl::tl_ostream & s, const ::tl2::BoxedArray& item) { + if (!::tl2::details::MyBoxedArrayWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedArrayReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedArray& item) { + if (!s.nat_read_exact_tag(0x95dcc8b7)) { return false; } + return tl2::details::BoxedArrayRead(s, item); +} + +bool tl2::details::BoxedArrayWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedArray& item) { + if (!s.nat_write(0x95dcc8b7)) { return false; } + return tl2::details::BoxedArrayWrite(s, item); +} + +bool tl2::details::BoxedArrayReadResult(::basictl::tl_istream & s, tl2::BoxedArray& item, ::tl2::MyBoxedArray& result) { + if (!::tl2::details::MyBoxedArrayReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedArrayWriteResult(::basictl::tl_ostream & s, tl2::BoxedArray& item, ::tl2::MyBoxedArray& result) { + if (!::tl2::details::MyBoxedArrayWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::BoxedArray::read_result(::basictl::tl_istream & s, ::tl2::MyBoxedArray & result) { + return tl2::details::BoxedArrayReadResult(s, *this, result); +} +bool tl2::BoxedArray::write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedArray & result) { + return tl2::details::BoxedArrayWriteResult(s, *this, result); +} + +bool tl2::BoxedInt::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedIntRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedInt::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedIntWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedInt::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedIntReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedInt::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedIntWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedIntReset(::tl2::BoxedInt& item) { + item.x = 0; +} + +bool tl2::details::BoxedIntRead(::basictl::tl_istream & s, ::tl2::BoxedInt& item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedIntWrite(::basictl::tl_ostream & s, const ::tl2::BoxedInt& item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(item.x)) { return false;} + return true; +} + +bool tl2::details::BoxedIntReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedInt& item) { + if (!s.nat_read_exact_tag(0x5688ebaf)) { return false; } + return tl2::details::BoxedIntRead(s, item); +} + +bool tl2::details::BoxedIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedInt& item) { + if (!s.nat_write(0x5688ebaf)) { return false; } + return tl2::details::BoxedIntWrite(s, item); +} + +bool tl2::details::BoxedIntReadResult(::basictl::tl_istream & s, tl2::BoxedInt& item, int32_t& result) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(result)) { return false; } + return true; +} +bool tl2::details::BoxedIntWriteResult(::basictl::tl_ostream & s, tl2::BoxedInt& item, int32_t& result) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(result)) { return false;} + return true; +} + +bool tl2::BoxedInt::read_result(::basictl::tl_istream & s, int32_t & result) { + return tl2::details::BoxedIntReadResult(s, *this, result); +} +bool tl2::BoxedInt::write_result(::basictl::tl_ostream & s, int32_t & result) { + return tl2::details::BoxedIntWriteResult(s, *this, result); +} + +bool tl2::BoxedString::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedStringRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedString::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedStringWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedString::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedStringReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedString::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedStringWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedStringReset(::tl2::BoxedString& item) { + item.x.clear(); +} + +bool tl2::details::BoxedStringRead(::basictl::tl_istream & s, ::tl2::BoxedString& item) { + if (!s.nat_read_exact_tag(0xb5286e24)) { return false;} + if (!s.string_read(item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedStringWrite(::basictl::tl_ostream & s, const ::tl2::BoxedString& item) { + if (!s.nat_write(0xb5286e24)) { return false; } + if (!s.string_write(item.x)) { return false;} + return true; +} + +bool tl2::details::BoxedStringReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedString& item) { + if (!s.nat_read_exact_tag(0x548994db)) { return false; } + return tl2::details::BoxedStringRead(s, item); +} + +bool tl2::details::BoxedStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedString& item) { + if (!s.nat_write(0x548994db)) { return false; } + return tl2::details::BoxedStringWrite(s, item); +} + +bool tl2::details::BoxedStringReadResult(::basictl::tl_istream & s, tl2::BoxedString& item, std::string& result) { + if (!s.nat_read_exact_tag(0xb5286e24)) { return false;} + if (!s.string_read(result)) { return false; } + return true; +} +bool tl2::details::BoxedStringWriteResult(::basictl::tl_ostream & s, tl2::BoxedString& item, std::string& result) { + if (!s.nat_write(0xb5286e24)) { return false; } + if (!s.string_write(result)) { return false;} + return true; +} + +bool tl2::BoxedString::read_result(::basictl::tl_istream & s, std::string & result) { + return tl2::details::BoxedStringReadResult(s, *this, result); +} +bool tl2::BoxedString::write_result(::basictl::tl_ostream & s, std::string & result) { + return tl2::details::BoxedStringWriteResult(s, *this, result); +} + +bool tl2::BoxedTuple::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTuple::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTuple::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTuple::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedTupleReset(::tl2::BoxedTuple& item) { + ::tl2::details::BuiltinTuple3IntReset(item.x); +} + +bool tl2::details::BoxedTupleRead(::basictl::tl_istream & s, ::tl2::BoxedTuple& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTuple3IntRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleWrite(::basictl::tl_ostream & s, const ::tl2::BoxedTuple& item) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTuple3IntWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTuple& item) { + if (!s.nat_read_exact_tag(0x30c9d533)) { return false; } + return tl2::details::BoxedTupleRead(s, item); +} + +bool tl2::details::BoxedTupleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTuple& item) { + if (!s.nat_write(0x30c9d533)) { return false; } + return tl2::details::BoxedTupleWrite(s, item); +} + +bool tl2::details::BoxedTupleReadResult(::basictl::tl_istream & s, tl2::BoxedTuple& item, std::array& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTuple3IntRead(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedTupleWriteResult(::basictl::tl_ostream & s, tl2::BoxedTuple& item, std::array& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTuple3IntWrite(s, result)) { return false; } + return true; +} + +bool tl2::BoxedTuple::read_result(::basictl::tl_istream & s, std::array & result) { + return tl2::details::BoxedTupleReadResult(s, *this, result); +} +bool tl2::BoxedTuple::write_result(::basictl::tl_ostream & s, std::array & result) { + return tl2::details::BoxedTupleWriteResult(s, *this, result); +} + +bool tl2::BoxedTupleSlice1::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice1Read(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice1::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice1Write(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice1::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice1ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice1::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice1WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedTupleSlice1Reset(::tl2::BoxedTupleSlice1& item) { + item.n = 0; + item.x.clear(); +} + +bool tl2::details::BoxedTupleSlice1Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice1& item) { + if (!s.nat_read(item.n)) { return false; } + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntBoxedRead(s, item.x, item.n)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice1Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice1& item) { + if (!s.nat_write(item.n)) { return false;} + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntBoxedWrite(s, item.x, item.n)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice1ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice1& item) { + if (!s.nat_read_exact_tag(0x25230d40)) { return false; } + return tl2::details::BoxedTupleSlice1Read(s, item); +} + +bool tl2::details::BoxedTupleSlice1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice1& item) { + if (!s.nat_write(0x25230d40)) { return false; } + return tl2::details::BoxedTupleSlice1Write(s, item); +} + +bool tl2::details::BoxedTupleSlice1ReadResult(::basictl::tl_istream & s, tl2::BoxedTupleSlice1& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntBoxedRead(s, result, item.n)) { return false; } + return true; +} +bool tl2::details::BoxedTupleSlice1WriteResult(::basictl::tl_ostream & s, tl2::BoxedTupleSlice1& item, std::vector& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntBoxedWrite(s, result, item.n)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice1::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::BoxedTupleSlice1ReadResult(s, *this, result); +} +bool tl2::BoxedTupleSlice1::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::BoxedTupleSlice1WriteResult(s, *this, result); +} + +bool tl2::BoxedTupleSlice2::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice2Read(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice2::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice2Write(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice2::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice2ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice2::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice2WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedTupleSlice2Reset(::tl2::BoxedTupleSlice2& item) { + ::tl2::details::MyBoxedTupleSliceReset(item.x); +} + +bool tl2::details::BoxedTupleSlice2Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice2& item) { + if (!::tl2::details::MyBoxedTupleSliceReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice2Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice2& item) { + if (!::tl2::details::MyBoxedTupleSliceWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice2ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice2& item) { + if (!s.nat_read_exact_tag(0x1cdf4705)) { return false; } + return tl2::details::BoxedTupleSlice2Read(s, item); +} + +bool tl2::details::BoxedTupleSlice2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice2& item) { + if (!s.nat_write(0x1cdf4705)) { return false; } + return tl2::details::BoxedTupleSlice2Write(s, item); +} + +bool tl2::details::BoxedTupleSlice2ReadResult(::basictl::tl_istream & s, tl2::BoxedTupleSlice2& item, ::tl2::MyBoxedTupleSlice& result) { + if (!::tl2::details::MyBoxedTupleSliceReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedTupleSlice2WriteResult(::basictl::tl_ostream & s, tl2::BoxedTupleSlice2& item, ::tl2::MyBoxedTupleSlice& result) { + if (!::tl2::details::MyBoxedTupleSliceWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice2::read_result(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice & result) { + return tl2::details::BoxedTupleSlice2ReadResult(s, *this, result); +} +bool tl2::BoxedTupleSlice2::write_result(::basictl::tl_ostream & s, ::tl2::MyBoxedTupleSlice & result) { + return tl2::details::BoxedTupleSlice2WriteResult(s, *this, result); +} + +bool tl2::BoxedTupleSlice3::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice3Read(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice3::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice3Write(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice3::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedTupleSlice3ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice3::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedTupleSlice3WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedTupleSlice3Reset(::tl2::BoxedTupleSlice3& item) { + item.n = 0; + item.x.clear(); +} + +bool tl2::details::BoxedTupleSlice3Read(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice3& item) { + if (!s.nat_read(item.n)) { return false; } + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntRead(s, item.x, item.n)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice3Write(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice3& item) { + if (!s.nat_write(item.n)) { return false;} + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, item.x, item.n)) { return false; } + return true; +} + +bool tl2::details::BoxedTupleSlice3ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedTupleSlice3& item) { + if (!s.nat_read_exact_tag(0xa19b8106)) { return false; } + return tl2::details::BoxedTupleSlice3Read(s, item); +} + +bool tl2::details::BoxedTupleSlice3WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedTupleSlice3& item) { + if (!s.nat_write(0xa19b8106)) { return false; } + return tl2::details::BoxedTupleSlice3Write(s, item); +} + +bool tl2::details::BoxedTupleSlice3ReadResult(::basictl::tl_istream & s, tl2::BoxedTupleSlice3& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntRead(s, result, item.n)) { return false; } + return true; +} +bool tl2::details::BoxedTupleSlice3WriteResult(::basictl::tl_ostream & s, tl2::BoxedTupleSlice3& item, std::vector& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, result, item.n)) { return false; } + return true; +} + +bool tl2::BoxedTupleSlice3::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::BoxedTupleSlice3ReadResult(s, *this, result); +} +bool tl2::BoxedTupleSlice3::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::BoxedTupleSlice3WriteResult(s, *this, result); +} + +bool tl2::BoxedVector32::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector32Read(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector32Write(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector32ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector32WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedVector32Reset(::tl2::BoxedVector32& item) { + item.x.clear(); +} + +bool tl2::details::BoxedVector32Read(::basictl::tl_istream & s, ::tl2::BoxedVector32& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector32Write(::basictl::tl_ostream & s, const ::tl2::BoxedVector32& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector32ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector32& item) { + if (!s.nat_read_exact_tag(0xbbadef07)) { return false; } + return tl2::details::BoxedVector32Read(s, item); +} + +bool tl2::details::BoxedVector32WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector32& item) { + if (!s.nat_write(0xbbadef07)) { return false; } + return tl2::details::BoxedVector32Write(s, item); +} + +bool tl2::details::BoxedVector32ReadResult(::basictl::tl_istream & s, tl2::BoxedVector32& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntRead(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedVector32WriteResult(::basictl::tl_ostream & s, tl2::BoxedVector32& item, std::vector& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, result)) { return false; } + return true; +} + +bool tl2::BoxedVector32::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::BoxedVector32ReadResult(s, *this, result); +} +bool tl2::BoxedVector32::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::BoxedVector32WriteResult(s, *this, result); +} + +bool tl2::BoxedVector32BoxedElem::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector32BoxedElemRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32BoxedElem::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector32BoxedElemWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32BoxedElem::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector32BoxedElemReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector32BoxedElem::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector32BoxedElemWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedVector32BoxedElemReset(::tl2::BoxedVector32BoxedElem& item) { + item.x.clear(); +} + +bool tl2::details::BoxedVector32BoxedElemRead(::basictl::tl_istream & s, ::tl2::BoxedVector32BoxedElem& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntBoxedRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector32BoxedElemWrite(::basictl::tl_ostream & s, const ::tl2::BoxedVector32BoxedElem& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntBoxedWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector32BoxedElemReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector32BoxedElem& item) { + if (!s.nat_read_exact_tag(0x591cecd4)) { return false; } + return tl2::details::BoxedVector32BoxedElemRead(s, item); +} + +bool tl2::details::BoxedVector32BoxedElemWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector32BoxedElem& item) { + if (!s.nat_write(0x591cecd4)) { return false; } + return tl2::details::BoxedVector32BoxedElemWrite(s, item); +} + +bool tl2::details::BoxedVector32BoxedElemReadResult(::basictl::tl_istream & s, tl2::BoxedVector32BoxedElem& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntBoxedRead(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedVector32BoxedElemWriteResult(::basictl::tl_ostream & s, tl2::BoxedVector32BoxedElem& item, std::vector& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntBoxedWrite(s, result)) { return false; } + return true; +} + +bool tl2::BoxedVector32BoxedElem::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::BoxedVector32BoxedElemReadResult(s, *this, result); +} +bool tl2::BoxedVector32BoxedElem::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::BoxedVector32BoxedElemWriteResult(s, *this, result); +} + +bool tl2::BoxedVector64::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector64Read(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector64::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector64Write(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector64::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoxedVector64ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoxedVector64::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoxedVector64WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoxedVector64Reset(::tl2::BoxedVector64& item) { + item.x.clear(); +} + +bool tl2::details::BoxedVector64Read(::basictl::tl_istream & s, ::tl2::BoxedVector64& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorLongBoxedRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector64Write(::basictl::tl_ostream & s, const ::tl2::BoxedVector64& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorLongBoxedWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::BoxedVector64ReadBoxed(::basictl::tl_istream & s, ::tl2::BoxedVector64& item) { + if (!s.nat_read_exact_tag(0x83659ba8)) { return false; } + return tl2::details::BoxedVector64Read(s, item); +} + +bool tl2::details::BoxedVector64WriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoxedVector64& item) { + if (!s.nat_write(0x83659ba8)) { return false; } + return tl2::details::BoxedVector64Write(s, item); +} + +bool tl2::details::BoxedVector64ReadResult(::basictl::tl_istream & s, tl2::BoxedVector64& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorLongBoxedRead(s, result)) { return false; } + return true; +} +bool tl2::details::BoxedVector64WriteResult(::basictl::tl_ostream & s, tl2::BoxedVector64& item, std::vector& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorLongBoxedWrite(s, result)) { return false; } + return true; +} + +bool tl2::BoxedVector64::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::BoxedVector64ReadResult(s, *this, result); +} +bool tl2::BoxedVector64::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::BoxedVector64WriteResult(s, *this, result); +} + +void tl2::details::BuiltinTuple10IntBoxedReset(std::array& item) { + for(auto && el : item) { + el = 0; + } +} + +bool tl2::details::BuiltinTuple10IntBoxedRead(::basictl::tl_istream & s, std::array& item) { + for(auto && el : item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTuple10IntBoxedWrite(::basictl::tl_ostream & s, const std::array& item) { + for(const auto & el : item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinTuple2IntBoxedReset(std::array& item) { + for(auto && el : item) { + el = 0; + } +} + +bool tl2::details::BuiltinTuple2IntBoxedRead(::basictl::tl_istream & s, std::array& item) { + for(auto && el : item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTuple2IntBoxedWrite(::basictl::tl_ostream & s, const std::array& item) { + for(const auto & el : item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinTuple3IntReset(std::array& item) { + for(auto && el : item) { + el = 0; + } +} + +bool tl2::details::BuiltinTuple3IntRead(::basictl::tl_istream & s, std::array& item) { + for(auto && el : item) { + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTuple3IntWrite(::basictl::tl_ostream & s, const std::array& item) { + for(const auto & el : item) { + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinTuple5IntReset(std::array& item) { + for(auto && el : item) { + el = 0; + } +} + +bool tl2::details::BuiltinTuple5IntRead(::basictl::tl_istream & s, std::array& item) { + for(auto && el : item) { + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTuple5IntWrite(::basictl::tl_ostream & s, const std::array& item) { + for(const auto & el : item) { + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinTupleIntBoxedReset(std::vector& item) { + item.resize(0); +} + +bool tl2::details::BuiltinTupleIntBoxedRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + // TODO - check length sanity + item.resize(nat_n); + for(auto && el : item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTupleIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (item.size() != nat_n) + return s.set_error_sequence_length(); + for(const auto & el : item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultReset(std::vector<::tl2::Either>>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::EitherIntVectorService6FindWithBoundsResultReadBoxed(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::EitherIntVectorService6FindWithBoundsResultWriteBoxed(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowReset(std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::EitherService6ErrorVectorService6FindResultRowReadBoxed(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::EitherService6ErrorVectorService6FindResultRowWriteBoxed(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorIntBoxedReset(std::vector& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorIntBoxedRead(::basictl::tl_istream & s, std::vector& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinVectorIntegerReset(std::vector<::tl2::Integer>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorIntegerRead(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::IntegerRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorIntegerWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::IntegerWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorLongBoxedReset(std::vector& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorLongBoxedRead(::basictl::tl_istream & s, std::vector& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!s.nat_read_exact_tag(0x22076cba)) { return false;} + if (!s.long_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorLongBoxedWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!s.nat_write(0x22076cba)) { return false; } + if (!s.long_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinVectorMapStringStringReset(std::vector<::tl2::Map>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorMapStringStringRead(::basictl::tl_istream & s, std::vector<::tl2::Map>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::MapStringStringRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorMapStringStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::MapStringStringWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorStringReset(std::vector& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorStringRead(::basictl::tl_istream & s, std::vector& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!s.string_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorStringWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!s.string_write(el)) { return false;} + } + return true; +} + +void tl2::details::DoubleReset(double& item) { + item = 0; +} + +bool tl2::details::DoubleRead(::basictl::tl_istream & s, double& item) { + if (!s.double_read(item)) { return false; } + return true; +} + +bool tl2::details::DoubleWrite(::basictl::tl_ostream & s, const double& item) { + if (!s.double_write(item)) { return false;} + return true; +} + +bool tl2::details::DoubleReadBoxed(::basictl::tl_istream & s, double& item) { + if (!s.nat_read_exact_tag(0x2210c154)) { return false; } + return tl2::details::DoubleRead(s, item); +} + +bool tl2::details::DoubleWriteBoxed(::basictl::tl_ostream & s, const double& item) { + if (!s.nat_write(0x2210c154)) { return false; } + return tl2::details::DoubleWrite(s, item); +} + +static const std::string_view EitherIntVectorService6FindWithBoundsResult_tbl_tl_name[]{"left", "right"}; +static const uint32_t EitherIntVectorService6FindWithBoundsResult_tbl_tl_tag[]{0x0a29cd5d, 0xdf3ecb3b}; + +void tl2::details::EitherIntVectorService6FindWithBoundsResultReset(::tl2::Either>& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::EitherIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Either>& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0x0a29cd5d: + if (item.value.index() != 0) { item.value.emplace<0>(); } + if (!::tl2::details::LeftIntVectorService6FindWithBoundsResultRead(s, std::get<0>(item.value))) { return false; } + break; + case 0xdf3ecb3b: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::RightIntVectorService6FindWithBoundsResultRead(s, std::get<1>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::EitherIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Either>& item) { + s.nat_write(EitherIntVectorService6FindWithBoundsResult_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 0: + if (!::tl2::details::LeftIntVectorService6FindWithBoundsResultWrite(s, std::get<0>(item.value))) { return false; } + break; + case 1: + if (!::tl2::details::RightIntVectorService6FindWithBoundsResultWrite(s, std::get<1>(item.value))) { return false; } + break; + } + return true; +} + +static const std::string_view EitherService6ErrorVectorService6FindResultRow_tbl_tl_name[]{"left", "right"}; +static const uint32_t EitherService6ErrorVectorService6FindResultRow_tbl_tl_tag[]{0x0a29cd5d, 0xdf3ecb3b}; + +void tl2::details::EitherService6ErrorVectorService6FindResultRowReset(::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::EitherService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0x0a29cd5d: + if (item.value.index() != 0) { item.value.emplace<0>(); } + if (!::tl2::details::LeftService6ErrorVectorService6FindResultRowRead(s, std::get<0>(item.value))) { return false; } + break; + case 0xdf3ecb3b: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::RightService6ErrorVectorService6FindResultRowRead(s, std::get<1>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::EitherService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + s.nat_write(EitherService6ErrorVectorService6FindResultRow_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 0: + if (!::tl2::details::LeftService6ErrorVectorService6FindResultRowWrite(s, std::get<0>(item.value))) { return false; } + break; + case 1: + if (!::tl2::details::RightService6ErrorVectorService6FindResultRowWrite(s, std::get<1>(item.value))) { return false; } + break; + } + return true; +} + +bool tl2::FieldConflict1::read(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict1Read(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict1::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict1Write(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict1::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict1ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict1::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict1WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::FieldConflict1Reset(::tl2::FieldConflict1& item) { + item.x = 0; + item.set_x = 0; +} + +bool tl2::details::FieldConflict1Read(::basictl::tl_istream & s, ::tl2::FieldConflict1& item) { + if (!s.int_read(item.x)) { return false; } + if (!s.int_read(item.set_x)) { return false; } + return true; +} + +bool tl2::details::FieldConflict1Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict1& item) { + if (!s.int_write(item.x)) { return false;} + if (!s.int_write(item.set_x)) { return false;} + return true; +} + +bool tl2::details::FieldConflict1ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict1& item) { + if (!s.nat_read_exact_tag(0xf314bd09)) { return false; } + return tl2::details::FieldConflict1Read(s, item); +} + +bool tl2::details::FieldConflict1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict1& item) { + if (!s.nat_write(0xf314bd09)) { return false; } + return tl2::details::FieldConflict1Write(s, item); +} + +bool tl2::FieldConflict2::read(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict2Read(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict2::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict2Write(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict2::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict2ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict2::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict2WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::FieldConflict2Reset(::tl2::FieldConflict2& item) { + item.x = 0; + item.setX = 0; +} + +bool tl2::details::FieldConflict2Read(::basictl::tl_istream & s, ::tl2::FieldConflict2& item) { + if (!s.int_read(item.x)) { return false; } + if (!s.int_read(item.setX)) { return false; } + return true; +} + +bool tl2::details::FieldConflict2Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict2& item) { + if (!s.int_write(item.x)) { return false;} + if (!s.int_write(item.setX)) { return false;} + return true; +} + +bool tl2::details::FieldConflict2ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict2& item) { + if (!s.nat_read_exact_tag(0x1bba76b8)) { return false; } + return tl2::details::FieldConflict2Read(s, item); +} + +bool tl2::details::FieldConflict2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict2& item) { + if (!s.nat_write(0x1bba76b8)) { return false; } + return tl2::details::FieldConflict2Write(s, item); +} + +bool tl2::FieldConflict3::read(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict3Read(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict3::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict3Write(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict3::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict3ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict3::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict3WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::FieldConflict3Reset(::tl2::FieldConflict3& item) { + item.x = 0; + item.SetX = 0; +} + +bool tl2::details::FieldConflict3Read(::basictl::tl_istream & s, ::tl2::FieldConflict3& item) { + if (!s.int_read(item.x)) { return false; } + if (!s.int_read(item.SetX)) { return false; } + return true; +} + +bool tl2::details::FieldConflict3Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict3& item) { + if (!s.int_write(item.x)) { return false;} + if (!s.int_write(item.SetX)) { return false;} + return true; +} + +bool tl2::details::FieldConflict3ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict3& item) { + if (!s.nat_read_exact_tag(0x2cf6e157)) { return false; } + return tl2::details::FieldConflict3Read(s, item); +} + +bool tl2::details::FieldConflict3WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict3& item) { + if (!s.nat_write(0x2cf6e157)) { return false; } + return tl2::details::FieldConflict3Write(s, item); +} + +bool tl2::FieldConflict4::read(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict4Read(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict4::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict4Write(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict4::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::FieldConflict4ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::FieldConflict4::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::FieldConflict4WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::FieldConflict4Reset(::tl2::FieldConflict4& item) { + item.X = 0; + item.SetX = 0; +} + +bool tl2::details::FieldConflict4Read(::basictl::tl_istream & s, ::tl2::FieldConflict4& item) { + if (!s.int_read(item.X)) { return false; } + if (!s.int_read(item.SetX)) { return false; } + return true; +} + +bool tl2::details::FieldConflict4Write(::basictl::tl_ostream & s, const ::tl2::FieldConflict4& item) { + if (!s.int_write(item.X)) { return false;} + if (!s.int_write(item.SetX)) { return false;} + return true; +} + +bool tl2::details::FieldConflict4ReadBoxed(::basictl::tl_istream & s, ::tl2::FieldConflict4& item) { + if (!s.nat_read_exact_tag(0xd93c186a)) { return false; } + return tl2::details::FieldConflict4Read(s, item); +} + +bool tl2::details::FieldConflict4WriteBoxed(::basictl::tl_ostream & s, const ::tl2::FieldConflict4& item) { + if (!s.nat_write(0xd93c186a)) { return false; } + return tl2::details::FieldConflict4Write(s, item); +} + +void tl2::details::FloatReset(float& item) { + item = 0; +} + +bool tl2::details::FloatRead(::basictl::tl_istream & s, float& item) { + if (!s.float_read(item)) { return false; } + return true; +} + +bool tl2::details::FloatWrite(::basictl::tl_ostream & s, const float& item) { + if (!s.float_write(item)) { return false;} + return true; +} + +bool tl2::details::FloatReadBoxed(::basictl::tl_istream & s, float& item) { + if (!s.nat_read_exact_tag(0x824dab22)) { return false; } + return tl2::details::FloatRead(s, item); +} + +bool tl2::details::FloatWriteBoxed(::basictl::tl_ostream & s, const float& item) { + if (!s.nat_write(0x824dab22)) { return false; } + return tl2::details::FloatWrite(s, item); +} + +bool tl2::Get_arrays::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetArraysRead(s, *this)) { return false; } + return true; +} + +bool tl2::Get_arrays::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetArraysWrite(s, *this)) { return false; } + return true; +} + +bool tl2::Get_arrays::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetArraysReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::Get_arrays::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetArraysWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetArraysReset(::tl2::Get_arrays& item) { + item.n = 0; + item.a.clear(); + ::tl2::details::BuiltinTuple5IntReset(item.b); +} + +bool tl2::details::GetArraysRead(::basictl::tl_istream & s, ::tl2::Get_arrays& item) { + if (!s.nat_read(item.n)) { return false; } + if (!::tl2::details::BuiltinTupleIntRead(s, item.a, item.n)) { return false; } + if (!::tl2::details::BuiltinTuple5IntRead(s, item.b)) { return false; } + return true; +} + +bool tl2::details::GetArraysWrite(::basictl::tl_ostream & s, const ::tl2::Get_arrays& item) { + if (!s.nat_write(item.n)) { return false;} + if (!::tl2::details::BuiltinTupleIntWrite(s, item.a, item.n)) { return false; } + if (!::tl2::details::BuiltinTuple5IntWrite(s, item.b)) { return false; } + return true; +} + +bool tl2::details::GetArraysReadBoxed(::basictl::tl_istream & s, ::tl2::Get_arrays& item) { + if (!s.nat_read_exact_tag(0x90658cdb)) { return false; } + return tl2::details::GetArraysRead(s, item); +} + +bool tl2::details::GetArraysWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Get_arrays& item) { + if (!s.nat_write(0x90658cdb)) { return false; } + return tl2::details::GetArraysWrite(s, item); +} + +bool tl2::details::GetArraysReadResult(::basictl::tl_istream & s, tl2::Get_arrays& item, std::array& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTuple5IntRead(s, result)) { return false; } + return true; +} +bool tl2::details::GetArraysWriteResult(::basictl::tl_ostream & s, tl2::Get_arrays& item, std::array& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTuple5IntWrite(s, result)) { return false; } + return true; +} + +bool tl2::Get_arrays::read_result(::basictl::tl_istream & s, std::array & result) { + return tl2::details::GetArraysReadResult(s, *this, result); +} +bool tl2::Get_arrays::write_result(::basictl::tl_ostream & s, std::array & result) { + return tl2::details::GetArraysWriteResult(s, *this, result); +} + +bool tl2::GetDouble::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetDoubleRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetDouble::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetDoubleWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetDouble::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetDoubleReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetDouble::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetDoubleWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetDoubleReset(::tl2::GetDouble& item) { + item.x = 0; +} + +bool tl2::details::GetDoubleRead(::basictl::tl_istream & s, ::tl2::GetDouble& item) { + if (!s.nat_read_exact_tag(0x2210c154)) { return false;} + if (!s.double_read(item.x)) { return false; } + return true; +} + +bool tl2::details::GetDoubleWrite(::basictl::tl_ostream & s, const ::tl2::GetDouble& item) { + if (!s.nat_write(0x2210c154)) { return false; } + if (!s.double_write(item.x)) { return false;} + return true; +} + +bool tl2::details::GetDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::GetDouble& item) { + if (!s.nat_read_exact_tag(0x39711d7b)) { return false; } + return tl2::details::GetDoubleRead(s, item); +} + +bool tl2::details::GetDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetDouble& item) { + if (!s.nat_write(0x39711d7b)) { return false; } + return tl2::details::GetDoubleWrite(s, item); +} + +bool tl2::details::GetDoubleReadResult(::basictl::tl_istream & s, tl2::GetDouble& item, double& result) { + if (!s.nat_read_exact_tag(0x2210c154)) { return false;} + if (!s.double_read(result)) { return false; } + return true; +} +bool tl2::details::GetDoubleWriteResult(::basictl::tl_ostream & s, tl2::GetDouble& item, double& result) { + if (!s.nat_write(0x2210c154)) { return false; } + if (!s.double_write(result)) { return false;} + return true; +} + +bool tl2::GetDouble::read_result(::basictl::tl_istream & s, double & result) { + return tl2::details::GetDoubleReadResult(s, *this, result); +} +bool tl2::GetDouble::write_result(::basictl::tl_ostream & s, double & result) { + return tl2::details::GetDoubleWriteResult(s, *this, result); +} + +bool tl2::GetFloat::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetFloatRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetFloat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetFloatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetFloat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetFloatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetFloat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetFloatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetFloatReset(::tl2::GetFloat& item) { + item.x = 0; +} + +bool tl2::details::GetFloatRead(::basictl::tl_istream & s, ::tl2::GetFloat& item) { + if (!s.float_read(item.x)) { return false; } + return true; +} + +bool tl2::details::GetFloatWrite(::basictl::tl_ostream & s, const ::tl2::GetFloat& item) { + if (!s.float_write(item.x)) { return false;} + return true; +} + +bool tl2::details::GetFloatReadBoxed(::basictl::tl_istream & s, ::tl2::GetFloat& item) { + if (!s.nat_read_exact_tag(0x25a7bc68)) { return false; } + return tl2::details::GetFloatRead(s, item); +} + +bool tl2::details::GetFloatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetFloat& item) { + if (!s.nat_write(0x25a7bc68)) { return false; } + return tl2::details::GetFloatWrite(s, item); +} + +bool tl2::details::GetFloatReadResult(::basictl::tl_istream & s, tl2::GetFloat& item, float& result) { + if (!s.nat_read_exact_tag(0x824dab22)) { return false;} + if (!s.float_read(result)) { return false; } + return true; +} +bool tl2::details::GetFloatWriteResult(::basictl::tl_ostream & s, tl2::GetFloat& item, float& result) { + if (!s.nat_write(0x824dab22)) { return false; } + if (!s.float_write(result)) { return false;} + return true; +} + +bool tl2::GetFloat::read_result(::basictl::tl_istream & s, float & result) { + return tl2::details::GetFloatReadResult(s, *this, result); +} +bool tl2::GetFloat::write_result(::basictl::tl_ostream & s, float & result) { + return tl2::details::GetFloatWriteResult(s, *this, result); +} + +bool tl2::GetMaybeIface::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetMaybeIfaceRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetMaybeIface::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMaybeIfaceWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetMaybeIface::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetMaybeIfaceReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetMaybeIface::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMaybeIfaceWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetMaybeIfaceReset(::tl2::GetMaybeIface& item) { + ::tl2::details::Service1ValueReset(item.x); +} + +bool tl2::details::GetMaybeIfaceRead(::basictl::tl_istream & s, ::tl2::GetMaybeIface& item) { + if (!::tl2::details::Service1ValueReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMaybeIfaceWrite(::basictl::tl_ostream & s, const ::tl2::GetMaybeIface& item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMaybeIfaceReadBoxed(::basictl::tl_istream & s, ::tl2::GetMaybeIface& item) { + if (!s.nat_read_exact_tag(0x6b055ae4)) { return false; } + return tl2::details::GetMaybeIfaceRead(s, item); +} + +bool tl2::details::GetMaybeIfaceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMaybeIface& item) { + if (!s.nat_write(0x6b055ae4)) { return false; } + return tl2::details::GetMaybeIfaceWrite(s, item); +} + +bool tl2::details::GetMaybeIfaceReadResult(::basictl::tl_istream & s, tl2::GetMaybeIface& item, std::optional<::tl2::service1::Value>& result) { + if (!::tl2::details::Service1ValueBoxedMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::GetMaybeIfaceWriteResult(::basictl::tl_ostream & s, tl2::GetMaybeIface& item, std::optional<::tl2::service1::Value>& result) { + if (!::tl2::details::Service1ValueBoxedMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::GetMaybeIface::read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::Value> & result) { + return tl2::details::GetMaybeIfaceReadResult(s, *this, result); +} +bool tl2::GetMaybeIface::write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::Value> & result) { + return tl2::details::GetMaybeIfaceWriteResult(s, *this, result); +} + +bool tl2::GetMyDictOfInt::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyDictOfIntRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDictOfInt::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyDictOfIntWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDictOfInt::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyDictOfIntReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDictOfInt::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyDictOfIntWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetMyDictOfIntReset(::tl2::GetMyDictOfInt& item) { + ::tl2::details::MyDictOfIntReset(item.x); +} + +bool tl2::details::GetMyDictOfIntRead(::basictl::tl_istream & s, ::tl2::GetMyDictOfInt& item) { + if (!::tl2::details::MyDictOfIntReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyDictOfIntWrite(::basictl::tl_ostream & s, const ::tl2::GetMyDictOfInt& item) { + if (!::tl2::details::MyDictOfIntWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyDictOfIntReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyDictOfInt& item) { + if (!s.nat_read_exact_tag(0x166f962c)) { return false; } + return tl2::details::GetMyDictOfIntRead(s, item); +} + +bool tl2::details::GetMyDictOfIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyDictOfInt& item) { + if (!s.nat_write(0x166f962c)) { return false; } + return tl2::details::GetMyDictOfIntWrite(s, item); +} + +bool tl2::details::GetMyDictOfIntReadResult(::basictl::tl_istream & s, tl2::GetMyDictOfInt& item, ::tl2::MyDictOfInt& result) { + if (!::tl2::details::MyDictOfIntReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::GetMyDictOfIntWriteResult(::basictl::tl_ostream & s, tl2::GetMyDictOfInt& item, ::tl2::MyDictOfInt& result) { + if (!::tl2::details::MyDictOfIntWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::GetMyDictOfInt::read_result(::basictl::tl_istream & s, ::tl2::MyDictOfInt & result) { + return tl2::details::GetMyDictOfIntReadResult(s, *this, result); +} +bool tl2::GetMyDictOfInt::write_result(::basictl::tl_ostream & s, ::tl2::MyDictOfInt & result) { + return tl2::details::GetMyDictOfIntWriteResult(s, *this, result); +} + +bool tl2::GetMyDouble::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyDoubleRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDouble::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyDoubleWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDouble::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyDoubleReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyDouble::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyDoubleWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetMyDoubleReset(::tl2::GetMyDouble& item) { + ::tl2::details::MyDoubleReset(item.x); +} + +bool tl2::details::GetMyDoubleRead(::basictl::tl_istream & s, ::tl2::GetMyDouble& item) { + if (!::tl2::details::MyDoubleRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyDoubleWrite(::basictl::tl_ostream & s, const ::tl2::GetMyDouble& item) { + if (!::tl2::details::MyDoubleWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyDouble& item) { + if (!s.nat_read_exact_tag(0xb660ad10)) { return false; } + return tl2::details::GetMyDoubleRead(s, item); +} + +bool tl2::details::GetMyDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyDouble& item) { + if (!s.nat_write(0xb660ad10)) { return false; } + return tl2::details::GetMyDoubleWrite(s, item); +} + +bool tl2::details::GetMyDoubleReadResult(::basictl::tl_istream & s, tl2::GetMyDouble& item, ::tl2::MyDouble& result) { + if (!::tl2::details::MyDoubleReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::GetMyDoubleWriteResult(::basictl::tl_ostream & s, tl2::GetMyDouble& item, ::tl2::MyDouble& result) { + if (!::tl2::details::MyDoubleWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::GetMyDouble::read_result(::basictl::tl_istream & s, ::tl2::MyDouble & result) { + return tl2::details::GetMyDoubleReadResult(s, *this, result); +} +bool tl2::GetMyDouble::write_result(::basictl::tl_ostream & s, ::tl2::MyDouble & result) { + return tl2::details::GetMyDoubleWriteResult(s, *this, result); +} + +bool tl2::GetMyValue::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyValueRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyValue::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyValueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyValue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetMyValueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetMyValue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetMyValueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetMyValueReset(::tl2::GetMyValue& item) { + ::tl2::details::MyValueReset(item.x); +} + +bool tl2::details::GetMyValueRead(::basictl::tl_istream & s, ::tl2::GetMyValue& item) { + if (!::tl2::details::MyValueReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyValueWrite(::basictl::tl_ostream & s, const ::tl2::GetMyValue& item) { + if (!::tl2::details::MyValueWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetMyValueReadBoxed(::basictl::tl_istream & s, ::tl2::GetMyValue& item) { + if (!s.nat_read_exact_tag(0xb3df27fe)) { return false; } + return tl2::details::GetMyValueRead(s, item); +} + +bool tl2::details::GetMyValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetMyValue& item) { + if (!s.nat_write(0xb3df27fe)) { return false; } + return tl2::details::GetMyValueWrite(s, item); +} + +bool tl2::details::GetMyValueReadResult(::basictl::tl_istream & s, tl2::GetMyValue& item, ::tl2::MyValue& result) { + if (!::tl2::details::MyValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::GetMyValueWriteResult(::basictl::tl_ostream & s, tl2::GetMyValue& item, ::tl2::MyValue& result) { + if (!::tl2::details::MyValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::GetMyValue::read_result(::basictl::tl_istream & s, ::tl2::MyValue & result) { + return tl2::details::GetMyValueReadResult(s, *this, result); +} +bool tl2::GetMyValue::write_result(::basictl::tl_ostream & s, ::tl2::MyValue & result) { + return tl2::details::GetMyValueWriteResult(s, *this, result); +} + +bool tl2::GetNonOptNat::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetNonOptNatRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetNonOptNat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetNonOptNatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetNonOptNat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetNonOptNatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetNonOptNat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetNonOptNatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetNonOptNatReset(::tl2::GetNonOptNat& item) { + item.n = 0; + item.xs.clear(); +} + +bool tl2::details::GetNonOptNatRead(::basictl::tl_istream & s, ::tl2::GetNonOptNat& item) { + if (!s.nat_read(item.n)) { return false; } + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntRead(s, item.xs, item.n)) { return false; } + return true; +} + +bool tl2::details::GetNonOptNatWrite(::basictl::tl_ostream & s, const ::tl2::GetNonOptNat& item) { + if (!s.nat_write(item.n)) { return false;} + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, item.xs, item.n)) { return false; } + return true; +} + +bool tl2::details::GetNonOptNatReadBoxed(::basictl::tl_istream & s, ::tl2::GetNonOptNat& item) { + if (!s.nat_read_exact_tag(0x67665961)) { return false; } + return tl2::details::GetNonOptNatRead(s, item); +} + +bool tl2::details::GetNonOptNatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetNonOptNat& item) { + if (!s.nat_write(0x67665961)) { return false; } + return tl2::details::GetNonOptNatWrite(s, item); +} + +bool tl2::details::GetNonOptNatReadResult(::basictl::tl_istream & s, tl2::GetNonOptNat& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntRead(s, result, item.n)) { return false; } + return true; +} +bool tl2::details::GetNonOptNatWriteResult(::basictl::tl_ostream & s, tl2::GetNonOptNat& item, std::vector& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, result, item.n)) { return false; } + return true; +} + +bool tl2::GetNonOptNat::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::GetNonOptNatReadResult(s, *this, result); +} +bool tl2::GetNonOptNat::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::GetNonOptNatWriteResult(s, *this, result); +} + +bool tl2::GetStats::read(::basictl::tl_istream & s) { + if (!::tl2::details::GetStatsRead(s, *this)) { return false; } + return true; +} + +bool tl2::GetStats::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetStatsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::GetStats::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::GetStatsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::GetStats::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::GetStatsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::GetStatsReset(::tl2::GetStats& item) { + ::tl2::details::TasksQueueTypeStatsReset(item.x); +} + +bool tl2::details::GetStatsRead(::basictl::tl_istream & s, ::tl2::GetStats& item) { + if (!::tl2::details::TasksQueueTypeStatsRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetStatsWrite(::basictl::tl_ostream & s, const ::tl2::GetStats& item) { + if (!::tl2::details::TasksQueueTypeStatsWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::GetStatsReadBoxed(::basictl::tl_istream & s, ::tl2::GetStats& item) { + if (!s.nat_read_exact_tag(0xbaa6da35)) { return false; } + return tl2::details::GetStatsRead(s, item); +} + +bool tl2::details::GetStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::GetStats& item) { + if (!s.nat_write(0xbaa6da35)) { return false; } + return tl2::details::GetStatsWrite(s, item); +} + +bool tl2::details::GetStatsReadResult(::basictl::tl_istream & s, tl2::GetStats& item, ::tl2::tasks::QueueTypeStats& result) { + if (!::tl2::details::TasksQueueTypeStatsReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::GetStatsWriteResult(::basictl::tl_ostream & s, tl2::GetStats& item, ::tl2::tasks::QueueTypeStats& result) { + if (!::tl2::details::TasksQueueTypeStatsWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::GetStats::read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats & result) { + return tl2::details::GetStatsReadResult(s, *this, result); +} +bool tl2::GetStats::write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueTypeStats & result) { + return tl2::details::GetStatsWriteResult(s, *this, result); +} + +void tl2::details::IntReset(int32_t& item) { + item = 0; +} + +bool tl2::details::IntRead(::basictl::tl_istream & s, int32_t& item) { + if (!s.int_read(item)) { return false; } + return true; +} + +bool tl2::details::IntWrite(::basictl::tl_ostream & s, const int32_t& item) { + if (!s.int_write(item)) { return false;} + return true; +} + +bool tl2::details::IntReadBoxed(::basictl::tl_istream & s, int32_t& item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false; } + return tl2::details::IntRead(s, item); +} + +bool tl2::details::IntWriteBoxed(::basictl::tl_ostream & s, const int32_t& item) { + if (!s.nat_write(0xa8509bda)) { return false; } + return tl2::details::IntWrite(s, item); +} + +bool tl2::Integer::read(::basictl::tl_istream & s) { + if (!::tl2::details::IntegerRead(s, *this)) { return false; } + return true; +} + +bool tl2::Integer::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::IntegerWrite(s, *this)) { return false; } + return true; +} + +bool tl2::Integer::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::IntegerReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::Integer::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::IntegerWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::IntegerReset(::tl2::Integer& item) { + item.value = 0; +} + +bool tl2::details::IntegerRead(::basictl::tl_istream & s, ::tl2::Integer& item) { + if (!s.int_read(item.value)) { return false; } + return true; +} + +bool tl2::details::IntegerWrite(::basictl::tl_ostream & s, const ::tl2::Integer& item) { + if (!s.int_write(item.value)) { return false;} + return true; +} + +bool tl2::details::IntegerReadBoxed(::basictl::tl_istream & s, ::tl2::Integer& item) { + if (!s.nat_read_exact_tag(0x7e194796)) { return false; } + return tl2::details::IntegerRead(s, item); +} + +bool tl2::details::IntegerWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Integer& item) { + if (!s.nat_write(0x7e194796)) { return false; } + return tl2::details::IntegerWrite(s, item); +} + +bool tl2::Issue3498::read(::basictl::tl_istream & s) { + if (!::tl2::details::Issue3498Read(s, *this)) { return false; } + return true; +} + +bool tl2::Issue3498::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Issue3498Write(s, *this)) { return false; } + return true; +} + +bool tl2::Issue3498::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Issue3498ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::Issue3498::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Issue3498WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Issue3498Reset(::tl2::Issue3498& item) { + item.x.clear(); +} + +bool tl2::details::Issue3498Read(::basictl::tl_istream & s, ::tl2::Issue3498& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowRead(s, item.x)) { return false; } + return true; +} + +bool tl2::details::Issue3498Write(::basictl::tl_ostream & s, const ::tl2::Issue3498& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowWrite(s, item.x)) { return false; } + return true; +} + +bool tl2::details::Issue3498ReadBoxed(::basictl::tl_istream & s, ::tl2::Issue3498& item) { + if (!s.nat_read_exact_tag(0xf54b7b0a)) { return false; } + return tl2::details::Issue3498Read(s, item); +} + +bool tl2::details::Issue3498WriteBoxed(::basictl::tl_ostream & s, const ::tl2::Issue3498& item) { + if (!s.nat_write(0xf54b7b0a)) { return false; } + return tl2::details::Issue3498Write(s, item); +} + +void tl2::details::LeftIntVectorService6FindWithBoundsResultReset(::tl2::Left>& item) { + item.value = 0; +} + +bool tl2::details::LeftIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::Left>& item) { + if (!s.int_read(item.value)) { return false; } + return true; +} + +bool tl2::details::LeftIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::Left>& item) { + if (!s.int_write(item.value)) { return false;} + return true; +} + +bool tl2::details::LeftIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Left>& item) { + if (!s.nat_read_exact_tag(0x0a29cd5d)) { return false; } + return tl2::details::LeftIntVectorService6FindWithBoundsResultRead(s, item); +} + +bool tl2::details::LeftIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Left>& item) { + if (!s.nat_write(0x0a29cd5d)) { return false; } + return tl2::details::LeftIntVectorService6FindWithBoundsResultWrite(s, item); +} + +void tl2::details::LeftService6ErrorVectorService6FindResultRowReset(::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + ::tl2::details::Service6ErrorReset(item.value); +} + +bool tl2::details::LeftService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!::tl2::details::Service6ErrorRead(s, item.value)) { return false; } + return true; +} + +bool tl2::details::LeftService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!::tl2::details::Service6ErrorWrite(s, item.value)) { return false; } + return true; +} + +bool tl2::details::LeftService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!s.nat_read_exact_tag(0x0a29cd5d)) { return false; } + return tl2::details::LeftService6ErrorVectorService6FindResultRowRead(s, item); +} + +bool tl2::details::LeftService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Left<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!s.nat_write(0x0a29cd5d)) { return false; } + return tl2::details::LeftService6ErrorVectorService6FindResultRowWrite(s, item); +} + +void tl2::details::LongReset(int64_t& item) { + item = 0; +} + +bool tl2::details::LongRead(::basictl::tl_istream & s, int64_t& item) { + if (!s.long_read(item)) { return false; } + return true; +} + +bool tl2::details::LongWrite(::basictl::tl_ostream & s, const int64_t& item) { + if (!s.long_write(item)) { return false;} + return true; +} + +bool tl2::details::LongReadBoxed(::basictl::tl_istream & s, int64_t& item) { + if (!s.nat_read_exact_tag(0x22076cba)) { return false; } + return tl2::details::LongRead(s, item); +} + +bool tl2::details::LongWriteBoxed(::basictl::tl_ostream & s, const int64_t& item) { + if (!s.nat_write(0x22076cba)) { return false; } + return tl2::details::LongWrite(s, item); +} + +void tl2::details::MapStringStringReset(::tl2::Map& item) { + item.key.clear(); + item.value.clear(); +} + +bool tl2::details::MapStringStringRead(::basictl::tl_istream & s, ::tl2::Map& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::MapStringStringWrite(::basictl::tl_ostream & s, const ::tl2::Map& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::MapStringStringReadBoxed(::basictl::tl_istream & s, ::tl2::Map& item) { + if (!s.nat_read_exact_tag(0x79c473a4)) { return false; } + return tl2::details::MapStringStringRead(s, item); +} + +bool tl2::details::MapStringStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Map& item) { + if (!s.nat_write(0x79c473a4)) { return false; } + return tl2::details::MapStringStringWrite(s, item); +} + +void tl2::details::MyAnonMcValueReset(::tl2::MyAnonMcValue& item) { + ::tl2::details::Service1ValueReset(item); +} + +bool tl2::details::MyAnonMcValueRead(::basictl::tl_istream & s, ::tl2::MyAnonMcValue& item) { + if (!::tl2::details::Service1ValueReadBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyAnonMcValueWrite(::basictl::tl_ostream & s, const ::tl2::MyAnonMcValue& item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyAnonMcValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyAnonMcValue& item) { + if (!s.nat_read_exact_tag(0x569310db)) { return false; } + return tl2::details::MyAnonMcValueRead(s, item); +} + +bool tl2::details::MyAnonMcValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyAnonMcValue& item) { + if (!s.nat_write(0x569310db)) { return false; } + return tl2::details::MyAnonMcValueWrite(s, item); +} + +bool tl2::MyBoxedArray::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedArrayRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedArray::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedArrayWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedArray::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedArrayReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedArray::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedArrayWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyBoxedArrayReset(::tl2::MyBoxedArray& item) { + ::tl2::details::BuiltinTuple2IntBoxedReset(item.data); +} + +bool tl2::details::MyBoxedArrayRead(::basictl::tl_istream & s, ::tl2::MyBoxedArray& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTuple2IntBoxedRead(s, item.data)) { return false; } + return true; +} + +bool tl2::details::MyBoxedArrayWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedArray& item) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTuple2IntBoxedWrite(s, item.data)) { return false; } + return true; +} + +bool tl2::details::MyBoxedArrayReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedArray& item) { + if (!s.nat_read_exact_tag(0x288f64f0)) { return false; } + return tl2::details::MyBoxedArrayRead(s, item); +} + +bool tl2::details::MyBoxedArrayWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedArray& item) { + if (!s.nat_write(0x288f64f0)) { return false; } + return tl2::details::MyBoxedArrayWrite(s, item); +} + +bool tl2::MyBoxedTupleSlice::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedTupleSliceRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedTupleSlice::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedTupleSliceWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedTupleSlice::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedTupleSliceReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedTupleSlice::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedTupleSliceWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyBoxedTupleSliceReset(::tl2::MyBoxedTupleSlice& item) { + item.n = 0; + item.data.clear(); +} + +bool tl2::details::MyBoxedTupleSliceRead(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice& item) { + if (!s.nat_read(item.n)) { return false; } + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntBoxedRead(s, item.data, item.n)) { return false; } + return true; +} + +bool tl2::details::MyBoxedTupleSliceWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedTupleSlice& item) { + if (!s.nat_write(item.n)) { return false;} + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntBoxedWrite(s, item.data, item.n)) { return false; } + return true; +} + +bool tl2::details::MyBoxedTupleSliceReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedTupleSlice& item) { + if (!s.nat_read_exact_tag(0x25d1a1be)) { return false; } + return tl2::details::MyBoxedTupleSliceRead(s, item); +} + +bool tl2::details::MyBoxedTupleSliceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedTupleSlice& item) { + if (!s.nat_write(0x25d1a1be)) { return false; } + return tl2::details::MyBoxedTupleSliceWrite(s, item); +} + +bool tl2::MyBoxedVectorSlice::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedVectorSliceRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedVectorSlice::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedVectorSliceWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedVectorSlice::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyBoxedVectorSliceReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyBoxedVectorSlice::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyBoxedVectorSliceWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyBoxedVectorSliceReset(::tl2::MyBoxedVectorSlice& item) { + item.data.clear(); +} + +bool tl2::details::MyBoxedVectorSliceRead(::basictl::tl_istream & s, ::tl2::MyBoxedVectorSlice& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntBoxedRead(s, item.data)) { return false; } + return true; +} + +bool tl2::details::MyBoxedVectorSliceWrite(::basictl::tl_ostream & s, const ::tl2::MyBoxedVectorSlice& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntBoxedWrite(s, item.data)) { return false; } + return true; +} + +bool tl2::details::MyBoxedVectorSliceReadBoxed(::basictl::tl_istream & s, ::tl2::MyBoxedVectorSlice& item) { + if (!s.nat_read_exact_tag(0x57d164bb)) { return false; } + return tl2::details::MyBoxedVectorSliceRead(s, item); +} + +bool tl2::details::MyBoxedVectorSliceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyBoxedVectorSlice& item) { + if (!s.nat_write(0x57d164bb)) { return false; } + return tl2::details::MyBoxedVectorSliceWrite(s, item); +} + +void tl2::details::MyDictOfIntReset(::tl2::MyDictOfInt& item) { + ::tl2::details::DictionaryIntReset(item); +} + +bool tl2::details::MyDictOfIntRead(::basictl::tl_istream & s, ::tl2::MyDictOfInt& item) { + if (!::tl2::details::DictionaryIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::MyDictOfIntWrite(::basictl::tl_ostream & s, const ::tl2::MyDictOfInt& item) { + if (!::tl2::details::DictionaryIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::MyDictOfIntReadBoxed(::basictl::tl_istream & s, ::tl2::MyDictOfInt& item) { + if (!s.nat_read_exact_tag(0xb8019a3d)) { return false; } + return tl2::details::MyDictOfIntRead(s, item); +} + +bool tl2::details::MyDictOfIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyDictOfInt& item) { + if (!s.nat_write(0xb8019a3d)) { return false; } + return tl2::details::MyDictOfIntWrite(s, item); +} + +void tl2::details::MyDoubleReset(::tl2::MyDouble& item) { + item = 0; +} + +bool tl2::details::MyDoubleRead(::basictl::tl_istream & s, ::tl2::MyDouble& item) { + if (!s.nat_read_exact_tag(0x2210c154)) { return false;} + if (!s.double_read(item)) { return false; } + return true; +} + +bool tl2::details::MyDoubleWrite(::basictl::tl_ostream & s, const ::tl2::MyDouble& item) { + if (!s.nat_write(0x2210c154)) { return false; } + if (!s.double_write(item)) { return false;} + return true; +} + +bool tl2::details::MyDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::MyDouble& item) { + if (!s.nat_read_exact_tag(0x90a6c726)) { return false; } + return tl2::details::MyDoubleRead(s, item); +} + +bool tl2::details::MyDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyDouble& item) { + if (!s.nat_write(0x90a6c726)) { return false; } + return tl2::details::MyDoubleWrite(s, item); +} + +bool tl2::MyInt::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyIntRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyInt::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyIntWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyInt::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyIntReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyInt::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyIntWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyIntReset(::tl2::MyInt& item) { + item.val1 = 0; +} + +bool tl2::details::MyIntRead(::basictl::tl_istream & s, ::tl2::MyInt& item) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(item.val1)) { return false; } + return true; +} + +bool tl2::details::MyIntWrite(::basictl::tl_ostream & s, const ::tl2::MyInt& item) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(item.val1)) { return false;} + return true; +} + +bool tl2::details::MyIntReadBoxed(::basictl::tl_istream & s, ::tl2::MyInt& item) { + if (!s.nat_read_exact_tag(0xc12375b7)) { return false; } + return tl2::details::MyIntRead(s, item); +} + +bool tl2::details::MyIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyInt& item) { + if (!s.nat_write(0xc12375b7)) { return false; } + return tl2::details::MyIntWrite(s, item); +} + +void tl2::details::MyMaybe1Reset(::tl2::MyMaybe1& item) { + item.reset(); +} + +bool tl2::details::MyMaybe1Read(::basictl::tl_istream & s, ::tl2::MyMaybe1& item) { + if (!::tl2::details::MyTuple10MaybeReadBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyMaybe1Write(::basictl::tl_ostream & s, const ::tl2::MyMaybe1& item) { + if (!::tl2::details::MyTuple10MaybeWriteBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyMaybe1ReadBoxed(::basictl::tl_istream & s, ::tl2::MyMaybe1& item) { + if (!s.nat_read_exact_tag(0x32c541fe)) { return false; } + return tl2::details::MyMaybe1Read(s, item); +} + +bool tl2::details::MyMaybe1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMaybe1& item) { + if (!s.nat_write(0x32c541fe)) { return false; } + return tl2::details::MyMaybe1Write(s, item); +} + +void tl2::details::MyMaybe2Reset(::tl2::MyMaybe2& item) { + item.reset(); +} + +bool tl2::details::MyMaybe2Read(::basictl::tl_istream & s, ::tl2::MyMaybe2& item) { + if (!::tl2::details::MyTuple10MaybeReadBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyMaybe2Write(::basictl::tl_ostream & s, const ::tl2::MyMaybe2& item) { + if (!::tl2::details::MyTuple10MaybeWriteBoxed(s, item)) { return false; } + return true; +} + +bool tl2::details::MyMaybe2ReadBoxed(::basictl::tl_istream & s, ::tl2::MyMaybe2& item) { + if (!s.nat_read_exact_tag(0xef6d355c)) { return false; } + return tl2::details::MyMaybe2Read(s, item); +} + +bool tl2::details::MyMaybe2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMaybe2& item) { + if (!s.nat_write(0xef6d355c)) { return false; } + return tl2::details::MyMaybe2Write(s, item); +} + +bool tl2::MyMcValue::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValue::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyMcValueReset(::tl2::MyMcValue& item) { + ::tl2::details::Service1ValueReset(item.x); +} + +bool tl2::details::MyMcValueRead(::basictl::tl_istream & s, ::tl2::MyMcValue& item) { + if (!::tl2::details::Service1ValueReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::MyMcValueWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValue& item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::MyMcValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValue& item) { + if (!s.nat_read_exact_tag(0xe2ffd978)) { return false; } + return tl2::details::MyMcValueRead(s, item); +} + +bool tl2::details::MyMcValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValue& item) { + if (!s.nat_write(0xe2ffd978)) { return false; } + return tl2::details::MyMcValueWrite(s, item); +} + +bool tl2::MyMcValueTuple::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueTupleRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueTuple::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueTupleWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueTuple::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueTupleReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueTuple::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueTupleWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyMcValueTupleReset(::tl2::MyMcValueTuple& item) { + ::tl2::details::BuiltinTuple3Service1ValueReset(item.xs); +} + +bool tl2::details::MyMcValueTupleRead(::basictl::tl_istream & s, ::tl2::MyMcValueTuple& item) { + if (!::tl2::details::BuiltinTuple3Service1ValueRead(s, item.xs)) { return false; } + return true; +} + +bool tl2::details::MyMcValueTupleWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValueTuple& item) { + if (!::tl2::details::BuiltinTuple3Service1ValueWrite(s, item.xs)) { return false; } + return true; +} + +bool tl2::details::MyMcValueTupleReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValueTuple& item) { + if (!s.nat_read_exact_tag(0x1287d116)) { return false; } + return tl2::details::MyMcValueTupleRead(s, item); +} + +bool tl2::details::MyMcValueTupleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValueTuple& item) { + if (!s.nat_write(0x1287d116)) { return false; } + return tl2::details::MyMcValueTupleWrite(s, item); +} + +bool tl2::MyMcValueVector::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueVectorRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueVector::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueVectorWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueVector::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyMcValueVectorReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyMcValueVector::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyMcValueVectorWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyMcValueVectorReset(::tl2::MyMcValueVector& item) { + item.xs.clear(); +} + +bool tl2::details::MyMcValueVectorRead(::basictl::tl_istream & s, ::tl2::MyMcValueVector& item) { + if (!::tl2::details::BuiltinVectorService1ValueRead(s, item.xs)) { return false; } + return true; +} + +bool tl2::details::MyMcValueVectorWrite(::basictl::tl_ostream & s, const ::tl2::MyMcValueVector& item) { + if (!::tl2::details::BuiltinVectorService1ValueWrite(s, item.xs)) { return false; } + return true; +} + +bool tl2::details::MyMcValueVectorReadBoxed(::basictl::tl_istream & s, ::tl2::MyMcValueVector& item) { + if (!s.nat_read_exact_tag(0x761d6d58)) { return false; } + return tl2::details::MyMcValueVectorRead(s, item); +} + +bool tl2::details::MyMcValueVectorWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyMcValueVector& item) { + if (!s.nat_write(0x761d6d58)) { return false; } + return tl2::details::MyMcValueVectorWrite(s, item); +} + +bool tl2::MyString::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyStringRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyString::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyStringWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyString::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyStringReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyString::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyStringWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyStringReset(::tl2::MyString& item) { + item.val2.clear(); +} + +bool tl2::details::MyStringRead(::basictl::tl_istream & s, ::tl2::MyString& item) { + if (!s.nat_read_exact_tag(0xb5286e24)) { return false;} + if (!s.string_read(item.val2)) { return false; } + return true; +} + +bool tl2::details::MyStringWrite(::basictl::tl_ostream & s, const ::tl2::MyString& item) { + if (!s.nat_write(0xb5286e24)) { return false; } + if (!s.string_write(item.val2)) { return false;} + return true; +} + +bool tl2::details::MyStringReadBoxed(::basictl::tl_istream & s, ::tl2::MyString& item) { + if (!s.nat_read_exact_tag(0xc8bfa969)) { return false; } + return tl2::details::MyStringRead(s, item); +} + +bool tl2::details::MyStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyString& item) { + if (!s.nat_write(0xc8bfa969)) { return false; } + return tl2::details::MyStringWrite(s, item); +} + +void tl2::details::MyTuple10Reset(::tl2::MyTuplen<10>& item) { + ::tl2::details::BuiltinTuple10IntBoxedReset(item); +} + +bool tl2::details::MyTuple10Read(::basictl::tl_istream & s, ::tl2::MyTuplen<10>& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTuple10IntBoxedRead(s, item)) { return false; } + return true; +} + +bool tl2::details::MyTuple10Write(::basictl::tl_ostream & s, const ::tl2::MyTuplen<10>& item) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTuple10IntBoxedWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::MyTuple10ReadBoxed(::basictl::tl_istream & s, ::tl2::MyTuplen<10>& item) { + if (!s.nat_read_exact_tag(0x62c51172)) { return false; } + return tl2::details::MyTuple10Read(s, item); +} + +bool tl2::details::MyTuple10WriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyTuplen<10>& item) { + if (!s.nat_write(0x62c51172)) { return false; } + return tl2::details::MyTuple10Write(s, item); +} + +bool tl2::details::MyTuple10MaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::MyTuplen<10>>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::MyTuple10Read(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::MyTuple10MaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::MyTuplen<10>>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::MyTuple10Write(s, *item)) { return false; } + } + return true; +} + +bool tl2::MyTwoDicts::read(::basictl::tl_istream & s) { + if (!::tl2::details::MyTwoDictsRead(s, *this)) { return false; } + return true; +} + +bool tl2::MyTwoDicts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyTwoDictsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::MyTwoDicts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyTwoDictsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::MyTwoDicts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyTwoDictsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::MyTwoDictsReset(::tl2::MyTwoDicts& item) { + ::tl2::details::DictionaryIntReset(item.a); + ::tl2::details::DictionaryIntReset(item.b); +} + +bool tl2::details::MyTwoDictsRead(::basictl::tl_istream & s, ::tl2::MyTwoDicts& item) { + if (!::tl2::details::DictionaryIntRead(s, item.a)) { return false; } + if (!::tl2::details::DictionaryIntRead(s, item.b)) { return false; } + return true; +} + +bool tl2::details::MyTwoDictsWrite(::basictl::tl_ostream & s, const ::tl2::MyTwoDicts& item) { + if (!::tl2::details::DictionaryIntWrite(s, item.a)) { return false; } + if (!::tl2::details::DictionaryIntWrite(s, item.b)) { return false; } + return true; +} + +bool tl2::details::MyTwoDictsReadBoxed(::basictl::tl_istream & s, ::tl2::MyTwoDicts& item) { + if (!s.nat_read_exact_tag(0xa859581d)) { return false; } + return tl2::details::MyTwoDictsRead(s, item); +} + +bool tl2::details::MyTwoDictsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyTwoDicts& item) { + if (!s.nat_write(0xa859581d)) { return false; } + return tl2::details::MyTwoDictsWrite(s, item); +} + +static const std::string_view MyValue_tbl_tl_name[]{"myInt", "myString"}; +static const uint32_t MyValue_tbl_tl_tag[]{0xc12375b7, 0xc8bfa969}; + +bool tl2::MyValue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::MyValueReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::MyValue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::MyValueWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::MyValue::tl_name() const { + return MyValue_tbl_tl_name[value.index()]; +} +uint32_t tl2::MyValue::tl_tag() const { + return MyValue_tbl_tl_tag[value.index()]; +} + + +void tl2::details::MyValueReset(::tl2::MyValue& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::MyValueReadBoxed(::basictl::tl_istream & s, ::tl2::MyValue& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0xc12375b7: + if (item.value.index() != 0) { item.value.emplace<0>(); } + if (!::tl2::details::MyIntRead(s, std::get<0>(item.value))) { return false; } + break; + case 0xc8bfa969: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::MyStringRead(s, std::get<1>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::MyValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::MyValue& item) { + s.nat_write(MyValue_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 0: + if (!::tl2::details::MyIntWrite(s, std::get<0>(item.value))) { return false; } + break; + case 1: + if (!::tl2::details::MyStringWrite(s, std::get<1>(item.value))) { return false; } + break; + } + return true; +} + +bool tl2::NonOptNat::read(::basictl::tl_istream & s) { + if (!::tl2::details::NonOptNatRead(s, *this)) { return false; } + return true; +} + +bool tl2::NonOptNat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::NonOptNatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::NonOptNat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::NonOptNatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::NonOptNat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::NonOptNatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::NonOptNatReset(::tl2::NonOptNat& item) { + item.n = 0; + item.xs.clear(); +} + +bool tl2::details::NonOptNatRead(::basictl::tl_istream & s, ::tl2::NonOptNat& item) { + if (!s.nat_read(item.n)) { return false; } + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleIntRead(s, item.xs, item.n)) { return false; } + return true; +} + +bool tl2::details::NonOptNatWrite(::basictl::tl_ostream & s, const ::tl2::NonOptNat& item) { + if (!s.nat_write(item.n)) { return false;} + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, item.xs, item.n)) { return false; } + return true; +} + +bool tl2::details::NonOptNatReadBoxed(::basictl::tl_istream & s, ::tl2::NonOptNat& item) { + if (!s.nat_read_exact_tag(0x45366605)) { return false; } + return tl2::details::NonOptNatRead(s, item); +} + +bool tl2::details::NonOptNatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::NonOptNat& item) { + if (!s.nat_write(0x45366605)) { return false; } + return tl2::details::NonOptNatWrite(s, item); +} + +void tl2::details::RightIntVectorService6FindWithBoundsResultReset(::tl2::Right>& item) { + item.value.clear(); +} + +bool tl2::details::RightIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::Right>& item) { + if (!::tl2::details::BuiltinVectorService6FindWithBoundsResultRead(s, item.value)) { return false; } + return true; +} + +bool tl2::details::RightIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::Right>& item) { + if (!::tl2::details::BuiltinVectorService6FindWithBoundsResultWrite(s, item.value)) { return false; } + return true; +} + +bool tl2::details::RightIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::Right>& item) { + if (!s.nat_read_exact_tag(0xdf3ecb3b)) { return false; } + return tl2::details::RightIntVectorService6FindWithBoundsResultRead(s, item); +} + +bool tl2::details::RightIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Right>& item) { + if (!s.nat_write(0xdf3ecb3b)) { return false; } + return tl2::details::RightIntVectorService6FindWithBoundsResultWrite(s, item); +} + +void tl2::details::RightService6ErrorVectorService6FindResultRowReset(::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + item.value.clear(); +} + +bool tl2::details::RightService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!::tl2::details::BuiltinVectorService6FindResultRowRead(s, item.value)) { return false; } + return true; +} + +bool tl2::details::RightService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!::tl2::details::BuiltinVectorService6FindResultRowWrite(s, item.value)) { return false; } + return true; +} + +bool tl2::details::RightService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!s.nat_read_exact_tag(0xdf3ecb3b)) { return false; } + return tl2::details::RightService6ErrorVectorService6FindResultRowRead(s, item); +} + +bool tl2::details::RightService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Right<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>& item) { + if (!s.nat_write(0xdf3ecb3b)) { return false; } + return tl2::details::RightService6ErrorVectorService6FindResultRowWrite(s, item); +} + +bool tl2::RpcInvokeReqExtra::read(::basictl::tl_istream & s) { + if (!::tl2::details::RpcInvokeReqExtraRead(s, *this)) { return false; } + return true; +} + +bool tl2::RpcInvokeReqExtra::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::RpcInvokeReqExtraWrite(s, *this)) { return false; } + return true; +} + +bool tl2::RpcInvokeReqExtra::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::RpcInvokeReqExtraReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::RpcInvokeReqExtra::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::RpcInvokeReqExtraWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::RpcInvokeReqExtraReset(::tl2::RpcInvokeReqExtra& item) { + item.fields_mask = 0; + ::tl2::details::TrueReset(item.query); + ::tl2::details::TrueReset(item.sort); + ::tl2::details::TrueReset(item.sort_reverse); + item.wait_binlog_pos = 0; + item.string_forward_keys.clear(); +} + +bool tl2::details::RpcInvokeReqExtraRead(::basictl::tl_istream & s, ::tl2::RpcInvokeReqExtra& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::TrueRead(s, item.query)) { return false; } + } else { + ::tl2::details::TrueReset(item.query); + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::TrueRead(s, item.sort)) { return false; } + } else { + ::tl2::details::TrueReset(item.sort); + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!::tl2::details::TrueRead(s, item.sort_reverse)) { return false; } + } else { + ::tl2::details::TrueReset(item.sort_reverse); + } + if ((item.fields_mask & (1<<16)) != 0) { + if (!s.long_read(item.wait_binlog_pos)) { return false; } + } else { + item.wait_binlog_pos = 0; + } + if ((item.fields_mask & (1<<18)) != 0) { + if (!::tl2::details::BuiltinVectorStringRead(s, item.string_forward_keys)) { return false; } + } else { + item.string_forward_keys.clear(); + } + return true; +} + +bool tl2::details::RpcInvokeReqExtraWrite(::basictl::tl_ostream & s, const ::tl2::RpcInvokeReqExtra& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::TrueWrite(s, item.query)) { return false; } + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::TrueWrite(s, item.sort)) { return false; } + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!::tl2::details::TrueWrite(s, item.sort_reverse)) { return false; } + } + if ((item.fields_mask & (1<<16)) != 0) { + if (!s.long_write(item.wait_binlog_pos)) { return false;} + } + if ((item.fields_mask & (1<<18)) != 0) { + if (!::tl2::details::BuiltinVectorStringWrite(s, item.string_forward_keys)) { return false; } + } + return true; +} + +bool tl2::details::RpcInvokeReqExtraReadBoxed(::basictl::tl_istream & s, ::tl2::RpcInvokeReqExtra& item) { + if (!s.nat_read_exact_tag(0xf3ef81a9)) { return false; } + return tl2::details::RpcInvokeReqExtraRead(s, item); +} + +bool tl2::details::RpcInvokeReqExtraWriteBoxed(::basictl::tl_ostream & s, const ::tl2::RpcInvokeReqExtra& item) { + if (!s.nat_write(0xf3ef81a9)) { return false; } + return tl2::details::RpcInvokeReqExtraWrite(s, item); +} + +bool tl2::StatOne::read(::basictl::tl_istream & s) { + if (!::tl2::details::StatOneRead(s, *this)) { return false; } + return true; +} + +bool tl2::StatOne::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::StatOneWrite(s, *this)) { return false; } + return true; +} + +bool tl2::StatOne::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::StatOneReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::StatOne::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::StatOneWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::StatOneReset(::tl2::StatOne& item) { + item.key.clear(); + item.value.clear(); +} + +bool tl2::details::StatOneRead(::basictl::tl_istream & s, ::tl2::StatOne& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::StatOneWrite(::basictl::tl_ostream & s, const ::tl2::StatOne& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::StatOneReadBoxed(::basictl::tl_istream & s, ::tl2::StatOne& item) { + if (!s.nat_read_exact_tag(0x74b0604b)) { return false; } + return tl2::details::StatOneRead(s, item); +} + +bool tl2::details::StatOneWriteBoxed(::basictl::tl_ostream & s, const ::tl2::StatOne& item) { + if (!s.nat_write(0x74b0604b)) { return false; } + return tl2::details::StatOneWrite(s, item); +} + +void tl2::details::StringReset(std::string& item) { + item.clear(); +} + +bool tl2::details::StringRead(::basictl::tl_istream & s, std::string& item) { + if (!s.string_read(item)) { return false; } + return true; +} + +bool tl2::details::StringWrite(::basictl::tl_ostream & s, const std::string& item) { + if (!s.string_write(item)) { return false;} + return true; +} + +bool tl2::details::StringReadBoxed(::basictl::tl_istream & s, std::string& item) { + if (!s.nat_read_exact_tag(0xb5286e24)) { return false; } + return tl2::details::StringRead(s, item); +} + +bool tl2::details::StringWriteBoxed(::basictl::tl_ostream & s, const std::string& item) { + if (!s.nat_write(0xb5286e24)) { return false; } + return tl2::details::StringWrite(s, item); +} + +void tl2::details::TupleInt3Reset(std::array& item) { + ::tl2::details::BuiltinTuple3IntReset(item); +} + +bool tl2::details::TupleInt3Read(::basictl::tl_istream & s, std::array& item) { + if (!::tl2::details::BuiltinTuple3IntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleInt3Write(::basictl::tl_ostream & s, const std::array& item) { + if (!::tl2::details::BuiltinTuple3IntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleInt3ReadBoxed(::basictl::tl_istream & s, std::array& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleInt3Read(s, item); +} + +bool tl2::details::TupleInt3WriteBoxed(::basictl::tl_ostream & s, const std::array& item) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleInt3Write(s, item); +} + +void tl2::details::TupleInt5Reset(std::array& item) { + ::tl2::details::BuiltinTuple5IntReset(item); +} + +bool tl2::details::TupleInt5Read(::basictl::tl_istream & s, std::array& item) { + if (!::tl2::details::BuiltinTuple5IntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleInt5Write(::basictl::tl_ostream & s, const std::array& item) { + if (!::tl2::details::BuiltinTuple5IntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleInt5ReadBoxed(::basictl::tl_istream & s, std::array& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleInt5Read(s, item); +} + +bool tl2::details::TupleInt5WriteBoxed(::basictl::tl_ostream & s, const std::array& item) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleInt5Write(s, item); +} + +void tl2::details::TupleIntBoxedReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::TupleIntBoxedRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleIntBoxedRead(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleIntBoxedWrite(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxedRead(s, item, nat_n); +} + +bool tl2::details::TupleIntBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxedWrite(s, item, nat_n); +} + +void tl2::details::TupleIntBoxed10Reset(std::array& item) { + ::tl2::details::BuiltinTuple10IntBoxedReset(item); +} + +bool tl2::details::TupleIntBoxed10Read(::basictl::tl_istream & s, std::array& item) { + if (!::tl2::details::BuiltinTuple10IntBoxedRead(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxed10Write(::basictl::tl_ostream & s, const std::array& item) { + if (!::tl2::details::BuiltinTuple10IntBoxedWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxed10ReadBoxed(::basictl::tl_istream & s, std::array& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxed10Read(s, item); +} + +bool tl2::details::TupleIntBoxed10WriteBoxed(::basictl::tl_ostream & s, const std::array& item) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxed10Write(s, item); +} + +void tl2::details::TupleIntBoxed2Reset(std::array& item) { + ::tl2::details::BuiltinTuple2IntBoxedReset(item); +} + +bool tl2::details::TupleIntBoxed2Read(::basictl::tl_istream & s, std::array& item) { + if (!::tl2::details::BuiltinTuple2IntBoxedRead(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxed2Write(::basictl::tl_ostream & s, const std::array& item) { + if (!::tl2::details::BuiltinTuple2IntBoxedWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleIntBoxed2ReadBoxed(::basictl::tl_istream & s, std::array& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxed2Read(s, item); +} + +bool tl2::details::TupleIntBoxed2WriteBoxed(::basictl::tl_ostream & s, const std::array& item) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleIntBoxed2Write(s, item); +} + +void tl2::details::TupleService1Value3Reset(std::array<::tl2::service1::Value, 3>& item) { + ::tl2::details::BuiltinTuple3Service1ValueReset(item); +} + +bool tl2::details::TupleService1Value3Read(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item) { + if (!::tl2::details::BuiltinTuple3Service1ValueRead(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleService1Value3Write(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item) { + if (!::tl2::details::BuiltinTuple3Service1ValueWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::TupleService1Value3ReadBoxed(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleService1Value3Read(s, item); +} + +bool tl2::details::TupleService1Value3WriteBoxed(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleService1Value3Write(s, item); +} + +void tl2::details::TupleService2CounterSetReset(std::vector<::tl2::service2::CounterSet>& item) { + item.clear(); +} + +bool tl2::details::TupleService2CounterSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleService2CounterSetRead(s, item, nat_n, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + return true; +} + +bool tl2::details::TupleService2CounterSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleService2CounterSetWrite(s, item, nat_n, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + return true; +} + +bool tl2::details::TupleService2CounterSetReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleService2CounterSetRead(s, item, nat_tintCountersNum, nat_tfloatCountersNum, nat_n); +} + +bool tl2::details::TupleService2CounterSetWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleService2CounterSetWrite(s, item, nat_tintCountersNum, nat_tfloatCountersNum, nat_n); +} + +void tl2::details::VectorEitherIntVectorService6FindWithBoundsResultReset(std::vector<::tl2::Either>>& item) { + item.clear(); +} + +bool tl2::details::VectorEitherIntVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item) { + if (!::tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorEitherIntVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item) { + if (!::tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorEitherIntVectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Either>>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorEitherIntVectorService6FindWithBoundsResultRead(s, item); +} + +bool tl2::details::VectorEitherIntVectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Either>>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorEitherIntVectorService6FindWithBoundsResultWrite(s, item); +} + +void tl2::details::VectorEitherService6ErrorVectorService6FindResultRowReset(std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + item.clear(); +} + +bool tl2::details::VectorEitherService6ErrorVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorEitherService6ErrorVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorEitherService6ErrorVectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorEitherService6ErrorVectorService6FindResultRowRead(s, item); +} + +bool tl2::details::VectorEitherService6ErrorVectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorEitherService6ErrorVectorService6FindResultRowWrite(s, item); +} + +void tl2::details::VectorIntBoxedReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::VectorIntBoxedRead(::basictl::tl_istream & s, std::vector& item) { + if (!::tl2::details::BuiltinVectorIntBoxedRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntBoxedWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!::tl2::details::BuiltinVectorIntBoxedWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorIntBoxedRead(s, item); +} + +bool tl2::details::VectorIntBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorIntBoxedWrite(s, item); +} + +void tl2::details::VectorIntegerReset(std::vector<::tl2::Integer>& item) { + item.clear(); +} + +bool tl2::details::VectorIntegerRead(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item) { + if (!::tl2::details::BuiltinVectorIntegerRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntegerWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item) { + if (!::tl2::details::BuiltinVectorIntegerWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorIntegerReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Integer>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorIntegerRead(s, item); +} + +bool tl2::details::VectorIntegerWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Integer>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorIntegerWrite(s, item); +} + +void tl2::details::VectorLongBoxedReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::VectorLongBoxedRead(::basictl::tl_istream & s, std::vector& item) { + if (!::tl2::details::BuiltinVectorLongBoxedRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorLongBoxedWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!::tl2::details::BuiltinVectorLongBoxedWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorLongBoxedReadBoxed(::basictl::tl_istream & s, std::vector& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorLongBoxedRead(s, item); +} + +bool tl2::details::VectorLongBoxedWriteBoxed(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorLongBoxedWrite(s, item); +} + +void tl2::details::VectorMapStringStringReset(std::vector<::tl2::Map>& item) { + item.clear(); +} + +bool tl2::details::VectorMapStringStringRead(::basictl::tl_istream & s, std::vector<::tl2::Map>& item) { + if (!::tl2::details::BuiltinVectorMapStringStringRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorMapStringStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item) { + if (!::tl2::details::BuiltinVectorMapStringStringWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorMapStringStringReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::Map>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorMapStringStringRead(s, item); +} + +bool tl2::details::VectorMapStringStringWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::Map>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorMapStringStringWrite(s, item); +} + +void tl2::details::VectorService1ValueReset(std::vector<::tl2::service1::Value>& item) { + item.clear(); +} + +bool tl2::details::VectorService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item) { + if (!::tl2::details::BuiltinVectorService1ValueRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item) { + if (!::tl2::details::BuiltinVectorService1ValueWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService1ValueReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService1ValueRead(s, item); +} + +bool tl2::details::VectorService1ValueWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService1ValueWrite(s, item); +} + +void tl2::details::VectorService6FindResultRowReset(std::vector<::tl2::service6::FindResultRow>& item) { + item.clear(); +} + +bool tl2::details::VectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item) { + if (!::tl2::details::BuiltinVectorService6FindResultRowRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item) { + if (!::tl2::details::BuiltinVectorService6FindResultRowWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService6FindResultRowReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService6FindResultRowRead(s, item); +} + +bool tl2::details::VectorService6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService6FindResultRowWrite(s, item); +} + +void tl2::details::VectorService6FindWithBoundsResultReset(std::vector<::tl2::service6::FindWithBoundsResult>& item) { + item.clear(); +} + +bool tl2::details::VectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item) { + if (!::tl2::details::BuiltinVectorService6FindWithBoundsResultRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item) { + if (!::tl2::details::BuiltinVectorService6FindWithBoundsResultWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService6FindWithBoundsResultRead(s, item); +} + +bool tl2::details::VectorService6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService6FindWithBoundsResultWrite(s, item); +} + +void tl2::details::VectorStringReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::VectorStringRead(::basictl::tl_istream & s, std::vector& item) { + if (!::tl2::details::BuiltinVectorStringRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorStringWrite(::basictl::tl_ostream & s, const std::vector& item) { + if (!::tl2::details::BuiltinVectorStringWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorStringReadBoxed(::basictl::tl_istream & s, std::vector& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorStringRead(s, item); +} + +bool tl2::details::VectorStringWriteBoxed(::basictl::tl_ostream & s, const std::vector& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorStringWrite(s, item); +} + +void tl2::details::VectorTasksQueueTypeInfoReset(std::vector<::tl2::tasks::QueueTypeInfo>& item) { + item.clear(); +} + +bool tl2::details::VectorTasksQueueTypeInfoRead(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item) { + if (!::tl2::details::BuiltinVectorTasksQueueTypeInfoRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorTasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item) { + if (!::tl2::details::BuiltinVectorTasksQueueTypeInfoWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorTasksQueueTypeInfoReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorTasksQueueTypeInfoRead(s, item); +} + +bool tl2::details::VectorTasksQueueTypeInfoWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorTasksQueueTypeInfoWrite(s, item); +} + +bool tl2::WithFloat::read(::basictl::tl_istream & s) { + if (!::tl2::details::WithFloatRead(s, *this)) { return false; } + return true; +} + +bool tl2::WithFloat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::WithFloatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::WithFloat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::WithFloatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::WithFloat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::WithFloatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::WithFloatReset(::tl2::WithFloat& item) { + item.x = 0; + item.y = 0; + item.z = 0; +} + +bool tl2::details::WithFloatRead(::basictl::tl_istream & s, ::tl2::WithFloat& item) { + if (!s.float_read(item.x)) { return false; } + if (!s.nat_read_exact_tag(0x824dab22)) { return false;} + if (!s.float_read(item.y)) { return false; } + if (!s.float_read(item.z)) { return false; } + return true; +} + +bool tl2::details::WithFloatWrite(::basictl::tl_ostream & s, const ::tl2::WithFloat& item) { + if (!s.float_write(item.x)) { return false;} + if (!s.nat_write(0x824dab22)) { return false; } + if (!s.float_write(item.y)) { return false;} + if (!s.float_write(item.z)) { return false;} + return true; +} + +bool tl2::details::WithFloatReadBoxed(::basictl::tl_istream & s, ::tl2::WithFloat& item) { + if (!s.nat_read_exact_tag(0x071b8685)) { return false; } + return tl2::details::WithFloatRead(s, item); +} + +bool tl2::details::WithFloatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::WithFloat& item) { + if (!s.nat_write(0x071b8685)) { return false; } + return tl2::details::WithFloatWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/__meta/details.cpp b/internal/tlcodegen/test/gen/schema_cpp/__meta/details.cpp new file mode 100644 index 00000000..c5825737 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__meta/details.cpp @@ -0,0 +1,191 @@ +#include "../a_tlgen_helpers_code.hpp" + +#include + +#include "headers.hpp" + +namespace { + struct tl_items { + public: + std::map items; + tl_items(); + }; + + tl_items items; + std::function()> no_object_generator = []() -> std::unique_ptr { + throw std::runtime_error("no generation for this type of objects"); + }; + std::function()> no_function_generator = []() -> std::unique_ptr { + throw std::runtime_error("no generation for this type of functions"); + }; +} + +tl2::meta::tl_item tl2::meta::get_item_by_name(std::string &&s) { + if (items.items.count(s)) { + return items.items[s]; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +void tl2::meta::set_create_object_by_name(std::string &&s, std::function()>&& gen) { + if (items.items.count(s)) { + items.items[s].create_object = gen; + return; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +void tl2::meta::set_create_function_by_name(std::string &&s, std::function()>&& gen) { + if (items.items.count(s)) { + items.items[s].create_function = gen; + return; + } + throw std::runtime_error("no item with such name + \"" + s + "\""); +} + +tl_items::tl_items() { + (this->items)["antispam.getPattern"] = tl2::meta::tl_item{.tag=0x3de14136,.annotations=0x1,.name="antispam.getPattern",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["antispam.patternFound"] = tl2::meta::tl_item{.tag=0xa7688492,.annotations=0x0,.name="antispam.patternFound",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["antispam.patternNotFound"] = tl2::meta::tl_item{.tag=0x2c22e225,.annotations=0x0,.name="antispam.patternNotFound",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["benchObject"] = tl2::meta::tl_item{.tag=0xb697e865,.annotations=0x0,.name="benchObject",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boolStat"] = tl2::meta::tl_item{.tag=0x92cbcbfa,.annotations=0x0,.name="boolStat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedArray"] = tl2::meta::tl_item{.tag=0x95dcc8b7,.annotations=0x1,.name="boxedArray",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedInt"] = tl2::meta::tl_item{.tag=0x5688ebaf,.annotations=0x1,.name="boxedInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedString"] = tl2::meta::tl_item{.tag=0x548994db,.annotations=0x1,.name="boxedString",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedTuple"] = tl2::meta::tl_item{.tag=0x30c9d533,.annotations=0x1,.name="boxedTuple",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedTupleSlice1"] = tl2::meta::tl_item{.tag=0x25230d40,.annotations=0x1,.name="boxedTupleSlice1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedTupleSlice2"] = tl2::meta::tl_item{.tag=0x1cdf4705,.annotations=0x1,.name="boxedTupleSlice2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedTupleSlice3"] = tl2::meta::tl_item{.tag=0xa19b8106,.annotations=0x1,.name="boxedTupleSlice3",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedVector32"] = tl2::meta::tl_item{.tag=0xbbadef07,.annotations=0x1,.name="boxedVector32",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedVector32BoxedElem"] = tl2::meta::tl_item{.tag=0x591cecd4,.annotations=0x1,.name="boxedVector32BoxedElem",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["boxedVector64"] = tl2::meta::tl_item{.tag=0x83659ba8,.annotations=0x1,.name="boxedVector64",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["double"] = tl2::meta::tl_item{.tag=0x2210c154,.annotations=0x0,.name="double",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["fieldConflict1"] = tl2::meta::tl_item{.tag=0xf314bd09,.annotations=0x0,.name="fieldConflict1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["fieldConflict2"] = tl2::meta::tl_item{.tag=0x1bba76b8,.annotations=0x0,.name="fieldConflict2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["fieldConflict3"] = tl2::meta::tl_item{.tag=0x2cf6e157,.annotations=0x0,.name="fieldConflict3",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["fieldConflict4"] = tl2::meta::tl_item{.tag=0xd93c186a,.annotations=0x0,.name="fieldConflict4",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["float"] = tl2::meta::tl_item{.tag=0x824dab22,.annotations=0x0,.name="float",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["get_arrays"] = tl2::meta::tl_item{.tag=0x90658cdb,.annotations=0x1,.name="get_arrays",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getDouble"] = tl2::meta::tl_item{.tag=0x39711d7b,.annotations=0x1,.name="getDouble",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getFloat"] = tl2::meta::tl_item{.tag=0x25a7bc68,.annotations=0x1,.name="getFloat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getMaybeIface"] = tl2::meta::tl_item{.tag=0x6b055ae4,.annotations=0x1,.name="getMaybeIface",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getMyDictOfInt"] = tl2::meta::tl_item{.tag=0x166f962c,.annotations=0x1,.name="getMyDictOfInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getMyDouble"] = tl2::meta::tl_item{.tag=0xb660ad10,.annotations=0x1,.name="getMyDouble",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getMyValue"] = tl2::meta::tl_item{.tag=0xb3df27fe,.annotations=0x1,.name="getMyValue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getNonOptNat"] = tl2::meta::tl_item{.tag=0x67665961,.annotations=0x1,.name="getNonOptNat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["getStats"] = tl2::meta::tl_item{.tag=0xbaa6da35,.annotations=0x1,.name="getStats",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["int"] = tl2::meta::tl_item{.tag=0xa8509bda,.annotations=0x0,.name="int",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["integer"] = tl2::meta::tl_item{.tag=0x7e194796,.annotations=0x0,.name="integer",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["issue3498"] = tl2::meta::tl_item{.tag=0xf54b7b0a,.annotations=0x0,.name="issue3498",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["long"] = tl2::meta::tl_item{.tag=0x22076cba,.annotations=0x0,.name="long",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myAnonMcValue"] = tl2::meta::tl_item{.tag=0x569310db,.annotations=0x0,.name="myAnonMcValue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myBoxedArray"] = tl2::meta::tl_item{.tag=0x288f64f0,.annotations=0x0,.name="myBoxedArray",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myBoxedTupleSlice"] = tl2::meta::tl_item{.tag=0x25d1a1be,.annotations=0x0,.name="myBoxedTupleSlice",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myBoxedVectorSlice"] = tl2::meta::tl_item{.tag=0x57d164bb,.annotations=0x0,.name="myBoxedVectorSlice",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myDictOfInt"] = tl2::meta::tl_item{.tag=0xb8019a3d,.annotations=0x0,.name="myDictOfInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myDouble"] = tl2::meta::tl_item{.tag=0x90a6c726,.annotations=0x0,.name="myDouble",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myInt"] = tl2::meta::tl_item{.tag=0xc12375b7,.annotations=0x0,.name="myInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myMaybe1"] = tl2::meta::tl_item{.tag=0x32c541fe,.annotations=0x0,.name="myMaybe1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myMaybe2"] = tl2::meta::tl_item{.tag=0xef6d355c,.annotations=0x0,.name="myMaybe2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myMcValue"] = tl2::meta::tl_item{.tag=0xe2ffd978,.annotations=0x0,.name="myMcValue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myMcValueTuple"] = tl2::meta::tl_item{.tag=0x1287d116,.annotations=0x0,.name="myMcValueTuple",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myMcValueVector"] = tl2::meta::tl_item{.tag=0x761d6d58,.annotations=0x0,.name="myMcValueVector",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myString"] = tl2::meta::tl_item{.tag=0xc8bfa969,.annotations=0x0,.name="myString",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["myTwoDicts"] = tl2::meta::tl_item{.tag=0xa859581d,.annotations=0x0,.name="myTwoDicts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["nonOptNat"] = tl2::meta::tl_item{.tag=0x45366605,.annotations=0x0,.name="nonOptNat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["pkg2.foo"] = tl2::meta::tl_item{.tag=0xe144703d,.annotations=0x0,.name="pkg2.foo",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["pkg2.t1"] = tl2::meta::tl_item{.tag=0x638206ec,.annotations=0x0,.name="pkg2.t1",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["pkg2.t2"] = tl2::meta::tl_item{.tag=0xd6e5af9c,.annotations=0x0,.name="pkg2.t2",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["rpcInvokeReqExtra"] = tl2::meta::tl_item{.tag=0xf3ef81a9,.annotations=0x0,.name="rpcInvokeReqExtra",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.add"] = tl2::meta::tl_item{.tag=0x481df8be,.annotations=0x1,.name="service1.add",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.addOrGet"] = tl2::meta::tl_item{.tag=0x6a42faad,.annotations=0x1,.name="service1.addOrGet",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.addOrIncr"] = tl2::meta::tl_item{.tag=0x90c4b402,.annotations=0x1,.name="service1.addOrIncr",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.append"] = tl2::meta::tl_item{.tag=0x04dec671,.annotations=0x1,.name="service1.append",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.cas"] = tl2::meta::tl_item{.tag=0x51851964,.annotations=0x1,.name="service1.cas",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.decr"] = tl2::meta::tl_item{.tag=0xeb179ce7,.annotations=0x1,.name="service1.decr",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.delete"] = tl2::meta::tl_item{.tag=0x83277767,.annotations=0x1,.name="service1.delete",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.disableExpiration"] = tl2::meta::tl_item{.tag=0xf1c39c2d,.annotations=0x1,.name="service1.disableExpiration",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.disableKeysStat"] = tl2::meta::tl_item{.tag=0x79d6160f,.annotations=0x1,.name="service1.disableKeysStat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.enableExpiration"] = tl2::meta::tl_item{.tag=0x2b51ad67,.annotations=0x1,.name="service1.enableExpiration",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.enableKeysStat"] = tl2::meta::tl_item{.tag=0x29a7090e,.annotations=0x1,.name="service1.enableKeysStat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.exists"] = tl2::meta::tl_item{.tag=0xe0284c9e,.annotations=0x1,.name="service1.exists",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.get"] = tl2::meta::tl_item{.tag=0x29099b19,.annotations=0x1,.name="service1.get",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getExpireTime"] = tl2::meta::tl_item{.tag=0x5a731070,.annotations=0x1,.name="service1.getExpireTime",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getKeysStat"] = tl2::meta::tl_item{.tag=0x06cecd58,.annotations=0x1,.name="service1.getKeysStat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getKeysStatPeriods"] = tl2::meta::tl_item{.tag=0x8cdf39e3,.annotations=0x1,.name="service1.getKeysStatPeriods",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getWildcard"] = tl2::meta::tl_item{.tag=0x2f2abf13,.annotations=0x1,.name="service1.getWildcard",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getWildcardDict"] = tl2::meta::tl_item{.tag=0x72bbc81b,.annotations=0x1,.name="service1.getWildcardDict",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getWildcardList"] = tl2::meta::tl_item{.tag=0x56b6ead4,.annotations=0x1,.name="service1.getWildcardList",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.getWildcardWithFlags"] = tl2::meta::tl_item{.tag=0x5f6a1f78,.annotations=0x1,.name="service1.getWildcardWithFlags",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.incr"] = tl2::meta::tl_item{.tag=0x0f96b56e,.annotations=0x1,.name="service1.incr",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.keysStat"] = tl2::meta::tl_item{.tag=0xf0f6bc68,.annotations=0x0,.name="service1.keysStat",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.longvalue"] = tl2::meta::tl_item{.tag=0x082e0945,.annotations=0x0,.name="service1.longvalue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.longvalueWithTime"] = tl2::meta::tl_item{.tag=0xa04606ec,.annotations=0x0,.name="service1.longvalueWithTime",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.not_found"] = tl2::meta::tl_item{.tag=0x1d670b96,.annotations=0x0,.name="service1.not_found",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.replace"] = tl2::meta::tl_item{.tag=0x7f2c447d,.annotations=0x1,.name="service1.replace",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.replaceOrIncr"] = tl2::meta::tl_item{.tag=0x9d1bdcfd,.annotations=0x1,.name="service1.replaceOrIncr",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.set"] = tl2::meta::tl_item{.tag=0x05ae5f66,.annotations=0x1,.name="service1.set",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.setOrIncr"] = tl2::meta::tl_item{.tag=0x772e390d,.annotations=0x1,.name="service1.setOrIncr",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.strvalue"] = tl2::meta::tl_item{.tag=0x5faa0c52,.annotations=0x0,.name="service1.strvalue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.strvalueWithTime"] = tl2::meta::tl_item{.tag=0x98b1a484,.annotations=0x0,.name="service1.strvalueWithTime",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service1.touch"] = tl2::meta::tl_item{.tag=0xb737aa03,.annotations=0x1,.name="service1.touch",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service2.addOrIncrMany"] = tl2::meta::tl_item{.tag=0x5aa52489,.annotations=0x2,.name="service2.addOrIncrMany",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service2.set"] = tl2::meta::tl_item{.tag=0x0d31f63d,.annotations=0x4,.name="service2.set",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service2.setObjectTtl"] = tl2::meta::tl_item{.tag=0x6f98f025,.annotations=0x4,.name="service2.setObjectTtl",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.createProduct"] = tl2::meta::tl_item{.tag=0xb7d92bd9,.annotations=0x1,.name="service3.createProduct",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.deleteAllProducts"] = tl2::meta::tl_item{.tag=0x4494acc2,.annotations=0x1,.name="service3.deleteAllProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.deleteGroupedProducts"] = tl2::meta::tl_item{.tag=0xe468e614,.annotations=0x1,.name="service3.deleteGroupedProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.deleteProduct"] = tl2::meta::tl_item{.tag=0x6867e707,.annotations=0x1,.name="service3.deleteProduct",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.getLastVisitTimestamp"] = tl2::meta::tl_item{.tag=0x9a4c788d,.annotations=0x1,.name="service3.getLastVisitTimestamp",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.getLimits"] = tl2::meta::tl_item{.tag=0xeb399467,.annotations=0x1,.name="service3.getLimits",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.getProductStats"] = tl2::meta::tl_item{.tag=0x261f6898,.annotations=0x1,.name="service3.getProductStats",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.getProducts"] = tl2::meta::tl_item{.tag=0xeb306233,.annotations=0x1,.name="service3.getProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.getScheduledProducts"] = tl2::meta::tl_item{.tag=0xf53ad7bd,.annotations=0x1,.name="service3.getScheduledProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.groupCountLimit"] = tl2::meta::tl_item{.tag=0x8c04ea7f,.annotations=0x0,.name="service3.groupCountLimit",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.groupSizeLimit"] = tl2::meta::tl_item{.tag=0x90e59396,.annotations=0x0,.name="service3.groupSizeLimit",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.limits"] = tl2::meta::tl_item{.tag=0x80ee61ca,.annotations=0x0,.name="service3.limits",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.productStatsOld"] = tl2::meta::tl_item{.tag=0x6319810b,.annotations=0x0,.name="service3.productStatsOld",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.restoreAllProducts"] = tl2::meta::tl_item{.tag=0x4d839ed0,.annotations=0x1,.name="service3.restoreAllProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.restoreGroupedProducts"] = tl2::meta::tl_item{.tag=0x1f17bfac,.annotations=0x1,.name="service3.restoreGroupedProducts",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.restoreProduct"] = tl2::meta::tl_item{.tag=0x6170d515,.annotations=0x1,.name="service3.restoreProduct",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.setLastVisitTimestamp"] = tl2::meta::tl_item{.tag=0x7909b020,.annotations=0x1,.name="service3.setLastVisitTimestamp",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service3.setLimits"] = tl2::meta::tl_item{.tag=0x3ad5c19c,.annotations=0x1,.name="service3.setLimits",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service4.modifiedNewsEntry"] = tl2::meta::tl_item{.tag=0xda19832a,.annotations=0x0,.name="service4.modifiedNewsEntry",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service4.object"] = tl2::meta::tl_item{.tag=0xa6eeca4f,.annotations=0x0,.name="service4.object",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.emptyOutput"] = tl2::meta::tl_item{.tag=0x11e46879,.annotations=0x0,.name="service5.emptyOutput",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.insert"] = tl2::meta::tl_item{.tag=0xc911ee2c,.annotations=0x1,.name="service5.insert",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.params"] = tl2::meta::tl_item{.tag=0x12ae5cb5,.annotations=0x0,.name="service5.params",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.performQuery"] = tl2::meta::tl_item{.tag=0x019d80a5,.annotations=0x1,.name="service5.performQuery",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.query"] = tl2::meta::tl_item{.tag=0xb3b62513,.annotations=0x1,.name="service5.query",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service5.stringOutput"] = tl2::meta::tl_item{.tag=0x179e9863,.annotations=0x0,.name="service5.stringOutput",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service6.error"] = tl2::meta::tl_item{.tag=0x738553ef,.annotations=0x0,.name="service6.error",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service6.findResultRow"] = tl2::meta::tl_item{.tag=0xbd3946e3,.annotations=0x0,.name="service6.findResultRow",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service6.findWithBoundsResult"] = tl2::meta::tl_item{.tag=0x3ded850a,.annotations=0x0,.name="service6.findWithBoundsResult",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service6.multiFind"] = tl2::meta::tl_item{.tag=0xe62178d8,.annotations=0x1,.name="service6.multiFind",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["service6.multiFindWithBounds"] = tl2::meta::tl_item{.tag=0x84b168cf,.annotations=0x1,.name="service6.multiFindWithBounds",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["statOne"] = tl2::meta::tl_item{.tag=0x74b0604b,.annotations=0x0,.name="statOne",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["string"] = tl2::meta::tl_item{.tag=0xb5286e24,.annotations=0x0,.name="string",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.addTask"] = tl2::meta::tl_item{.tag=0x2ca073d5,.annotations=0x1,.name="tasks.addTask",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.cronTask"] = tl2::meta::tl_item{.tag=0xc90cf28a,.annotations=0x0,.name="tasks.cronTask",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.cronTaskWithId"] = tl2::meta::tl_item{.tag=0x3a958001,.annotations=0x0,.name="tasks.cronTaskWithId",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.cronTime"] = tl2::meta::tl_item{.tag=0xd4177d7f,.annotations=0x0,.name="tasks.cronTime",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.getAnyTask"] = tl2::meta::tl_item{.tag=0x4a9c7dbb,.annotations=0x1,.name="tasks.getAnyTask",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.getQueueSize"] = tl2::meta::tl_item{.tag=0xd8fcda03,.annotations=0x1,.name="tasks.getQueueSize",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.getQueueTypes"] = tl2::meta::tl_item{.tag=0x5434457a,.annotations=0x1,.name="tasks.getQueueTypes",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.getTaskFromQueue"] = tl2::meta::tl_item{.tag=0x6a52b698,.annotations=0x1,.name="tasks.getTaskFromQueue",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.queueTypeInfo"] = tl2::meta::tl_item{.tag=0x38d38d3e,.annotations=0x0,.name="tasks.queueTypeInfo",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.queueTypeSettings"] = tl2::meta::tl_item{.tag=0x561fbc09,.annotations=0x0,.name="tasks.queueTypeSettings",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.queueTypeStats"] = tl2::meta::tl_item{.tag=0xe1b785f2,.annotations=0x0,.name="tasks.queueTypeStats",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.task"] = tl2::meta::tl_item{.tag=0x7c23bc2c,.annotations=0x0,.name="tasks.task",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.taskInfo"] = tl2::meta::tl_item{.tag=0x06f0c6a6,.annotations=0x0,.name="tasks.taskInfo",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.taskStatusInProgress"] = tl2::meta::tl_item{.tag=0x06ef70e7,.annotations=0x0,.name="tasks.taskStatusInProgress",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.taskStatusNotCurrentlyInEngine"] = tl2::meta::tl_item{.tag=0xb207caaa,.annotations=0x0,.name="tasks.taskStatusNotCurrentlyInEngine",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.taskStatusScheduled"] = tl2::meta::tl_item{.tag=0x0aca80a9,.annotations=0x0,.name="tasks.taskStatusScheduled",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tasks.taskStatusWaiting"] = tl2::meta::tl_item{.tag=0x16739c2c,.annotations=0x0,.name="tasks.taskStatusWaiting",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tree_stats.objectLimitValueDouble"] = tl2::meta::tl_item{.tag=0x5dfb8816,.annotations=0x0,.name="tree_stats.objectLimitValueDouble",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["tree_stats.objectLimitValueLong"] = tl2::meta::tl_item{.tag=0x73111993,.annotations=0x0,.name="tree_stats.objectLimitValueLong",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["true"] = tl2::meta::tl_item{.tag=0x3fedd339,.annotations=0x0,.name="true",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["unique.get"] = tl2::meta::tl_item{.tag=0xce89bbf2,.annotations=0x1,.name="unique.get",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["unique.stringToInt"] = tl2::meta::tl_item{.tag=0x0f766c35,.annotations=0x1,.name="unique.stringToInt",.create_object=no_object_generator,.create_function=no_function_generator}; + (this->items)["withFloat"] = tl2::meta::tl_item{.tag=0x071b8685,.annotations=0x0,.name="withFloat",.create_object=no_object_generator,.create_function=no_function_generator}; +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/__meta/headers.hpp b/internal/tlcodegen/test/gen/schema_cpp/__meta/headers.hpp new file mode 100644 index 00000000..c539d5e5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/__meta/headers.hpp @@ -0,0 +1,42 @@ + +#pragma once + +#include +#include + +#include "../a_tlgen_helpers_code.hpp" + +namespace tl2 { + namespace meta { + struct tl_object { + virtual bool read(::basictl::tl_istream &s) = 0; + virtual bool write(::basictl::tl_ostream &s) = 0; + + virtual bool read_boxed(::basictl::tl_istream &s) = 0; + virtual bool write_boxed(::basictl::tl_ostream &s) = 0; + + virtual ~tl_object() = default; + }; + + struct tl_function : public tl_object { + virtual bool read_write_result(::basictl::tl_istream &in, ::basictl::tl_ostream &out) = 0; + + virtual ~tl_function() = default; + }; + + struct tl_item { + uint32_t tag{}; + uint32_t annotations{}; + std::string name; + + std::function()> create_object; + std::function()> create_function; + }; + + tl_item get_item_by_name(std::string &&s); + + void set_create_object_by_name(std::string &&s, std::function()> &&factory); + void set_create_function_by_name(std::string &&s, std::function()> &&factory); + + } +} \ No newline at end of file diff --git a/internal/tlcodegen/test/gen/schema_cpp/a_tlgen_helpers_code.hpp b/internal/tlcodegen/test/gen/schema_cpp/a_tlgen_helpers_code.hpp new file mode 100644 index 00000000..1e404f0c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/a_tlgen_helpers_code.hpp @@ -0,0 +1,303 @@ +// Code generated by vktl/cmd/tlgen2; DO NOT EDIT. +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TLGEN2_UNLIKELY(x) (x) // __builtin_expect((x), 0) // could improve performance on your platform +#define TLGEN2_NOINLINE // __attribute__ ((noinline)) // could improve performance on your platform + +namespace basictl { + + + +enum { + TL_MAX_TINY_STRING_LEN = 253, + TL_BIG_STRING_LEN = 0xffffff, + TL_BIG_STRING_MARKER = 0xfe, +}; + +class tl_istream { // TODO - prohibit copy/move +public: + virtual ~tl_istream() = default; + bool nat_read(uint32_t & value) { + return fetch_data(&value, 4); + } + bool nat_read_exact_tag(uint32_t tag) { + uint32_t actual_tag = 0; + if (TLGEN2_UNLIKELY(!nat_read(actual_tag))) { return false; } + if (TLGEN2_UNLIKELY(tag != actual_tag)) { return set_error_expected_tag(); } + return true; + } + bool int_read(int32_t & value) { + return fetch_data(&value, 4); + } + bool long_read(int64_t & value) { + return fetch_data(&value, 8); + } + bool float_read(float & value) { + return fetch_data(&value, 4); + } + bool double_read(double & value) { + return fetch_data(&value, 8); + } + bool bool_read(bool & value, uint32_t f, uint32_t t) { + uint32_t tag = 0; + if (TLGEN2_UNLIKELY(!nat_read(tag))) { return false; } + if (tag == t) { value = true; return true; } + if (TLGEN2_UNLIKELY(tag != f)) { set_error_bool_tag(); } + value = false; + return true; + } + bool string_read(std::string & value) { + if (TLGEN2_UNLIKELY(!ensure_byte())) { return false; } + auto len = size_t(static_cast(*ptr)); + if (TLGEN2_UNLIKELY(len >= TL_BIG_STRING_MARKER)) { + if (TLGEN2_UNLIKELY(len > TL_BIG_STRING_MARKER)) { + return set_error("TODO - huge string"); + } + uint32_t len32 = 0; + if (TLGEN2_UNLIKELY(!nat_read(len32))) { return false; } + len = len32 >> 8U; + value.clear(); + if (TLGEN2_UNLIKELY(!fetch_data_append(value, len))) { return false; } + if (TLGEN2_UNLIKELY(!fetch_pad((-len) & 3))) { return false; } + return true; + } + auto pad = ((-(len+1)) & 3); + auto fullLen = 1 + len + pad; + if (TLGEN2_UNLIKELY(ptr + fullLen > end)) { + ptr += 1; + value.clear(); + if (TLGEN2_UNLIKELY(!fetch_data_append(value, len))) { return false; } + if (TLGEN2_UNLIKELY(!fetch_pad(pad))) { return false; } + return true; + } + // fast path for short strings that fully fit in buffer + uint32_t x = 0; + std::memcpy(&x, ptr + fullLen - 4, 4); + if (TLGEN2_UNLIKELY((x & ~(0xFFFFFFFFU >> (8*pad))) != 0)) { + return set_error_string_padding(); + } + value.assign(ptr + 1, len); + ptr += fullLen; + return true; + } + bool set_error(const char * e) { return false; } // TODO - set error field + bool set_error_eof() { return set_error("EOF"); } + bool set_error_sequence_length() { return set_error("sequence_length"); } + bool set_error_string_padding() { return set_error("string_padding"); } + bool set_error_bool_tag() { return set_error("bool_tag"); } + bool set_error_expected_tag() { return set_error("expected_tag"); } + bool set_error_union_tag() { return set_error("union_tag"); } +protected: + const char * ptr{}; + const char * end{}; + virtual void grow_buffer(size_t size_hint) = 0; // after call buffer must contain at least single byte, otherwise error +private: + bool ensure_byte() { + if (TLGEN2_UNLIKELY(ptr >= end)) { + // assert(ptr <= end) + grow_buffer(1); + // assert(ptr <= end) + if (TLGEN2_UNLIKELY(ptr == end)) { + return set_error_eof(); + } + } + return true; + } + bool fetch_data(void * vdata, size_t size) { + char * data = reinterpret_cast(vdata); + if (TLGEN2_UNLIKELY(ptr + size > end)) { + return fetch_data2(vdata, size); + } + std::memcpy(data, ptr, size); + ptr += size; + return true; + } + bool fetch_data2(void * vdata, size_t size) { + char * data = reinterpret_cast(vdata); + for (;TLGEN2_UNLIKELY(ptr + size > end);) { + // assert(ptr <= end) + std::memcpy(data, ptr, end - ptr); + data += end - ptr; + size -= end - ptr; + ptr = end; + grow_buffer(size); + // assert(ptr <= end) + if (TLGEN2_UNLIKELY(ptr == end)) { + return set_error_eof(); + } + } + std::memcpy(data, ptr, size); + ptr += size; + return true; + } + bool fetch_data_append(std::string & value, size_t size) { + for (;TLGEN2_UNLIKELY(ptr + size > end);) { + // assert(ptr <= end) + value.append(ptr, end - ptr); + size -= end - ptr; + ptr = end; + grow_buffer(size); + // assert(ptr <= end) + if (TLGEN2_UNLIKELY(ptr == end)) { + return set_error_eof(); + } + } + value.append(ptr, size); + ptr += size; + return true; + } + bool fetch_pad(size_t len) { + uint32_t x = 0; + if (TLGEN2_UNLIKELY(!fetch_data(&x, len))) { return false; } + if (TLGEN2_UNLIKELY(x != 0)) { return set_error_string_padding(); } + return true; + } +}; + +class tl_ostream { // TODO - prohibit copy/move +public: + virtual ~tl_ostream() = default; + bool nat_write(uint32_t value) { + return store_data(&value, 4); + } + bool int_write(int32_t value) { + return store_data(&value, 4); + } + bool long_write(int64_t value) { + return store_data(&value, 8); + } + bool float_write(float value) { + return store_data(&value, 4); + } + bool double_write(double value) { + return store_data(&value, 8); + } + bool string_write(const std::string & value) { + auto len = value.size(); + if (TLGEN2_UNLIKELY(len > TL_MAX_TINY_STRING_LEN)) { + if (TLGEN2_UNLIKELY(len > TL_BIG_STRING_LEN)) { + return set_error("TODO - huge string"); + } + uint32_t p = (len << 8U) | TL_BIG_STRING_MARKER; + if (TLGEN2_UNLIKELY(!store_data(&p, 4))) { return false; } + if (TLGEN2_UNLIKELY(!store_data(value.data(), value.size()))) { return false; } + if (TLGEN2_UNLIKELY(!store_pad((-len) & 3))) { return false; } + return true; + } + auto pad = ((-(len+1)) & 3); + auto fullLen = 1 + len + pad; + if (TLGEN2_UNLIKELY(ptr + fullLen > end)) { + auto p = static_cast(len); + if (TLGEN2_UNLIKELY(!store_data(&p,1))) { return false; } + if (TLGEN2_UNLIKELY(!store_data(value.data(), value.size()))) { return false; } + if (TLGEN2_UNLIKELY(!store_pad(pad))) { return false; } + return true; + } + // fast path for short strings that fully fit in buffer + uint32_t x = 0; + std::memcpy(ptr + fullLen - 4, &x, 4); // padding first + *ptr = static_cast(len); + std::memcpy(ptr + 1, value.data(), len); + ptr += fullLen; + return true; + } + bool set_error(const char * e) { return false; } // TODO - set error field + bool set_error_eof() { return set_error("EOF"); } + bool set_error_sequence_length() { return set_error("sequence_length"); } +protected: + char * ptr{}; + char * end{}; + virtual void grow_buffer(size_t size) = 0; // after call buffer must contain at least single bytes, otherwise error +private: + bool store_data(const void * vdata, size_t size) { + const char * data = reinterpret_cast(vdata); + for (;TLGEN2_UNLIKELY(ptr + size > end);) { + // assert(ptr <= end) + std::memcpy(ptr, data, end - ptr); + data += end - ptr; + size -= end - ptr; + ptr = end; + grow_buffer(size); + // assert(ptr <= end) + if (TLGEN2_UNLIKELY(ptr == end)) { + return set_error_eof(); + } + } + std::memcpy(ptr, data, size); + ptr += size; + return true; + } + bool store_pad(size_t size) { + for (;TLGEN2_UNLIKELY(ptr + size > end);) { + // assert(ptr <= end) + std::memset(ptr, 0, end - ptr); + size -= end - ptr; + ptr = end; + grow_buffer(size); + // assert(ptr <= end) + if (TLGEN2_UNLIKELY(ptr == end)) { + return set_error_eof(); + } + } + if (size != 0) { + ptr[0] = 0; + ptr[size-1] = 0; + ptr[size/2] = 0; + ptr += size; + } + return true; + } +}; + +class tl_istream_string : public tl_istream { // TODO - custom copy/move +public: + explicit tl_istream_string(const std::string & buf) { + ptr = buf.data(); + end = ptr + buf.size(); + } +protected: + void grow_buffer(size_t size) override {} +}; + +class tl_ostream_string : public tl_ostream { // TODO - custom copy/move +public: + explicit tl_ostream_string() { + resize(INITIAL_SIZE); + } + std::string & get_buffer() { + resize(ptr - buf.data()); + return buf; + } +protected: + void grow_buffer(size_t size) override { + auto pos = ptr - buf.data(); + resize(buf.size()*3/2 + INITIAL_SIZE + size); // some arbitrary strategy + ptr += pos; + } +private: + enum { INITIAL_SIZE = 1024 }; + std::string buf; + void resize(size_t size) { + buf.resize(size); + ptr = const_cast(buf.data()); // works for all known implementations + end = ptr + buf.size(); + } +}; + + +} // namespace basictl + + +#undef TLGEN2_NOINLINE +#undef TLGEN2_UNLIKELY diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.PatternFull.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.PatternFull.hpp new file mode 100644 index 00000000..dab5f47a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.PatternFull.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/antispam.PatternFull.hpp" + +namespace tl2 { namespace details { + +void AntispamPatternFullReset(::tl2::antispam::PatternFull& item); +bool AntispamPatternFullReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternFull& item); +bool AntispamPatternFullWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFull& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.getPattern.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.getPattern.hpp new file mode 100644 index 00000000..ecbac4f7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.getPattern.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/antispam.getPattern.hpp" +#include "../../types/antispam.PatternFull.hpp" + +namespace tl2 { namespace details { + +void AntispamGetPatternReset(::tl2::antispam::GetPattern& item); +bool AntispamGetPatternRead(::basictl::tl_istream & s, ::tl2::antispam::GetPattern& item); +bool AntispamGetPatternWrite(::basictl::tl_ostream & s, const ::tl2::antispam::GetPattern& item); +bool AntispamGetPatternReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::GetPattern& item); +bool AntispamGetPatternWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::GetPattern& item); + +bool AntispamGetPatternReadResult(::basictl::tl_istream & s, ::tl2::antispam::GetPattern& item, ::tl2::antispam::PatternFull& result); +bool AntispamGetPatternWriteResult(::basictl::tl_ostream & s, ::tl2::antispam::GetPattern& item, ::tl2::antispam::PatternFull& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternFound.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternFound.hpp new file mode 100644 index 00000000..c1e469e9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternFound.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/antispam.patternFound.hpp" + +namespace tl2 { namespace details { + +void AntispamPatternFoundReset(::tl2::antispam::PatternFound& item); +bool AntispamPatternFoundRead(::basictl::tl_istream & s, ::tl2::antispam::PatternFound& item); +bool AntispamPatternFoundWrite(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFound& item); +bool AntispamPatternFoundReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternFound& item); +bool AntispamPatternFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFound& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternNotFound.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternNotFound.hpp new file mode 100644 index 00000000..a1050c7c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/headers/antispam.patternNotFound.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/antispam.patternNotFound.hpp" + +namespace tl2 { namespace details { + +void AntispamPatternNotFoundReset(::tl2::antispam::PatternNotFound& item); +bool AntispamPatternNotFoundRead(::basictl::tl_istream & s, ::tl2::antispam::PatternNotFound& item); +bool AntispamPatternNotFoundWrite(::basictl::tl_ostream & s, const ::tl2::antispam::PatternNotFound& item); +bool AntispamPatternNotFoundReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternNotFound& item); +bool AntispamPatternNotFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternNotFound& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/namespace_details.cpp new file mode 100644 index 00000000..9b943cba --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/details/namespace_details.cpp @@ -0,0 +1,212 @@ +#include "headers/antispam.PatternFull.hpp" +#include "headers/antispam.patternNotFound.hpp" +#include "headers/antispam.patternFound.hpp" +#include "headers/antispam.getPattern.hpp" + + +bool tl2::antispam::GetPattern::read(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamGetPatternRead(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::GetPattern::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamGetPatternWrite(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::GetPattern::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamGetPatternReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::GetPattern::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamGetPatternWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::AntispamGetPatternReset(::tl2::antispam::GetPattern& item) { + item.id = 0; +} + +bool tl2::details::AntispamGetPatternRead(::basictl::tl_istream & s, ::tl2::antispam::GetPattern& item) { + if (!s.int_read(item.id)) { return false; } + return true; +} + +bool tl2::details::AntispamGetPatternWrite(::basictl::tl_ostream & s, const ::tl2::antispam::GetPattern& item) { + if (!s.int_write(item.id)) { return false;} + return true; +} + +bool tl2::details::AntispamGetPatternReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::GetPattern& item) { + if (!s.nat_read_exact_tag(0x3de14136)) { return false; } + return tl2::details::AntispamGetPatternRead(s, item); +} + +bool tl2::details::AntispamGetPatternWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::GetPattern& item) { + if (!s.nat_write(0x3de14136)) { return false; } + return tl2::details::AntispamGetPatternWrite(s, item); +} + +bool tl2::details::AntispamGetPatternReadResult(::basictl::tl_istream & s, tl2::antispam::GetPattern& item, ::tl2::antispam::PatternFull& result) { + if (!::tl2::details::AntispamPatternFullReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::AntispamGetPatternWriteResult(::basictl::tl_ostream & s, tl2::antispam::GetPattern& item, ::tl2::antispam::PatternFull& result) { + if (!::tl2::details::AntispamPatternFullWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::antispam::GetPattern::read_result(::basictl::tl_istream & s, ::tl2::antispam::PatternFull & result) { + return tl2::details::AntispamGetPatternReadResult(s, *this, result); +} +bool tl2::antispam::GetPattern::write_result(::basictl::tl_ostream & s, ::tl2::antispam::PatternFull & result) { + return tl2::details::AntispamGetPatternWriteResult(s, *this, result); +} + +bool tl2::antispam::PatternFound::read(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamPatternFoundRead(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternFound::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamPatternFoundWrite(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternFound::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamPatternFoundReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternFound::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamPatternFoundWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::AntispamPatternFoundReset(::tl2::antispam::PatternFound& item) { + item.ip = 0; + item.uahash = 0; + item.flags = 0; + item.type = 0; + item.text.clear(); +} + +bool tl2::details::AntispamPatternFoundRead(::basictl::tl_istream & s, ::tl2::antispam::PatternFound& item) { + if (!s.int_read(item.ip)) { return false; } + if (!s.int_read(item.uahash)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!s.string_read(item.text)) { return false; } + return true; +} + +bool tl2::details::AntispamPatternFoundWrite(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFound& item) { + if (!s.int_write(item.ip)) { return false;} + if (!s.int_write(item.uahash)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!s.string_write(item.text)) { return false;} + return true; +} + +bool tl2::details::AntispamPatternFoundReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternFound& item) { + if (!s.nat_read_exact_tag(0xa7688492)) { return false; } + return tl2::details::AntispamPatternFoundRead(s, item); +} + +bool tl2::details::AntispamPatternFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFound& item) { + if (!s.nat_write(0xa7688492)) { return false; } + return tl2::details::AntispamPatternFoundWrite(s, item); +} + +static const std::string_view AntispamPatternFull_tbl_tl_name[]{"antispam.patternFound", "antispam.patternNotFound"}; +static const uint32_t AntispamPatternFull_tbl_tl_tag[]{0xa7688492, 0x2c22e225}; + +bool tl2::antispam::PatternFull::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamPatternFullReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::antispam::PatternFull::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamPatternFullWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::antispam::PatternFull::tl_name() const { + return AntispamPatternFull_tbl_tl_name[value.index()]; +} +uint32_t tl2::antispam::PatternFull::tl_tag() const { + return AntispamPatternFull_tbl_tl_tag[value.index()]; +} + + +void tl2::details::AntispamPatternFullReset(::tl2::antispam::PatternFull& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::AntispamPatternFullReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternFull& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0xa7688492: + if (item.value.index() != 0) { item.value.emplace<0>(); } + if (!::tl2::details::AntispamPatternFoundRead(s, std::get<0>(item.value))) { return false; } + break; + case 0x2c22e225: + if (item.value.index() != 1) { item.value.emplace<1>(); } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::AntispamPatternFullWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternFull& item) { + s.nat_write(AntispamPatternFull_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 0: + if (!::tl2::details::AntispamPatternFoundWrite(s, std::get<0>(item.value))) { return false; } + break; + } + return true; +} + +bool tl2::antispam::PatternNotFound::read(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamPatternNotFoundRead(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternNotFound::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamPatternNotFoundWrite(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternNotFound::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::AntispamPatternNotFoundReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::antispam::PatternNotFound::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::AntispamPatternNotFoundWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::AntispamPatternNotFoundReset(::tl2::antispam::PatternNotFound& item) { +} + +bool tl2::details::AntispamPatternNotFoundRead(::basictl::tl_istream & s, ::tl2::antispam::PatternNotFound& item) { + return true; +} + +bool tl2::details::AntispamPatternNotFoundWrite(::basictl::tl_ostream & s, const ::tl2::antispam::PatternNotFound& item) { + return true; +} + +bool tl2::details::AntispamPatternNotFoundReadBoxed(::basictl::tl_istream & s, ::tl2::antispam::PatternNotFound& item) { + if (!s.nat_read_exact_tag(0x2c22e225)) { return false; } + return tl2::details::AntispamPatternNotFoundRead(s, item); +} + +bool tl2::details::AntispamPatternNotFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::antispam::PatternNotFound& item) { + if (!s.nat_write(0x2c22e225)) { return false; } + return tl2::details::AntispamPatternNotFoundWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/functions/antispam.getPattern.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/functions/antispam.getPattern.hpp new file mode 100644 index 00000000..c6ac49c8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/functions/antispam.getPattern.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/antispam.PatternFull.hpp" + + +namespace tl2 { namespace antispam { +struct GetPattern { + int32_t id = 0; + + std::string_view tl_name() const { return "antispam.getPattern"; } + uint32_t tl_tag() const { return 0x3de14136; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::antispam::PatternFull & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::antispam::PatternFull & result); +}; + +}} // namespace tl2::antispam + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.PatternFull.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.PatternFull.hpp new file mode 100644 index 00000000..af15d990 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.PatternFull.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "antispam.patternNotFound.hpp" +#include "antispam.patternFound.hpp" + + +namespace tl2 { namespace antispam { +struct PatternFull { + std::variant<::tl2::antispam::PatternFound, ::tl2::antispam::PatternNotFound> value; + + bool is_patternFound() const { return value.index() == 0; } + bool is_patternNotFound() const { return value.index() == 1; } + + void set_patternNotFound() { value.emplace<1>(); } + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::antispam + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternFound.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternFound.hpp new file mode 100644 index 00000000..1b48fbcf --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternFound.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace antispam { +struct PatternFound { + int32_t ip = 0; + int32_t uahash = 0; + int32_t flags = 0; + int32_t type = 0; + std::string text; + + std::string_view tl_name() const { return "antispam.patternFound"; } + uint32_t tl_tag() const { return 0xa7688492; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::antispam + diff --git a/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternNotFound.hpp b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternNotFound.hpp new file mode 100644 index 00000000..2395c576 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/antispam/types/antispam.patternNotFound.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace antispam { +struct PatternNotFound { + + std::string_view tl_name() const { return "antispam.patternNotFound"; } + uint32_t tl_tag() const { return 0x2c22e225; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::antispam + diff --git a/internal/tlcodegen/test/gen/schema_cpp/main.cpp b/internal/tlcodegen/test/gen/schema_cpp/main.cpp new file mode 100644 index 00000000..c3aeba4b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/main.cpp @@ -0,0 +1 @@ +int main() { return 0; } \ No newline at end of file diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.foo.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.foo.hpp new file mode 100644 index 00000000..c930bc62 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.foo.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/pkg2.foo.hpp" + +namespace tl2 { namespace details { + +void Pkg2FooReset(::tl2::pkg2::Foo& item); +bool Pkg2FooRead(::basictl::tl_istream & s, ::tl2::pkg2::Foo& item); +bool Pkg2FooWrite(::basictl::tl_ostream & s, const ::tl2::pkg2::Foo& item); +bool Pkg2FooReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::Foo& item); +bool Pkg2FooWriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::Foo& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t1.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t1.hpp new file mode 100644 index 00000000..0d01d5c2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t1.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/pkg2.t1.hpp" + +namespace tl2 { namespace details { + +void Pkg2T1Reset(::tl2::pkg2::T1& item); +bool Pkg2T1Read(::basictl::tl_istream & s, ::tl2::pkg2::T1& item); +bool Pkg2T1Write(::basictl::tl_ostream & s, const ::tl2::pkg2::T1& item); +bool Pkg2T1ReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::T1& item); +bool Pkg2T1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::T1& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t2.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t2.hpp new file mode 100644 index 00000000..3e114588 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/headers/pkg2.t2.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/pkg2.t2.hpp" + +namespace tl2 { namespace details { + +void Pkg2T2Reset(::tl2::pkg2::T2& item); +bool Pkg2T2Read(::basictl::tl_istream & s, ::tl2::pkg2::T2& item); +bool Pkg2T2Write(::basictl::tl_ostream & s, const ::tl2::pkg2::T2& item); +bool Pkg2T2ReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::T2& item); +bool Pkg2T2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::T2& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/namespace_details.cpp new file mode 100644 index 00000000..eb441f90 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/details/namespace_details.cpp @@ -0,0 +1,116 @@ +#include "headers/pkg2.t2.hpp" +#include "headers/pkg2.t1.hpp" +#include "headers/pkg2.foo.hpp" + + +bool tl2::pkg2::Foo::read(::basictl::tl_istream & s) { + if (!::tl2::details::Pkg2FooRead(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::Foo::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Pkg2FooWrite(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::Foo::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Pkg2FooReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::Foo::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Pkg2FooWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Pkg2FooReset(::tl2::pkg2::Foo& item) { + item.x = 0; +} + +bool tl2::details::Pkg2FooRead(::basictl::tl_istream & s, ::tl2::pkg2::Foo& item) { + if (!s.int_read(item.x)) { return false; } + return true; +} + +bool tl2::details::Pkg2FooWrite(::basictl::tl_ostream & s, const ::tl2::pkg2::Foo& item) { + if (!s.int_write(item.x)) { return false;} + return true; +} + +bool tl2::details::Pkg2FooReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::Foo& item) { + if (!s.nat_read_exact_tag(0xe144703d)) { return false; } + return tl2::details::Pkg2FooRead(s, item); +} + +bool tl2::details::Pkg2FooWriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::Foo& item) { + if (!s.nat_write(0xe144703d)) { return false; } + return tl2::details::Pkg2FooWrite(s, item); +} + +bool tl2::pkg2::T1::read(::basictl::tl_istream & s) { + if (!::tl2::details::Pkg2T1Read(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::T1::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Pkg2T1Write(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::T1::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Pkg2T1ReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::pkg2::T1::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Pkg2T1WriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Pkg2T1Reset(::tl2::pkg2::T1& item) { + ::tl2::details::Pkg2FooReset(item.x); +} + +bool tl2::details::Pkg2T1Read(::basictl::tl_istream & s, ::tl2::pkg2::T1& item) { + if (!::tl2::details::Pkg2FooReadBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::Pkg2T1Write(::basictl::tl_ostream & s, const ::tl2::pkg2::T1& item) { + if (!::tl2::details::Pkg2FooWriteBoxed(s, item.x)) { return false; } + return true; +} + +bool tl2::details::Pkg2T1ReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::T1& item) { + if (!s.nat_read_exact_tag(0x638206ec)) { return false; } + return tl2::details::Pkg2T1Read(s, item); +} + +bool tl2::details::Pkg2T1WriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::T1& item) { + if (!s.nat_write(0x638206ec)) { return false; } + return tl2::details::Pkg2T1Write(s, item); +} + +void tl2::details::Pkg2T2Reset(::tl2::pkg2::T2& item) { + ::tl2::details::Pkg2FooReset(item); +} + +bool tl2::details::Pkg2T2Read(::basictl::tl_istream & s, ::tl2::pkg2::T2& item) { + if (!::tl2::details::Pkg2FooRead(s, item)) { return false; } + return true; +} + +bool tl2::details::Pkg2T2Write(::basictl::tl_ostream & s, const ::tl2::pkg2::T2& item) { + if (!::tl2::details::Pkg2FooWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::Pkg2T2ReadBoxed(::basictl::tl_istream & s, ::tl2::pkg2::T2& item) { + if (!s.nat_read_exact_tag(0xd6e5af9c)) { return false; } + return tl2::details::Pkg2T2Read(s, item); +} + +bool tl2::details::Pkg2T2WriteBoxed(::basictl::tl_ostream & s, const ::tl2::pkg2::T2& item) { + if (!s.nat_write(0xd6e5af9c)) { return false; } + return tl2::details::Pkg2T2Write(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.foo.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.foo.hpp new file mode 100644 index 00000000..d9f7e375 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.foo.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace pkg2 { +struct Foo { + int32_t x = 0; + + std::string_view tl_name() const { return "pkg2.foo"; } + uint32_t tl_tag() const { return 0xe144703d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::pkg2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t1.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t1.hpp new file mode 100644 index 00000000..f7af188e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t1.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "pkg2.foo.hpp" + + +namespace tl2 { namespace pkg2 { +struct T1 { + ::tl2::pkg2::Foo x{}; + + std::string_view tl_name() const { return "pkg2.t1"; } + uint32_t tl_tag() const { return 0x638206ec; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::pkg2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t2.hpp b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t2.hpp new file mode 100644 index 00000000..ff1c527b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/pkg2/types/pkg2.t2.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "pkg2.foo.hpp" + + +namespace tl2 { namespace pkg2 { +using T2 = ::tl2::pkg2::Foo; +}} // namespace tl2::pkg2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.Value.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.Value.hpp new file mode 100644 index 00000000..3ce2ef65 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.Value.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void BuiltinTuple3Service1ValueReset(std::array<::tl2::service1::Value, 3>& item); +bool BuiltinTuple3Service1ValueRead(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item); +bool BuiltinTuple3Service1ValueWrite(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorService1ValueReset(std::vector<::tl2::service1::Value>& item); +bool BuiltinVectorService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item); +bool BuiltinVectorService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service1ValueReset(::tl2::service1::Value& item); +bool Service1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Value& item); +bool Service1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Value& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool Service1ValueBoxedMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::service1::Value>& item); +bool Service1ValueBoxedMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::service1::Value>& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.add.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.add.hpp new file mode 100644 index 00000000..71ad2b2b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.add.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.add.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1AddReset(::tl2::service1::Add& item); +bool Service1AddRead(::basictl::tl_istream & s, ::tl2::service1::Add& item); +bool Service1AddWrite(::basictl::tl_ostream & s, const ::tl2::service1::Add& item); +bool Service1AddReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Add& item); +bool Service1AddWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Add& item); + +bool Service1AddReadResult(::basictl::tl_istream & s, ::tl2::service1::Add& item, bool& result); +bool Service1AddWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Add& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrGet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrGet.hpp new file mode 100644 index 00000000..a3a66f19 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrGet.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.addOrGet.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1AddOrGetReset(::tl2::service1::AddOrGet& item); +bool Service1AddOrGetRead(::basictl::tl_istream & s, ::tl2::service1::AddOrGet& item); +bool Service1AddOrGetWrite(::basictl::tl_ostream & s, const ::tl2::service1::AddOrGet& item); +bool Service1AddOrGetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::AddOrGet& item); +bool Service1AddOrGetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::AddOrGet& item); + +bool Service1AddOrGetReadResult(::basictl::tl_istream & s, ::tl2::service1::AddOrGet& item, ::tl2::service1::Value& result); +bool Service1AddOrGetWriteResult(::basictl::tl_ostream & s, ::tl2::service1::AddOrGet& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrIncr.hpp new file mode 100644 index 00000000..32b21fe9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.addOrIncr.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.addOrIncr.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1AddOrIncrReset(::tl2::service1::AddOrIncr& item); +bool Service1AddOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::AddOrIncr& item); +bool Service1AddOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::AddOrIncr& item); +bool Service1AddOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::AddOrIncr& item); +bool Service1AddOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::AddOrIncr& item); + +bool Service1AddOrIncrReadResult(::basictl::tl_istream & s, ::tl2::service1::AddOrIncr& item, ::tl2::service1::Value& result); +bool Service1AddOrIncrWriteResult(::basictl::tl_ostream & s, ::tl2::service1::AddOrIncr& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.append.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.append.hpp new file mode 100644 index 00000000..71b20156 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.append.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.append.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1AppendReset(::tl2::service1::Append& item); +bool Service1AppendRead(::basictl::tl_istream & s, ::tl2::service1::Append& item); +bool Service1AppendWrite(::basictl::tl_ostream & s, const ::tl2::service1::Append& item); +bool Service1AppendReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Append& item); +bool Service1AppendWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Append& item); + +bool Service1AppendReadResult(::basictl::tl_istream & s, ::tl2::service1::Append& item, bool& result); +bool Service1AppendWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Append& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.cas.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.cas.hpp new file mode 100644 index 00000000..c26f3456 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.cas.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.cas.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1CasReset(::tl2::service1::Cas& item); +bool Service1CasRead(::basictl::tl_istream & s, ::tl2::service1::Cas& item); +bool Service1CasWrite(::basictl::tl_ostream & s, const ::tl2::service1::Cas& item); +bool Service1CasReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Cas& item); +bool Service1CasWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Cas& item); + +bool Service1CasReadResult(::basictl::tl_istream & s, ::tl2::service1::Cas& item, bool& result); +bool Service1CasWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Cas& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.decr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.decr.hpp new file mode 100644 index 00000000..637d9a0f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.decr.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.decr.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1DecrReset(::tl2::service1::Decr& item); +bool Service1DecrRead(::basictl::tl_istream & s, ::tl2::service1::Decr& item); +bool Service1DecrWrite(::basictl::tl_ostream & s, const ::tl2::service1::Decr& item); +bool Service1DecrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Decr& item); +bool Service1DecrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Decr& item); + +bool Service1DecrReadResult(::basictl::tl_istream & s, ::tl2::service1::Decr& item, ::tl2::service1::Value& result); +bool Service1DecrWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Decr& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.delete.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.delete.hpp new file mode 100644 index 00000000..1d1210e8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.delete.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.delete.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1DeleteReset(::tl2::service1::Delete& item); +bool Service1DeleteRead(::basictl::tl_istream & s, ::tl2::service1::Delete& item); +bool Service1DeleteWrite(::basictl::tl_ostream & s, const ::tl2::service1::Delete& item); +bool Service1DeleteReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Delete& item); +bool Service1DeleteWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Delete& item); + +bool Service1DeleteReadResult(::basictl::tl_istream & s, ::tl2::service1::Delete& item, bool& result); +bool Service1DeleteWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Delete& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableExpiration.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableExpiration.hpp new file mode 100644 index 00000000..1d42cf78 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableExpiration.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.disableExpiration.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1DisableExpirationReset(::tl2::service1::DisableExpiration& item); +bool Service1DisableExpirationRead(::basictl::tl_istream & s, ::tl2::service1::DisableExpiration& item); +bool Service1DisableExpirationWrite(::basictl::tl_ostream & s, const ::tl2::service1::DisableExpiration& item); +bool Service1DisableExpirationReadBoxed(::basictl::tl_istream & s, ::tl2::service1::DisableExpiration& item); +bool Service1DisableExpirationWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::DisableExpiration& item); + +bool Service1DisableExpirationReadResult(::basictl::tl_istream & s, ::tl2::service1::DisableExpiration& item, bool& result); +bool Service1DisableExpirationWriteResult(::basictl::tl_ostream & s, ::tl2::service1::DisableExpiration& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableKeysStat.hpp new file mode 100644 index 00000000..52db30aa --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.disableKeysStat.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.disableKeysStat.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1DisableKeysStatReset(::tl2::service1::DisableKeysStat& item); +bool Service1DisableKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::DisableKeysStat& item); +bool Service1DisableKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::DisableKeysStat& item); +bool Service1DisableKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::DisableKeysStat& item); +bool Service1DisableKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::DisableKeysStat& item); + +bool Service1DisableKeysStatReadResult(::basictl::tl_istream & s, ::tl2::service1::DisableKeysStat& item, bool& result); +bool Service1DisableKeysStatWriteResult(::basictl::tl_ostream & s, ::tl2::service1::DisableKeysStat& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableExpiration.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableExpiration.hpp new file mode 100644 index 00000000..b4748777 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableExpiration.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.enableExpiration.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1EnableExpirationReset(::tl2::service1::EnableExpiration& item); +bool Service1EnableExpirationRead(::basictl::tl_istream & s, ::tl2::service1::EnableExpiration& item); +bool Service1EnableExpirationWrite(::basictl::tl_ostream & s, const ::tl2::service1::EnableExpiration& item); +bool Service1EnableExpirationReadBoxed(::basictl::tl_istream & s, ::tl2::service1::EnableExpiration& item); +bool Service1EnableExpirationWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::EnableExpiration& item); + +bool Service1EnableExpirationReadResult(::basictl::tl_istream & s, ::tl2::service1::EnableExpiration& item, bool& result); +bool Service1EnableExpirationWriteResult(::basictl::tl_ostream & s, ::tl2::service1::EnableExpiration& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableKeysStat.hpp new file mode 100644 index 00000000..3bd79a92 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.enableKeysStat.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.enableKeysStat.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1EnableKeysStatReset(::tl2::service1::EnableKeysStat& item); +bool Service1EnableKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::EnableKeysStat& item); +bool Service1EnableKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::EnableKeysStat& item); +bool Service1EnableKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::EnableKeysStat& item); +bool Service1EnableKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::EnableKeysStat& item); + +bool Service1EnableKeysStatReadResult(::basictl::tl_istream & s, ::tl2::service1::EnableKeysStat& item, bool& result); +bool Service1EnableKeysStatWriteResult(::basictl::tl_ostream & s, ::tl2::service1::EnableKeysStat& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.exists.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.exists.hpp new file mode 100644 index 00000000..1963127f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.exists.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.exists.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1ExistsReset(::tl2::service1::Exists& item); +bool Service1ExistsRead(::basictl::tl_istream & s, ::tl2::service1::Exists& item); +bool Service1ExistsWrite(::basictl::tl_ostream & s, const ::tl2::service1::Exists& item); +bool Service1ExistsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Exists& item); +bool Service1ExistsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Exists& item); + +bool Service1ExistsReadResult(::basictl::tl_istream & s, ::tl2::service1::Exists& item, bool& result); +bool Service1ExistsWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Exists& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.get.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.get.hpp new file mode 100644 index 00000000..689974e9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.get.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.get.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1GetReset(::tl2::service1::Get& item); +bool Service1GetRead(::basictl::tl_istream & s, ::tl2::service1::Get& item); +bool Service1GetWrite(::basictl::tl_ostream & s, const ::tl2::service1::Get& item); +bool Service1GetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Get& item); +bool Service1GetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Get& item); + +bool Service1GetReadResult(::basictl::tl_istream & s, ::tl2::service1::Get& item, ::tl2::service1::Value& result); +bool Service1GetWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Get& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getExpireTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getExpireTime.hpp new file mode 100644 index 00000000..10a4a2d0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getExpireTime.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getExpireTime.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void Service1GetExpireTimeReset(::tl2::service1::GetExpireTime& item); +bool Service1GetExpireTimeRead(::basictl::tl_istream & s, ::tl2::service1::GetExpireTime& item); +bool Service1GetExpireTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetExpireTime& item); +bool Service1GetExpireTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetExpireTime& item); +bool Service1GetExpireTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetExpireTime& item); + +bool Service1GetExpireTimeReadResult(::basictl::tl_istream & s, ::tl2::service1::GetExpireTime& item, std::optional& result); +bool Service1GetExpireTimeWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetExpireTime& item, std::optional& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStat.hpp new file mode 100644 index 00000000..6bbb6e1e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStat.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getKeysStat.hpp" +#include "../../types/service1.keysStat.hpp" + +namespace tl2 { namespace details { + +void Service1GetKeysStatReset(::tl2::service1::GetKeysStat& item); +bool Service1GetKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::GetKeysStat& item); +bool Service1GetKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStat& item); +bool Service1GetKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetKeysStat& item); +bool Service1GetKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStat& item); + +bool Service1GetKeysStatReadResult(::basictl::tl_istream & s, ::tl2::service1::GetKeysStat& item, std::optional<::tl2::service1::KeysStat>& result); +bool Service1GetKeysStatWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetKeysStat& item, std::optional<::tl2::service1::KeysStat>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStatPeriods.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStatPeriods.hpp new file mode 100644 index 00000000..2ceb117e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getKeysStatPeriods.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getKeysStatPeriods.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void Service1GetKeysStatPeriodsReset(::tl2::service1::GetKeysStatPeriods& item); +bool Service1GetKeysStatPeriodsRead(::basictl::tl_istream & s, ::tl2::service1::GetKeysStatPeriods& item); +bool Service1GetKeysStatPeriodsWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStatPeriods& item); +bool Service1GetKeysStatPeriodsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetKeysStatPeriods& item); +bool Service1GetKeysStatPeriodsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStatPeriods& item); + +bool Service1GetKeysStatPeriodsReadResult(::basictl::tl_istream & s, ::tl2::service1::GetKeysStatPeriods& item, std::vector& result); +bool Service1GetKeysStatPeriodsWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetKeysStatPeriods& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcard.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcard.hpp new file mode 100644 index 00000000..0f56a2f5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcard.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getWildcard.hpp" +#include "../../../__common/types/map.hpp" + +namespace tl2 { namespace details { + +void Service1GetWildcardReset(::tl2::service1::GetWildcard& item); +bool Service1GetWildcardRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcard& item); +bool Service1GetWildcardWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcard& item); +bool Service1GetWildcardReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcard& item); +bool Service1GetWildcardWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcard& item); + +bool Service1GetWildcardReadResult(::basictl::tl_istream & s, ::tl2::service1::GetWildcard& item, std::vector<::tl2::Map>& result); +bool Service1GetWildcardWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetWildcard& item, std::vector<::tl2::Map>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardDict.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardDict.hpp new file mode 100644 index 00000000..d66a9533 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardDict.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getWildcardDict.hpp" +#include "../../../__common/types/dictionary.hpp" + +namespace tl2 { namespace details { + +void Service1GetWildcardDictReset(::tl2::service1::GetWildcardDict& item); +bool Service1GetWildcardDictRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardDict& item); +bool Service1GetWildcardDictWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardDict& item); +bool Service1GetWildcardDictReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardDict& item); +bool Service1GetWildcardDictWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardDict& item); + +bool Service1GetWildcardDictReadResult(::basictl::tl_istream & s, ::tl2::service1::GetWildcardDict& item, ::tl2::Dictionary& result); +bool Service1GetWildcardDictWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetWildcardDict& item, ::tl2::Dictionary& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardList.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardList.hpp new file mode 100644 index 00000000..bf7e10ae --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardList.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getWildcardList.hpp" +#include "../../../__common/types/string.hpp" + +namespace tl2 { namespace details { + +void Service1GetWildcardListReset(::tl2::service1::GetWildcardList& item); +bool Service1GetWildcardListRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardList& item); +bool Service1GetWildcardListWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardList& item); +bool Service1GetWildcardListReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardList& item); +bool Service1GetWildcardListWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardList& item); + +bool Service1GetWildcardListReadResult(::basictl::tl_istream & s, ::tl2::service1::GetWildcardList& item, std::vector& result); +bool Service1GetWildcardListWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetWildcardList& item, std::vector& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardWithFlags.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardWithFlags.hpp new file mode 100644 index 00000000..96d3dfad --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.getWildcardWithFlags.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.getWildcardWithFlags.hpp" +#include "../../types/service1.Value.hpp" +#include "../../../__common/types/dictionary.hpp" + +namespace tl2 { namespace details { + +void Service1GetWildcardWithFlagsReset(::tl2::service1::GetWildcardWithFlags& item); +bool Service1GetWildcardWithFlagsRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardWithFlags& item); +bool Service1GetWildcardWithFlagsWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardWithFlags& item); +bool Service1GetWildcardWithFlagsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardWithFlags& item); +bool Service1GetWildcardWithFlagsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardWithFlags& item); + +bool Service1GetWildcardWithFlagsReadResult(::basictl::tl_istream & s, ::tl2::service1::GetWildcardWithFlags& item, ::tl2::Dictionary<::tl2::service1::Value>& result); +bool Service1GetWildcardWithFlagsWriteResult(::basictl::tl_ostream & s, ::tl2::service1::GetWildcardWithFlags& item, ::tl2::Dictionary<::tl2::service1::Value>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.incr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.incr.hpp new file mode 100644 index 00000000..b6a3162b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.incr.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.incr.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1IncrReset(::tl2::service1::Incr& item); +bool Service1IncrRead(::basictl::tl_istream & s, ::tl2::service1::Incr& item); +bool Service1IncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::Incr& item); +bool Service1IncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Incr& item); +bool Service1IncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Incr& item); + +bool Service1IncrReadResult(::basictl::tl_istream & s, ::tl2::service1::Incr& item, ::tl2::service1::Value& result); +bool Service1IncrWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Incr& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.keysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.keysStat.hpp new file mode 100644 index 00000000..7e493ab9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.keysStat.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.keysStat.hpp" + +namespace tl2 { namespace details { + +void Service1KeysStatReset(::tl2::service1::KeysStat& item); +bool Service1KeysStatRead(::basictl::tl_istream & s, ::tl2::service1::KeysStat& item); +bool Service1KeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::KeysStat& item); +bool Service1KeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::KeysStat& item); +bool Service1KeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::KeysStat& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool Service1KeysStatMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::service1::KeysStat>& item); +bool Service1KeysStatMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::service1::KeysStat>& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalue.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalue.hpp new file mode 100644 index 00000000..470bcc04 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalue.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.longvalue.hpp" + +namespace tl2 { namespace details { + +void Service1LongvalueReset(::tl2::service1::Longvalue& item); +bool Service1LongvalueRead(::basictl::tl_istream & s, ::tl2::service1::Longvalue& item); +bool Service1LongvalueWrite(::basictl::tl_ostream & s, const ::tl2::service1::Longvalue& item); +bool Service1LongvalueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Longvalue& item); +bool Service1LongvalueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Longvalue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalueWithTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalueWithTime.hpp new file mode 100644 index 00000000..18f6d3ba --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.longvalueWithTime.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.longvalueWithTime.hpp" + +namespace tl2 { namespace details { + +void Service1LongvalueWithTimeReset(::tl2::service1::LongvalueWithTime& item); +bool Service1LongvalueWithTimeRead(::basictl::tl_istream & s, ::tl2::service1::LongvalueWithTime& item); +bool Service1LongvalueWithTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::LongvalueWithTime& item); +bool Service1LongvalueWithTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::LongvalueWithTime& item); +bool Service1LongvalueWithTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::LongvalueWithTime& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.not_found.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.not_found.hpp new file mode 100644 index 00000000..7ea9b3b1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.not_found.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.not_found.hpp" + +namespace tl2 { namespace details { + +void Service1NotFoundReset(::tl2::service1::Not_found& item); +bool Service1NotFoundRead(::basictl::tl_istream & s, ::tl2::service1::Not_found& item); +bool Service1NotFoundWrite(::basictl::tl_ostream & s, const ::tl2::service1::Not_found& item); +bool Service1NotFoundReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Not_found& item); +bool Service1NotFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Not_found& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replace.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replace.hpp new file mode 100644 index 00000000..046e85e2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replace.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.replace.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1ReplaceReset(::tl2::service1::Replace& item); +bool Service1ReplaceRead(::basictl::tl_istream & s, ::tl2::service1::Replace& item); +bool Service1ReplaceWrite(::basictl::tl_ostream & s, const ::tl2::service1::Replace& item); +bool Service1ReplaceReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Replace& item); +bool Service1ReplaceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Replace& item); + +bool Service1ReplaceReadResult(::basictl::tl_istream & s, ::tl2::service1::Replace& item, bool& result); +bool Service1ReplaceWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Replace& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replaceOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replaceOrIncr.hpp new file mode 100644 index 00000000..454207d8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.replaceOrIncr.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.replaceOrIncr.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1ReplaceOrIncrReset(::tl2::service1::ReplaceOrIncr& item); +bool Service1ReplaceOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::ReplaceOrIncr& item); +bool Service1ReplaceOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::ReplaceOrIncr& item); +bool Service1ReplaceOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::ReplaceOrIncr& item); +bool Service1ReplaceOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::ReplaceOrIncr& item); + +bool Service1ReplaceOrIncrReadResult(::basictl::tl_istream & s, ::tl2::service1::ReplaceOrIncr& item, ::tl2::service1::Value& result); +bool Service1ReplaceOrIncrWriteResult(::basictl::tl_ostream & s, ::tl2::service1::ReplaceOrIncr& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.set.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.set.hpp new file mode 100644 index 00000000..781e20b8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.set.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.set.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1SetReset(::tl2::service1::Set& item); +bool Service1SetRead(::basictl::tl_istream & s, ::tl2::service1::Set& item); +bool Service1SetWrite(::basictl::tl_ostream & s, const ::tl2::service1::Set& item); +bool Service1SetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Set& item); +bool Service1SetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Set& item); + +bool Service1SetReadResult(::basictl::tl_istream & s, ::tl2::service1::Set& item, bool& result); +bool Service1SetWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Set& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.setOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.setOrIncr.hpp new file mode 100644 index 00000000..059f8f33 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.setOrIncr.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.setOrIncr.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void Service1SetOrIncrReset(::tl2::service1::SetOrIncr& item); +bool Service1SetOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::SetOrIncr& item); +bool Service1SetOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::SetOrIncr& item); +bool Service1SetOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::SetOrIncr& item); +bool Service1SetOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::SetOrIncr& item); + +bool Service1SetOrIncrReadResult(::basictl::tl_istream & s, ::tl2::service1::SetOrIncr& item, ::tl2::service1::Value& result); +bool Service1SetOrIncrWriteResult(::basictl::tl_ostream & s, ::tl2::service1::SetOrIncr& item, ::tl2::service1::Value& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalue.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalue.hpp new file mode 100644 index 00000000..ea14fdef --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalue.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.strvalue.hpp" + +namespace tl2 { namespace details { + +void Service1StrvalueReset(::tl2::service1::Strvalue& item); +bool Service1StrvalueRead(::basictl::tl_istream & s, ::tl2::service1::Strvalue& item); +bool Service1StrvalueWrite(::basictl::tl_ostream & s, const ::tl2::service1::Strvalue& item); +bool Service1StrvalueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Strvalue& item); +bool Service1StrvalueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Strvalue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalueWithTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalueWithTime.hpp new file mode 100644 index 00000000..7f79d1fa --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.strvalueWithTime.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service1.strvalueWithTime.hpp" + +namespace tl2 { namespace details { + +void Service1StrvalueWithTimeReset(::tl2::service1::StrvalueWithTime& item); +bool Service1StrvalueWithTimeRead(::basictl::tl_istream & s, ::tl2::service1::StrvalueWithTime& item); +bool Service1StrvalueWithTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::StrvalueWithTime& item); +bool Service1StrvalueWithTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::StrvalueWithTime& item); +bool Service1StrvalueWithTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::StrvalueWithTime& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.touch.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.touch.hpp new file mode 100644 index 00000000..759d0b91 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1.touch.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service1.touch.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service1TouchReset(::tl2::service1::Touch& item); +bool Service1TouchRead(::basictl::tl_istream & s, ::tl2::service1::Touch& item); +bool Service1TouchWrite(::basictl::tl_ostream & s, const ::tl2::service1::Touch& item); +bool Service1TouchReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Touch& item); +bool Service1TouchWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Touch& item); + +bool Service1TouchReadResult(::basictl::tl_istream & s, ::tl2::service1::Touch& item, bool& result); +bool Service1TouchWriteResult(::basictl::tl_ostream & s, ::tl2::service1::Touch& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionary.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionary.hpp new file mode 100644 index 00000000..96fa42d3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionary.hpp @@ -0,0 +1,36 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/dictionary.hpp" +#include "../../types/service1.Value.hpp" + +namespace tl2 { namespace details { + +void DictionaryDictionaryIntReset(::tl2::Dictionary<::tl2::Dictionary>& item); +bool DictionaryDictionaryIntRead(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::Dictionary>& item); +bool DictionaryDictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::Dictionary>& item); +bool DictionaryDictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::Dictionary>& item); +bool DictionaryDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::Dictionary>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryService1ValueReset(::tl2::Dictionary<::tl2::service1::Value>& item); +bool DictionaryService1ValueRead(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value>& item); +bool DictionaryService1ValueWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::service1::Value>& item); +bool DictionaryService1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value>& item); +bool DictionaryService1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::service1::Value>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryStringReset(::tl2::Dictionary& item); +bool DictionaryStringRead(::basictl::tl_istream & s, ::tl2::Dictionary& item); +bool DictionaryStringWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary& item); +bool DictionaryStringReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary& item); +bool DictionaryStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionaryField.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionaryField.hpp new file mode 100644 index 00000000..3a09940d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_dictionaryField.hpp @@ -0,0 +1,61 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/dictionaryField.hpp" +#include "../../types/service1.Value.hpp" +#include "../../../__common/types/dictionary.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorDictionaryFieldDictionaryIntReset(std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool BuiltinVectorDictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool BuiltinVectorDictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorDictionaryFieldService1ValueReset(std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool BuiltinVectorDictionaryFieldService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool BuiltinVectorDictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorDictionaryFieldStringReset(std::vector<::tl2::DictionaryField>& item); +bool BuiltinVectorDictionaryFieldStringRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool BuiltinVectorDictionaryFieldStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryFieldDictionaryIntReset(::tl2::DictionaryField<::tl2::Dictionary>& item); +bool DictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::Dictionary>& item); +bool DictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::Dictionary>& item); +bool DictionaryFieldDictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::Dictionary>& item); +bool DictionaryFieldDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::Dictionary>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryFieldService1ValueReset(::tl2::DictionaryField<::tl2::service1::Value>& item); +bool DictionaryFieldService1ValueRead(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::service1::Value>& item); +bool DictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::service1::Value>& item); +bool DictionaryFieldService1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::service1::Value>& item); +bool DictionaryFieldService1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::service1::Value>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void DictionaryFieldStringReset(::tl2::DictionaryField& item); +bool DictionaryFieldStringRead(::basictl::tl_istream & s, ::tl2::DictionaryField& item); +bool DictionaryFieldStringWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item); +bool DictionaryFieldStringReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField& item); +bool DictionaryFieldStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_vector.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_vector.hpp new file mode 100644 index 00000000..05afe3c5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/headers/service1_vector.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../types/service1.Value.hpp" +#include "../../../__common/types/dictionary.hpp" +#include "../../../__common/types/dictionaryField.hpp" + +namespace tl2 { namespace details { + +void VectorDictionaryFieldDictionaryIntReset(std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool VectorDictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool VectorDictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool VectorDictionaryFieldDictionaryIntReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); +bool VectorDictionaryFieldDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorDictionaryFieldService1ValueReset(std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool VectorDictionaryFieldService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool VectorDictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool VectorDictionaryFieldService1ValueReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); +bool VectorDictionaryFieldService1ValueWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorDictionaryFieldStringReset(std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldStringRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldStringReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item); +bool VectorDictionaryFieldStringWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service1/details/namespace_details.cpp new file mode 100644 index 00000000..be5740ca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/details/namespace_details.cpp @@ -0,0 +1,2432 @@ +#include "headers/service1_vector.hpp" +#include "headers/service1.Value.hpp" +#include "headers/service1.touch.hpp" +#include "headers/service1.setOrIncr.hpp" +#include "headers/service1.set.hpp" +#include "headers/service1.replaceOrIncr.hpp" +#include "headers/service1.replace.hpp" +#include "headers/service1.keysStat.hpp" +#include "headers/service1.incr.hpp" +#include "headers/service1.getWildcardWithFlags.hpp" +#include "headers/service1.getWildcardList.hpp" +#include "headers/service1.getWildcardDict.hpp" +#include "headers/service1.getWildcard.hpp" +#include "headers/service1.getKeysStatPeriods.hpp" +#include "headers/service1.getKeysStat.hpp" +#include "headers/service1.getExpireTime.hpp" +#include "headers/service1.get.hpp" +#include "headers/service1.exists.hpp" +#include "headers/service1.enableKeysStat.hpp" +#include "headers/service1.enableExpiration.hpp" +#include "headers/service1.disableKeysStat.hpp" +#include "headers/service1.disableExpiration.hpp" +#include "headers/service1.delete.hpp" +#include "headers/service1.decr.hpp" +#include "headers/service1.cas.hpp" +#include "headers/service1.append.hpp" +#include "headers/service1.addOrIncr.hpp" +#include "headers/service1.addOrGet.hpp" +#include "headers/service1.add.hpp" +#include "../../__common/details/headers/int.hpp" +#include "headers/service1.strvalueWithTime.hpp" +#include "headers/service1.strvalue.hpp" +#include "headers/service1.not_found.hpp" +#include "headers/service1.longvalueWithTime.hpp" +#include "headers/service1.longvalue.hpp" +#include "headers/service1_dictionary.hpp" +#include "../../__common/details/headers/dictionary.hpp" +#include "headers/service1_dictionaryField.hpp" +#include "../../__independent_types/details/headers/string.hpp" +#include "../../__independent_types/details/headers/map.hpp" +#include "../../__common/details/headers/Bool.hpp" + + +void tl2::details::BuiltinTuple3Service1ValueReset(std::array<::tl2::service1::Value, 3>& item) { + for(auto && el : item) { + ::tl2::details::Service1ValueReset(el); + } +} + +bool tl2::details::BuiltinTuple3Service1ValueRead(::basictl::tl_istream & s, std::array<::tl2::service1::Value, 3>& item) { + for(auto && el : item) { + if (!::tl2::details::Service1ValueReadBoxed(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTuple3Service1ValueWrite(::basictl::tl_ostream & s, const std::array<::tl2::service1::Value, 3>& item) { + for(const auto & el : item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorDictionaryFieldDictionaryIntReset(std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorDictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::DictionaryFieldDictionaryIntRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorDictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::DictionaryFieldDictionaryIntWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorDictionaryFieldService1ValueReset(std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorDictionaryFieldService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::DictionaryFieldService1ValueRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorDictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::DictionaryFieldService1ValueWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorDictionaryFieldStringReset(std::vector<::tl2::DictionaryField>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorDictionaryFieldStringRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::DictionaryFieldStringRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorDictionaryFieldStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::DictionaryFieldStringWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService1ValueReset(std::vector<::tl2::service1::Value>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::service1::Value>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service1ValueReadBoxed(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service1::Value>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, el)) { return false; } + } + return true; +} + +void tl2::details::DictionaryDictionaryIntReset(::tl2::Dictionary<::tl2::Dictionary>& item) { + item.clear(); +} + +bool tl2::details::DictionaryDictionaryIntRead(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::Dictionary>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldDictionaryIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryDictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::Dictionary>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldDictionaryIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryDictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::Dictionary>& item) { + if (!s.nat_read_exact_tag(0x1f4c618f)) { return false; } + return tl2::details::DictionaryDictionaryIntRead(s, item); +} + +bool tl2::details::DictionaryDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::Dictionary>& item) { + if (!s.nat_write(0x1f4c618f)) { return false; } + return tl2::details::DictionaryDictionaryIntWrite(s, item); +} + +void tl2::details::DictionaryFieldDictionaryIntReset(::tl2::DictionaryField<::tl2::Dictionary>& item) { + item.key.clear(); + ::tl2::details::DictionaryIntReset(item.value); +} + +bool tl2::details::DictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::Dictionary>& item) { + if (!s.string_read(item.key)) { return false; } + if (!::tl2::details::DictionaryIntRead(s, item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::Dictionary>& item) { + if (!s.string_write(item.key)) { return false;} + if (!::tl2::details::DictionaryIntWrite(s, item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldDictionaryIntReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::Dictionary>& item) { + if (!s.nat_read_exact_tag(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldDictionaryIntRead(s, item); +} + +bool tl2::details::DictionaryFieldDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::Dictionary>& item) { + if (!s.nat_write(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldDictionaryIntWrite(s, item); +} + +void tl2::details::DictionaryFieldService1ValueReset(::tl2::DictionaryField<::tl2::service1::Value>& item) { + item.key.clear(); + ::tl2::details::Service1ValueReset(item.value); +} + +bool tl2::details::DictionaryFieldService1ValueRead(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::service1::Value>& item) { + if (!s.string_read(item.key)) { return false; } + if (!::tl2::details::Service1ValueReadBoxed(s, item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::service1::Value>& item) { + if (!s.string_write(item.key)) { return false;} + if (!::tl2::details::Service1ValueWriteBoxed(s, item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldService1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField<::tl2::service1::Value>& item) { + if (!s.nat_read_exact_tag(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldService1ValueRead(s, item); +} + +bool tl2::details::DictionaryFieldService1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField<::tl2::service1::Value>& item) { + if (!s.nat_write(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldService1ValueWrite(s, item); +} + +void tl2::details::DictionaryFieldStringReset(::tl2::DictionaryField& item) { + item.key.clear(); + item.value.clear(); +} + +bool tl2::details::DictionaryFieldStringRead(::basictl::tl_istream & s, ::tl2::DictionaryField& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::DictionaryFieldStringWrite(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::DictionaryFieldStringReadBoxed(::basictl::tl_istream & s, ::tl2::DictionaryField& item) { + if (!s.nat_read_exact_tag(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldStringRead(s, item); +} + +bool tl2::details::DictionaryFieldStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::DictionaryField& item) { + if (!s.nat_write(0x239c1b62)) { return false; } + return tl2::details::DictionaryFieldStringWrite(s, item); +} + +void tl2::details::DictionaryService1ValueReset(::tl2::Dictionary<::tl2::service1::Value>& item) { + item.clear(); +} + +bool tl2::details::DictionaryService1ValueRead(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldService1ValueRead(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryService1ValueWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::service1::Value>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldService1ValueWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryService1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value>& item) { + if (!s.nat_read_exact_tag(0x1f4c618f)) { return false; } + return tl2::details::DictionaryService1ValueRead(s, item); +} + +bool tl2::details::DictionaryService1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary<::tl2::service1::Value>& item) { + if (!s.nat_write(0x1f4c618f)) { return false; } + return tl2::details::DictionaryService1ValueWrite(s, item); +} + +void tl2::details::DictionaryStringReset(::tl2::Dictionary& item) { + item.clear(); +} + +bool tl2::details::DictionaryStringRead(::basictl::tl_istream & s, ::tl2::Dictionary& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldStringRead(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryStringWrite(::basictl::tl_ostream & s, const ::tl2::Dictionary& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldStringWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::DictionaryStringReadBoxed(::basictl::tl_istream & s, ::tl2::Dictionary& item) { + if (!s.nat_read_exact_tag(0x1f4c618f)) { return false; } + return tl2::details::DictionaryStringRead(s, item); +} + +bool tl2::details::DictionaryStringWriteBoxed(::basictl::tl_ostream & s, const ::tl2::Dictionary& item) { + if (!s.nat_write(0x1f4c618f)) { return false; } + return tl2::details::DictionaryStringWrite(s, item); +} + +bool tl2::service1::Add::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Add::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Add::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Add::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1AddReset(::tl2::service1::Add& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value.clear(); +} + +bool tl2::details::Service1AddRead(::basictl::tl_istream & s, ::tl2::service1::Add& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1AddWrite(::basictl::tl_ostream & s, const ::tl2::service1::Add& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1AddReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Add& item) { + if (!s.nat_read_exact_tag(0x481df8be)) { return false; } + return tl2::details::Service1AddRead(s, item); +} + +bool tl2::details::Service1AddWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Add& item) { + if (!s.nat_write(0x481df8be)) { return false; } + return tl2::details::Service1AddWrite(s, item); +} + +bool tl2::details::Service1AddReadResult(::basictl::tl_istream & s, tl2::service1::Add& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1AddWriteResult(::basictl::tl_ostream & s, tl2::service1::Add& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Add::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1AddReadResult(s, *this, result); +} +bool tl2::service1::Add::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1AddWriteResult(s, *this, result); +} + +bool tl2::service1::AddOrGet::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddOrGetRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrGet::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddOrGetWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrGet::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddOrGetReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrGet::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddOrGetWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1AddOrGetReset(::tl2::service1::AddOrGet& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value.clear(); +} + +bool tl2::details::Service1AddOrGetRead(::basictl::tl_istream & s, ::tl2::service1::AddOrGet& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1AddOrGetWrite(::basictl::tl_ostream & s, const ::tl2::service1::AddOrGet& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1AddOrGetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::AddOrGet& item) { + if (!s.nat_read_exact_tag(0x6a42faad)) { return false; } + return tl2::details::Service1AddOrGetRead(s, item); +} + +bool tl2::details::Service1AddOrGetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::AddOrGet& item) { + if (!s.nat_write(0x6a42faad)) { return false; } + return tl2::details::Service1AddOrGetWrite(s, item); +} + +bool tl2::details::Service1AddOrGetReadResult(::basictl::tl_istream & s, tl2::service1::AddOrGet& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1AddOrGetWriteResult(::basictl::tl_ostream & s, tl2::service1::AddOrGet& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::AddOrGet::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1AddOrGetReadResult(s, *this, result); +} +bool tl2::service1::AddOrGet::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1AddOrGetWriteResult(s, *this, result); +} + +bool tl2::service1::AddOrIncr::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddOrIncrRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrIncr::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddOrIncrWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrIncr::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AddOrIncrReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::AddOrIncr::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AddOrIncrWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1AddOrIncrReset(::tl2::service1::AddOrIncr& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value = 0; +} + +bool tl2::details::Service1AddOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::AddOrIncr& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.long_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1AddOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::AddOrIncr& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.long_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1AddOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::AddOrIncr& item) { + if (!s.nat_read_exact_tag(0x90c4b402)) { return false; } + return tl2::details::Service1AddOrIncrRead(s, item); +} + +bool tl2::details::Service1AddOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::AddOrIncr& item) { + if (!s.nat_write(0x90c4b402)) { return false; } + return tl2::details::Service1AddOrIncrWrite(s, item); +} + +bool tl2::details::Service1AddOrIncrReadResult(::basictl::tl_istream & s, tl2::service1::AddOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1AddOrIncrWriteResult(::basictl::tl_ostream & s, tl2::service1::AddOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::AddOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1AddOrIncrReadResult(s, *this, result); +} +bool tl2::service1::AddOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1AddOrIncrWriteResult(s, *this, result); +} + +bool tl2::service1::Append::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AppendRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Append::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AppendWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Append::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1AppendReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Append::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1AppendWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1AppendReset(::tl2::service1::Append& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.suffix.clear(); +} + +bool tl2::details::Service1AppendRead(::basictl::tl_istream & s, ::tl2::service1::Append& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.suffix)) { return false; } + return true; +} + +bool tl2::details::Service1AppendWrite(::basictl::tl_ostream & s, const ::tl2::service1::Append& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.suffix)) { return false;} + return true; +} + +bool tl2::details::Service1AppendReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Append& item) { + if (!s.nat_read_exact_tag(0x04dec671)) { return false; } + return tl2::details::Service1AppendRead(s, item); +} + +bool tl2::details::Service1AppendWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Append& item) { + if (!s.nat_write(0x04dec671)) { return false; } + return tl2::details::Service1AppendWrite(s, item); +} + +bool tl2::details::Service1AppendReadResult(::basictl::tl_istream & s, tl2::service1::Append& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1AppendWriteResult(::basictl::tl_ostream & s, tl2::service1::Append& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Append::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1AppendReadResult(s, *this, result); +} +bool tl2::service1::Append::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1AppendWriteResult(s, *this, result); +} + +bool tl2::service1::Cas::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1CasRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Cas::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1CasWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Cas::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1CasReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Cas::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1CasWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1CasReset(::tl2::service1::Cas& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.casToken.clear(); + item.newValue.clear(); +} + +bool tl2::details::Service1CasRead(::basictl::tl_istream & s, ::tl2::service1::Cas& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.casToken)) { return false; } + if (!s.string_read(item.newValue)) { return false; } + return true; +} + +bool tl2::details::Service1CasWrite(::basictl::tl_ostream & s, const ::tl2::service1::Cas& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.casToken)) { return false;} + if (!s.string_write(item.newValue)) { return false;} + return true; +} + +bool tl2::details::Service1CasReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Cas& item) { + if (!s.nat_read_exact_tag(0x51851964)) { return false; } + return tl2::details::Service1CasRead(s, item); +} + +bool tl2::details::Service1CasWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Cas& item) { + if (!s.nat_write(0x51851964)) { return false; } + return tl2::details::Service1CasWrite(s, item); +} + +bool tl2::details::Service1CasReadResult(::basictl::tl_istream & s, tl2::service1::Cas& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1CasWriteResult(::basictl::tl_ostream & s, tl2::service1::Cas& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Cas::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1CasReadResult(s, *this, result); +} +bool tl2::service1::Cas::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1CasWriteResult(s, *this, result); +} + +bool tl2::service1::Decr::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DecrRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Decr::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DecrWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Decr::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DecrReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Decr::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DecrWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1DecrReset(::tl2::service1::Decr& item) { + item.key.clear(); + item.value = 0; +} + +bool tl2::details::Service1DecrRead(::basictl::tl_istream & s, ::tl2::service1::Decr& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.long_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1DecrWrite(::basictl::tl_ostream & s, const ::tl2::service1::Decr& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.long_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1DecrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Decr& item) { + if (!s.nat_read_exact_tag(0xeb179ce7)) { return false; } + return tl2::details::Service1DecrRead(s, item); +} + +bool tl2::details::Service1DecrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Decr& item) { + if (!s.nat_write(0xeb179ce7)) { return false; } + return tl2::details::Service1DecrWrite(s, item); +} + +bool tl2::details::Service1DecrReadResult(::basictl::tl_istream & s, tl2::service1::Decr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1DecrWriteResult(::basictl::tl_ostream & s, tl2::service1::Decr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Decr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1DecrReadResult(s, *this, result); +} +bool tl2::service1::Decr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1DecrWriteResult(s, *this, result); +} + +bool tl2::service1::Delete::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DeleteRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Delete::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DeleteWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Delete::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DeleteReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Delete::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DeleteWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1DeleteReset(::tl2::service1::Delete& item) { + item.key.clear(); +} + +bool tl2::details::Service1DeleteRead(::basictl::tl_istream & s, ::tl2::service1::Delete& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::Service1DeleteWrite(::basictl::tl_ostream & s, const ::tl2::service1::Delete& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::Service1DeleteReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Delete& item) { + if (!s.nat_read_exact_tag(0x83277767)) { return false; } + return tl2::details::Service1DeleteRead(s, item); +} + +bool tl2::details::Service1DeleteWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Delete& item) { + if (!s.nat_write(0x83277767)) { return false; } + return tl2::details::Service1DeleteWrite(s, item); +} + +bool tl2::details::Service1DeleteReadResult(::basictl::tl_istream & s, tl2::service1::Delete& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1DeleteWriteResult(::basictl::tl_ostream & s, tl2::service1::Delete& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Delete::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1DeleteReadResult(s, *this, result); +} +bool tl2::service1::Delete::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1DeleteWriteResult(s, *this, result); +} + +bool tl2::service1::DisableExpiration::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DisableExpirationRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableExpiration::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DisableExpirationWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableExpiration::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DisableExpirationReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableExpiration::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DisableExpirationWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1DisableExpirationReset(::tl2::service1::DisableExpiration& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1DisableExpirationRead(::basictl::tl_istream & s, ::tl2::service1::DisableExpiration& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1DisableExpirationWrite(::basictl::tl_ostream & s, const ::tl2::service1::DisableExpiration& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1DisableExpirationReadBoxed(::basictl::tl_istream & s, ::tl2::service1::DisableExpiration& item) { + if (!s.nat_read_exact_tag(0xf1c39c2d)) { return false; } + return tl2::details::Service1DisableExpirationRead(s, item); +} + +bool tl2::details::Service1DisableExpirationWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::DisableExpiration& item) { + if (!s.nat_write(0xf1c39c2d)) { return false; } + return tl2::details::Service1DisableExpirationWrite(s, item); +} + +bool tl2::details::Service1DisableExpirationReadResult(::basictl::tl_istream & s, tl2::service1::DisableExpiration& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1DisableExpirationWriteResult(::basictl::tl_ostream & s, tl2::service1::DisableExpiration& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::DisableExpiration::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1DisableExpirationReadResult(s, *this, result); +} +bool tl2::service1::DisableExpiration::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1DisableExpirationWriteResult(s, *this, result); +} + +bool tl2::service1::DisableKeysStat::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DisableKeysStatRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableKeysStat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DisableKeysStatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableKeysStat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1DisableKeysStatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::DisableKeysStat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1DisableKeysStatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1DisableKeysStatReset(::tl2::service1::DisableKeysStat& item) { + item.period = 0; +} + +bool tl2::details::Service1DisableKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::DisableKeysStat& item) { + if (!s.int_read(item.period)) { return false; } + return true; +} + +bool tl2::details::Service1DisableKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::DisableKeysStat& item) { + if (!s.int_write(item.period)) { return false;} + return true; +} + +bool tl2::details::Service1DisableKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::DisableKeysStat& item) { + if (!s.nat_read_exact_tag(0x79d6160f)) { return false; } + return tl2::details::Service1DisableKeysStatRead(s, item); +} + +bool tl2::details::Service1DisableKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::DisableKeysStat& item) { + if (!s.nat_write(0x79d6160f)) { return false; } + return tl2::details::Service1DisableKeysStatWrite(s, item); +} + +bool tl2::details::Service1DisableKeysStatReadResult(::basictl::tl_istream & s, tl2::service1::DisableKeysStat& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1DisableKeysStatWriteResult(::basictl::tl_ostream & s, tl2::service1::DisableKeysStat& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::DisableKeysStat::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1DisableKeysStatReadResult(s, *this, result); +} +bool tl2::service1::DisableKeysStat::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1DisableKeysStatWriteResult(s, *this, result); +} + +bool tl2::service1::EnableExpiration::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1EnableExpirationRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableExpiration::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1EnableExpirationWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableExpiration::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1EnableExpirationReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableExpiration::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1EnableExpirationWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1EnableExpirationReset(::tl2::service1::EnableExpiration& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1EnableExpirationRead(::basictl::tl_istream & s, ::tl2::service1::EnableExpiration& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1EnableExpirationWrite(::basictl::tl_ostream & s, const ::tl2::service1::EnableExpiration& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1EnableExpirationReadBoxed(::basictl::tl_istream & s, ::tl2::service1::EnableExpiration& item) { + if (!s.nat_read_exact_tag(0x2b51ad67)) { return false; } + return tl2::details::Service1EnableExpirationRead(s, item); +} + +bool tl2::details::Service1EnableExpirationWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::EnableExpiration& item) { + if (!s.nat_write(0x2b51ad67)) { return false; } + return tl2::details::Service1EnableExpirationWrite(s, item); +} + +bool tl2::details::Service1EnableExpirationReadResult(::basictl::tl_istream & s, tl2::service1::EnableExpiration& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1EnableExpirationWriteResult(::basictl::tl_ostream & s, tl2::service1::EnableExpiration& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::EnableExpiration::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1EnableExpirationReadResult(s, *this, result); +} +bool tl2::service1::EnableExpiration::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1EnableExpirationWriteResult(s, *this, result); +} + +bool tl2::service1::EnableKeysStat::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1EnableKeysStatRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableKeysStat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1EnableKeysStatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableKeysStat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1EnableKeysStatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::EnableKeysStat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1EnableKeysStatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1EnableKeysStatReset(::tl2::service1::EnableKeysStat& item) { + item.period = 0; +} + +bool tl2::details::Service1EnableKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::EnableKeysStat& item) { + if (!s.int_read(item.period)) { return false; } + return true; +} + +bool tl2::details::Service1EnableKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::EnableKeysStat& item) { + if (!s.int_write(item.period)) { return false;} + return true; +} + +bool tl2::details::Service1EnableKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::EnableKeysStat& item) { + if (!s.nat_read_exact_tag(0x29a7090e)) { return false; } + return tl2::details::Service1EnableKeysStatRead(s, item); +} + +bool tl2::details::Service1EnableKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::EnableKeysStat& item) { + if (!s.nat_write(0x29a7090e)) { return false; } + return tl2::details::Service1EnableKeysStatWrite(s, item); +} + +bool tl2::details::Service1EnableKeysStatReadResult(::basictl::tl_istream & s, tl2::service1::EnableKeysStat& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1EnableKeysStatWriteResult(::basictl::tl_ostream & s, tl2::service1::EnableKeysStat& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::EnableKeysStat::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1EnableKeysStatReadResult(s, *this, result); +} +bool tl2::service1::EnableKeysStat::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1EnableKeysStatWriteResult(s, *this, result); +} + +bool tl2::service1::Exists::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ExistsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Exists::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ExistsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Exists::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ExistsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Exists::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ExistsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1ExistsReset(::tl2::service1::Exists& item) { + item.key.clear(); +} + +bool tl2::details::Service1ExistsRead(::basictl::tl_istream & s, ::tl2::service1::Exists& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::Service1ExistsWrite(::basictl::tl_ostream & s, const ::tl2::service1::Exists& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::Service1ExistsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Exists& item) { + if (!s.nat_read_exact_tag(0xe0284c9e)) { return false; } + return tl2::details::Service1ExistsRead(s, item); +} + +bool tl2::details::Service1ExistsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Exists& item) { + if (!s.nat_write(0xe0284c9e)) { return false; } + return tl2::details::Service1ExistsWrite(s, item); +} + +bool tl2::details::Service1ExistsReadResult(::basictl::tl_istream & s, tl2::service1::Exists& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1ExistsWriteResult(::basictl::tl_ostream & s, tl2::service1::Exists& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Exists::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1ExistsReadResult(s, *this, result); +} +bool tl2::service1::Exists::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1ExistsWriteResult(s, *this, result); +} + +bool tl2::service1::Get::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Get::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Get::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Get::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetReset(::tl2::service1::Get& item) { + item.key.clear(); +} + +bool tl2::details::Service1GetRead(::basictl::tl_istream & s, ::tl2::service1::Get& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::Service1GetWrite(::basictl::tl_ostream & s, const ::tl2::service1::Get& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::Service1GetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Get& item) { + if (!s.nat_read_exact_tag(0x29099b19)) { return false; } + return tl2::details::Service1GetRead(s, item); +} + +bool tl2::details::Service1GetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Get& item) { + if (!s.nat_write(0x29099b19)) { return false; } + return tl2::details::Service1GetWrite(s, item); +} + +bool tl2::details::Service1GetReadResult(::basictl::tl_istream & s, tl2::service1::Get& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetWriteResult(::basictl::tl_ostream & s, tl2::service1::Get& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Get::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1GetReadResult(s, *this, result); +} +bool tl2::service1::Get::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1GetWriteResult(s, *this, result); +} + +bool tl2::service1::GetExpireTime::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetExpireTimeRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetExpireTime::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetExpireTimeWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetExpireTime::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetExpireTimeReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetExpireTime::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetExpireTimeWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetExpireTimeReset(::tl2::service1::GetExpireTime& item) { + item.key.clear(); +} + +bool tl2::details::Service1GetExpireTimeRead(::basictl::tl_istream & s, ::tl2::service1::GetExpireTime& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::Service1GetExpireTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetExpireTime& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::Service1GetExpireTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetExpireTime& item) { + if (!s.nat_read_exact_tag(0x5a731070)) { return false; } + return tl2::details::Service1GetExpireTimeRead(s, item); +} + +bool tl2::details::Service1GetExpireTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetExpireTime& item) { + if (!s.nat_write(0x5a731070)) { return false; } + return tl2::details::Service1GetExpireTimeWrite(s, item); +} + +bool tl2::details::Service1GetExpireTimeReadResult(::basictl::tl_istream & s, tl2::service1::GetExpireTime& item, std::optional& result) { + if (!::tl2::details::IntMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetExpireTimeWriteResult(::basictl::tl_ostream & s, tl2::service1::GetExpireTime& item, std::optional& result) { + if (!::tl2::details::IntMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetExpireTime::read_result(::basictl::tl_istream & s, std::optional & result) { + return tl2::details::Service1GetExpireTimeReadResult(s, *this, result); +} +bool tl2::service1::GetExpireTime::write_result(::basictl::tl_ostream & s, std::optional & result) { + return tl2::details::Service1GetExpireTimeWriteResult(s, *this, result); +} + +bool tl2::service1::GetKeysStat::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetKeysStatRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetKeysStatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetKeysStatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetKeysStatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetKeysStatReset(::tl2::service1::GetKeysStat& item) { + item.period = 0; +} + +bool tl2::details::Service1GetKeysStatRead(::basictl::tl_istream & s, ::tl2::service1::GetKeysStat& item) { + if (!s.int_read(item.period)) { return false; } + return true; +} + +bool tl2::details::Service1GetKeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStat& item) { + if (!s.int_write(item.period)) { return false;} + return true; +} + +bool tl2::details::Service1GetKeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetKeysStat& item) { + if (!s.nat_read_exact_tag(0x06cecd58)) { return false; } + return tl2::details::Service1GetKeysStatRead(s, item); +} + +bool tl2::details::Service1GetKeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStat& item) { + if (!s.nat_write(0x06cecd58)) { return false; } + return tl2::details::Service1GetKeysStatWrite(s, item); +} + +bool tl2::details::Service1GetKeysStatReadResult(::basictl::tl_istream & s, tl2::service1::GetKeysStat& item, std::optional<::tl2::service1::KeysStat>& result) { + if (!::tl2::details::Service1KeysStatMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetKeysStatWriteResult(::basictl::tl_ostream & s, tl2::service1::GetKeysStat& item, std::optional<::tl2::service1::KeysStat>& result) { + if (!::tl2::details::Service1KeysStatMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStat::read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::KeysStat> & result) { + return tl2::details::Service1GetKeysStatReadResult(s, *this, result); +} +bool tl2::service1::GetKeysStat::write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::KeysStat> & result) { + return tl2::details::Service1GetKeysStatWriteResult(s, *this, result); +} + +bool tl2::service1::GetKeysStatPeriods::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetKeysStatPeriodsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStatPeriods::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetKeysStatPeriodsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStatPeriods::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetKeysStatPeriodsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStatPeriods::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetKeysStatPeriodsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetKeysStatPeriodsReset(::tl2::service1::GetKeysStatPeriods& item) { +} + +bool tl2::details::Service1GetKeysStatPeriodsRead(::basictl::tl_istream & s, ::tl2::service1::GetKeysStatPeriods& item) { + return true; +} + +bool tl2::details::Service1GetKeysStatPeriodsWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStatPeriods& item) { + return true; +} + +bool tl2::details::Service1GetKeysStatPeriodsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetKeysStatPeriods& item) { + if (!s.nat_read_exact_tag(0x8cdf39e3)) { return false; } + return tl2::details::Service1GetKeysStatPeriodsRead(s, item); +} + +bool tl2::details::Service1GetKeysStatPeriodsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetKeysStatPeriods& item) { + if (!s.nat_write(0x8cdf39e3)) { return false; } + return tl2::details::Service1GetKeysStatPeriodsWrite(s, item); +} + +bool tl2::details::Service1GetKeysStatPeriodsReadResult(::basictl::tl_istream & s, tl2::service1::GetKeysStatPeriods& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorIntRead(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetKeysStatPeriodsWriteResult(::basictl::tl_ostream & s, tl2::service1::GetKeysStatPeriods& item, std::vector& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetKeysStatPeriods::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::Service1GetKeysStatPeriodsReadResult(s, *this, result); +} +bool tl2::service1::GetKeysStatPeriods::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::Service1GetKeysStatPeriodsWriteResult(s, *this, result); +} + +bool tl2::service1::GetWildcard::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcard::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcard::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcard::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetWildcardReset(::tl2::service1::GetWildcard& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1GetWildcardRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcard& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1GetWildcardWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcard& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1GetWildcardReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcard& item) { + if (!s.nat_read_exact_tag(0x2f2abf13)) { return false; } + return tl2::details::Service1GetWildcardRead(s, item); +} + +bool tl2::details::Service1GetWildcardWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcard& item) { + if (!s.nat_write(0x2f2abf13)) { return false; } + return tl2::details::Service1GetWildcardWrite(s, item); +} + +bool tl2::details::Service1GetWildcardReadResult(::basictl::tl_istream & s, tl2::service1::GetWildcard& item, std::vector<::tl2::Map>& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorMapStringStringRead(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetWildcardWriteResult(::basictl::tl_ostream & s, tl2::service1::GetWildcard& item, std::vector<::tl2::Map>& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorMapStringStringWrite(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetWildcard::read_result(::basictl::tl_istream & s, std::vector<::tl2::Map> & result) { + return tl2::details::Service1GetWildcardReadResult(s, *this, result); +} +bool tl2::service1::GetWildcard::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Map> & result) { + return tl2::details::Service1GetWildcardWriteResult(s, *this, result); +} + +bool tl2::service1::GetWildcardDict::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardDictRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardDict::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardDictWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardDict::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardDictReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardDict::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardDictWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetWildcardDictReset(::tl2::service1::GetWildcardDict& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1GetWildcardDictRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardDict& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1GetWildcardDictWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardDict& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1GetWildcardDictReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardDict& item) { + if (!s.nat_read_exact_tag(0x72bbc81b)) { return false; } + return tl2::details::Service1GetWildcardDictRead(s, item); +} + +bool tl2::details::Service1GetWildcardDictWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardDict& item) { + if (!s.nat_write(0x72bbc81b)) { return false; } + return tl2::details::Service1GetWildcardDictWrite(s, item); +} + +bool tl2::details::Service1GetWildcardDictReadResult(::basictl::tl_istream & s, tl2::service1::GetWildcardDict& item, ::tl2::Dictionary& result) { + if (!::tl2::details::DictionaryStringReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetWildcardDictWriteResult(::basictl::tl_ostream & s, tl2::service1::GetWildcardDict& item, ::tl2::Dictionary& result) { + if (!::tl2::details::DictionaryStringWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardDict::read_result(::basictl::tl_istream & s, ::tl2::Dictionary & result) { + return tl2::details::Service1GetWildcardDictReadResult(s, *this, result); +} +bool tl2::service1::GetWildcardDict::write_result(::basictl::tl_ostream & s, ::tl2::Dictionary & result) { + return tl2::details::Service1GetWildcardDictWriteResult(s, *this, result); +} + +bool tl2::service1::GetWildcardList::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardListRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardList::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardListWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardList::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardListReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardList::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardListWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetWildcardListReset(::tl2::service1::GetWildcardList& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1GetWildcardListRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardList& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1GetWildcardListWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardList& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1GetWildcardListReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardList& item) { + if (!s.nat_read_exact_tag(0x56b6ead4)) { return false; } + return tl2::details::Service1GetWildcardListRead(s, item); +} + +bool tl2::details::Service1GetWildcardListWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardList& item) { + if (!s.nat_write(0x56b6ead4)) { return false; } + return tl2::details::Service1GetWildcardListWrite(s, item); +} + +bool tl2::details::Service1GetWildcardListReadResult(::basictl::tl_istream & s, tl2::service1::GetWildcardList& item, std::vector& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorStringRead(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetWildcardListWriteResult(::basictl::tl_ostream & s, tl2::service1::GetWildcardList& item, std::vector& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorStringWrite(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardList::read_result(::basictl::tl_istream & s, std::vector & result) { + return tl2::details::Service1GetWildcardListReadResult(s, *this, result); +} +bool tl2::service1::GetWildcardList::write_result(::basictl::tl_ostream & s, std::vector & result) { + return tl2::details::Service1GetWildcardListWriteResult(s, *this, result); +} + +bool tl2::service1::GetWildcardWithFlags::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardWithFlagsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardWithFlags::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardWithFlagsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardWithFlags::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1GetWildcardWithFlagsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardWithFlags::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1GetWildcardWithFlagsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1GetWildcardWithFlagsReset(::tl2::service1::GetWildcardWithFlags& item) { + item.prefix.clear(); +} + +bool tl2::details::Service1GetWildcardWithFlagsRead(::basictl::tl_istream & s, ::tl2::service1::GetWildcardWithFlags& item) { + if (!s.string_read(item.prefix)) { return false; } + return true; +} + +bool tl2::details::Service1GetWildcardWithFlagsWrite(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardWithFlags& item) { + if (!s.string_write(item.prefix)) { return false;} + return true; +} + +bool tl2::details::Service1GetWildcardWithFlagsReadBoxed(::basictl::tl_istream & s, ::tl2::service1::GetWildcardWithFlags& item) { + if (!s.nat_read_exact_tag(0x5f6a1f78)) { return false; } + return tl2::details::Service1GetWildcardWithFlagsRead(s, item); +} + +bool tl2::details::Service1GetWildcardWithFlagsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::GetWildcardWithFlags& item) { + if (!s.nat_write(0x5f6a1f78)) { return false; } + return tl2::details::Service1GetWildcardWithFlagsWrite(s, item); +} + +bool tl2::details::Service1GetWildcardWithFlagsReadResult(::basictl::tl_istream & s, tl2::service1::GetWildcardWithFlags& item, ::tl2::Dictionary<::tl2::service1::Value>& result) { + if (!::tl2::details::DictionaryService1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1GetWildcardWithFlagsWriteResult(::basictl::tl_ostream & s, tl2::service1::GetWildcardWithFlags& item, ::tl2::Dictionary<::tl2::service1::Value>& result) { + if (!::tl2::details::DictionaryService1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::GetWildcardWithFlags::read_result(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value> & result) { + return tl2::details::Service1GetWildcardWithFlagsReadResult(s, *this, result); +} +bool tl2::service1::GetWildcardWithFlags::write_result(::basictl::tl_ostream & s, ::tl2::Dictionary<::tl2::service1::Value> & result) { + return tl2::details::Service1GetWildcardWithFlagsWriteResult(s, *this, result); +} + +bool tl2::service1::Incr::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1IncrRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Incr::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1IncrWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Incr::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1IncrReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Incr::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1IncrWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1IncrReset(::tl2::service1::Incr& item) { + item.key.clear(); + item.value = 0; +} + +bool tl2::details::Service1IncrRead(::basictl::tl_istream & s, ::tl2::service1::Incr& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.long_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1IncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::Incr& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.long_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1IncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Incr& item) { + if (!s.nat_read_exact_tag(0x0f96b56e)) { return false; } + return tl2::details::Service1IncrRead(s, item); +} + +bool tl2::details::Service1IncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Incr& item) { + if (!s.nat_write(0x0f96b56e)) { return false; } + return tl2::details::Service1IncrWrite(s, item); +} + +bool tl2::details::Service1IncrReadResult(::basictl::tl_istream & s, tl2::service1::Incr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1IncrWriteResult(::basictl::tl_ostream & s, tl2::service1::Incr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Incr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1IncrReadResult(s, *this, result); +} +bool tl2::service1::Incr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1IncrWriteResult(s, *this, result); +} + +bool tl2::service1::KeysStat::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1KeysStatRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::KeysStat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1KeysStatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::KeysStat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1KeysStatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::KeysStat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1KeysStatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1KeysStatReset(::tl2::service1::KeysStat& item) { + item.start_time = 0; + ::tl2::details::DictionaryDictionaryIntReset(item.keys_tops); +} + +bool tl2::details::Service1KeysStatRead(::basictl::tl_istream & s, ::tl2::service1::KeysStat& item) { + if (!s.int_read(item.start_time)) { return false; } + if (!::tl2::details::DictionaryDictionaryIntRead(s, item.keys_tops)) { return false; } + return true; +} + +bool tl2::details::Service1KeysStatWrite(::basictl::tl_ostream & s, const ::tl2::service1::KeysStat& item) { + if (!s.int_write(item.start_time)) { return false;} + if (!::tl2::details::DictionaryDictionaryIntWrite(s, item.keys_tops)) { return false; } + return true; +} + +bool tl2::details::Service1KeysStatReadBoxed(::basictl::tl_istream & s, ::tl2::service1::KeysStat& item) { + if (!s.nat_read_exact_tag(0xf0f6bc68)) { return false; } + return tl2::details::Service1KeysStatRead(s, item); +} + +bool tl2::details::Service1KeysStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::KeysStat& item) { + if (!s.nat_write(0xf0f6bc68)) { return false; } + return tl2::details::Service1KeysStatWrite(s, item); +} + +bool tl2::details::Service1KeysStatMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::service1::KeysStat>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::Service1KeysStatRead(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::Service1KeysStatMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::service1::KeysStat>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::Service1KeysStatWrite(s, *item)) { return false; } + } + return true; +} + +bool tl2::service1::Longvalue::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1LongvalueRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Longvalue::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1LongvalueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Longvalue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1LongvalueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Longvalue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1LongvalueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1LongvalueReset(::tl2::service1::Longvalue& item) { + item.value = 0; + item.flags = 0; +} + +bool tl2::details::Service1LongvalueRead(::basictl::tl_istream & s, ::tl2::service1::Longvalue& item) { + if (!s.long_read(item.value)) { return false; } + if (!s.int_read(item.flags)) { return false; } + return true; +} + +bool tl2::details::Service1LongvalueWrite(::basictl::tl_ostream & s, const ::tl2::service1::Longvalue& item) { + if (!s.long_write(item.value)) { return false;} + if (!s.int_write(item.flags)) { return false;} + return true; +} + +bool tl2::details::Service1LongvalueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Longvalue& item) { + if (!s.nat_read_exact_tag(0x082e0945)) { return false; } + return tl2::details::Service1LongvalueRead(s, item); +} + +bool tl2::details::Service1LongvalueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Longvalue& item) { + if (!s.nat_write(0x082e0945)) { return false; } + return tl2::details::Service1LongvalueWrite(s, item); +} + +bool tl2::service1::LongvalueWithTime::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1LongvalueWithTimeRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::LongvalueWithTime::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1LongvalueWithTimeWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::LongvalueWithTime::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1LongvalueWithTimeReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::LongvalueWithTime::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1LongvalueWithTimeWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1LongvalueWithTimeReset(::tl2::service1::LongvalueWithTime& item) { + item.value = 0; + item.flags = 0; + item.modificationTime = 0; +} + +bool tl2::details::Service1LongvalueWithTimeRead(::basictl::tl_istream & s, ::tl2::service1::LongvalueWithTime& item) { + if (!s.long_read(item.value)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.modificationTime)) { return false; } + return true; +} + +bool tl2::details::Service1LongvalueWithTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::LongvalueWithTime& item) { + if (!s.long_write(item.value)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.modificationTime)) { return false;} + return true; +} + +bool tl2::details::Service1LongvalueWithTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::LongvalueWithTime& item) { + if (!s.nat_read_exact_tag(0xa04606ec)) { return false; } + return tl2::details::Service1LongvalueWithTimeRead(s, item); +} + +bool tl2::details::Service1LongvalueWithTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::LongvalueWithTime& item) { + if (!s.nat_write(0xa04606ec)) { return false; } + return tl2::details::Service1LongvalueWithTimeWrite(s, item); +} + +bool tl2::service1::Not_found::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1NotFoundRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Not_found::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1NotFoundWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Not_found::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1NotFoundReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Not_found::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1NotFoundWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1NotFoundReset(::tl2::service1::Not_found& item) { +} + +bool tl2::details::Service1NotFoundRead(::basictl::tl_istream & s, ::tl2::service1::Not_found& item) { + return true; +} + +bool tl2::details::Service1NotFoundWrite(::basictl::tl_ostream & s, const ::tl2::service1::Not_found& item) { + return true; +} + +bool tl2::details::Service1NotFoundReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Not_found& item) { + if (!s.nat_read_exact_tag(0x1d670b96)) { return false; } + return tl2::details::Service1NotFoundRead(s, item); +} + +bool tl2::details::Service1NotFoundWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Not_found& item) { + if (!s.nat_write(0x1d670b96)) { return false; } + return tl2::details::Service1NotFoundWrite(s, item); +} + +bool tl2::service1::Replace::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ReplaceRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Replace::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ReplaceWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Replace::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ReplaceReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Replace::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ReplaceWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1ReplaceReset(::tl2::service1::Replace& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value.clear(); +} + +bool tl2::details::Service1ReplaceRead(::basictl::tl_istream & s, ::tl2::service1::Replace& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1ReplaceWrite(::basictl::tl_ostream & s, const ::tl2::service1::Replace& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1ReplaceReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Replace& item) { + if (!s.nat_read_exact_tag(0x7f2c447d)) { return false; } + return tl2::details::Service1ReplaceRead(s, item); +} + +bool tl2::details::Service1ReplaceWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Replace& item) { + if (!s.nat_write(0x7f2c447d)) { return false; } + return tl2::details::Service1ReplaceWrite(s, item); +} + +bool tl2::details::Service1ReplaceReadResult(::basictl::tl_istream & s, tl2::service1::Replace& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1ReplaceWriteResult(::basictl::tl_ostream & s, tl2::service1::Replace& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Replace::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1ReplaceReadResult(s, *this, result); +} +bool tl2::service1::Replace::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1ReplaceWriteResult(s, *this, result); +} + +bool tl2::service1::ReplaceOrIncr::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ReplaceOrIncrRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::ReplaceOrIncr::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ReplaceOrIncrWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::ReplaceOrIncr::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ReplaceOrIncrReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::ReplaceOrIncr::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ReplaceOrIncrWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1ReplaceOrIncrReset(::tl2::service1::ReplaceOrIncr& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value = 0; +} + +bool tl2::details::Service1ReplaceOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::ReplaceOrIncr& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.long_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1ReplaceOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::ReplaceOrIncr& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.long_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1ReplaceOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::ReplaceOrIncr& item) { + if (!s.nat_read_exact_tag(0x9d1bdcfd)) { return false; } + return tl2::details::Service1ReplaceOrIncrRead(s, item); +} + +bool tl2::details::Service1ReplaceOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::ReplaceOrIncr& item) { + if (!s.nat_write(0x9d1bdcfd)) { return false; } + return tl2::details::Service1ReplaceOrIncrWrite(s, item); +} + +bool tl2::details::Service1ReplaceOrIncrReadResult(::basictl::tl_istream & s, tl2::service1::ReplaceOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1ReplaceOrIncrWriteResult(::basictl::tl_ostream & s, tl2::service1::ReplaceOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::ReplaceOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1ReplaceOrIncrReadResult(s, *this, result); +} +bool tl2::service1::ReplaceOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1ReplaceOrIncrWriteResult(s, *this, result); +} + +bool tl2::service1::Set::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1SetRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Set::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1SetWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Set::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1SetReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Set::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1SetWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1SetReset(::tl2::service1::Set& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value.clear(); +} + +bool tl2::details::Service1SetRead(::basictl::tl_istream & s, ::tl2::service1::Set& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.string_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1SetWrite(::basictl::tl_ostream & s, const ::tl2::service1::Set& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.string_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1SetReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Set& item) { + if (!s.nat_read_exact_tag(0x05ae5f66)) { return false; } + return tl2::details::Service1SetRead(s, item); +} + +bool tl2::details::Service1SetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Set& item) { + if (!s.nat_write(0x05ae5f66)) { return false; } + return tl2::details::Service1SetWrite(s, item); +} + +bool tl2::details::Service1SetReadResult(::basictl::tl_istream & s, tl2::service1::Set& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1SetWriteResult(::basictl::tl_ostream & s, tl2::service1::Set& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Set::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1SetReadResult(s, *this, result); +} +bool tl2::service1::Set::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1SetWriteResult(s, *this, result); +} + +bool tl2::service1::SetOrIncr::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1SetOrIncrRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::SetOrIncr::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1SetOrIncrWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::SetOrIncr::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1SetOrIncrReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::SetOrIncr::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1SetOrIncrWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1SetOrIncrReset(::tl2::service1::SetOrIncr& item) { + item.key.clear(); + item.flags = 0; + item.delay = 0; + item.value = 0; +} + +bool tl2::details::Service1SetOrIncrRead(::basictl::tl_istream & s, ::tl2::service1::SetOrIncr& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.delay)) { return false; } + if (!s.long_read(item.value)) { return false; } + return true; +} + +bool tl2::details::Service1SetOrIncrWrite(::basictl::tl_ostream & s, const ::tl2::service1::SetOrIncr& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.delay)) { return false;} + if (!s.long_write(item.value)) { return false;} + return true; +} + +bool tl2::details::Service1SetOrIncrReadBoxed(::basictl::tl_istream & s, ::tl2::service1::SetOrIncr& item) { + if (!s.nat_read_exact_tag(0x772e390d)) { return false; } + return tl2::details::Service1SetOrIncrRead(s, item); +} + +bool tl2::details::Service1SetOrIncrWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::SetOrIncr& item) { + if (!s.nat_write(0x772e390d)) { return false; } + return tl2::details::Service1SetOrIncrWrite(s, item); +} + +bool tl2::details::Service1SetOrIncrReadResult(::basictl::tl_istream & s, tl2::service1::SetOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1SetOrIncrWriteResult(::basictl::tl_ostream & s, tl2::service1::SetOrIncr& item, ::tl2::service1::Value& result) { + if (!::tl2::details::Service1ValueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::SetOrIncr::read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1SetOrIncrReadResult(s, *this, result); +} +bool tl2::service1::SetOrIncr::write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result) { + return tl2::details::Service1SetOrIncrWriteResult(s, *this, result); +} + +bool tl2::service1::Strvalue::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1StrvalueRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Strvalue::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1StrvalueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Strvalue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1StrvalueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Strvalue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1StrvalueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1StrvalueReset(::tl2::service1::Strvalue& item) { + item.value.clear(); + item.flags = 0; +} + +bool tl2::details::Service1StrvalueRead(::basictl::tl_istream & s, ::tl2::service1::Strvalue& item) { + if (!s.string_read(item.value)) { return false; } + if (!s.int_read(item.flags)) { return false; } + return true; +} + +bool tl2::details::Service1StrvalueWrite(::basictl::tl_ostream & s, const ::tl2::service1::Strvalue& item) { + if (!s.string_write(item.value)) { return false;} + if (!s.int_write(item.flags)) { return false;} + return true; +} + +bool tl2::details::Service1StrvalueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Strvalue& item) { + if (!s.nat_read_exact_tag(0x5faa0c52)) { return false; } + return tl2::details::Service1StrvalueRead(s, item); +} + +bool tl2::details::Service1StrvalueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Strvalue& item) { + if (!s.nat_write(0x5faa0c52)) { return false; } + return tl2::details::Service1StrvalueWrite(s, item); +} + +bool tl2::service1::StrvalueWithTime::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1StrvalueWithTimeRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::StrvalueWithTime::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1StrvalueWithTimeWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::StrvalueWithTime::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1StrvalueWithTimeReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::StrvalueWithTime::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1StrvalueWithTimeWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1StrvalueWithTimeReset(::tl2::service1::StrvalueWithTime& item) { + item.value.clear(); + item.flags = 0; + item.modificationTime = 0; +} + +bool tl2::details::Service1StrvalueWithTimeRead(::basictl::tl_istream & s, ::tl2::service1::StrvalueWithTime& item) { + if (!s.string_read(item.value)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!s.int_read(item.modificationTime)) { return false; } + return true; +} + +bool tl2::details::Service1StrvalueWithTimeWrite(::basictl::tl_ostream & s, const ::tl2::service1::StrvalueWithTime& item) { + if (!s.string_write(item.value)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!s.int_write(item.modificationTime)) { return false;} + return true; +} + +bool tl2::details::Service1StrvalueWithTimeReadBoxed(::basictl::tl_istream & s, ::tl2::service1::StrvalueWithTime& item) { + if (!s.nat_read_exact_tag(0x98b1a484)) { return false; } + return tl2::details::Service1StrvalueWithTimeRead(s, item); +} + +bool tl2::details::Service1StrvalueWithTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::StrvalueWithTime& item) { + if (!s.nat_write(0x98b1a484)) { return false; } + return tl2::details::Service1StrvalueWithTimeWrite(s, item); +} + +bool tl2::service1::Touch::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service1TouchRead(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Touch::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1TouchWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Touch::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1TouchReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service1::Touch::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1TouchWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service1TouchReset(::tl2::service1::Touch& item) { + item.key.clear(); + item.delay = 0; +} + +bool tl2::details::Service1TouchRead(::basictl::tl_istream & s, ::tl2::service1::Touch& item) { + if (!s.string_read(item.key)) { return false; } + if (!s.int_read(item.delay)) { return false; } + return true; +} + +bool tl2::details::Service1TouchWrite(::basictl::tl_ostream & s, const ::tl2::service1::Touch& item) { + if (!s.string_write(item.key)) { return false;} + if (!s.int_write(item.delay)) { return false;} + return true; +} + +bool tl2::details::Service1TouchReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Touch& item) { + if (!s.nat_read_exact_tag(0xb737aa03)) { return false; } + return tl2::details::Service1TouchRead(s, item); +} + +bool tl2::details::Service1TouchWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Touch& item) { + if (!s.nat_write(0xb737aa03)) { return false; } + return tl2::details::Service1TouchWrite(s, item); +} + +bool tl2::details::Service1TouchReadResult(::basictl::tl_istream & s, tl2::service1::Touch& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service1TouchWriteResult(::basictl::tl_ostream & s, tl2::service1::Touch& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service1::Touch::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service1TouchReadResult(s, *this, result); +} +bool tl2::service1::Touch::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service1TouchWriteResult(s, *this, result); +} + +static const std::string_view Service1Value_tbl_tl_name[]{"service1.not_found", "service1.strvalue", "service1.longvalue", "service1.strvalueWithTime", "service1.longvalueWithTime"}; +static const uint32_t Service1Value_tbl_tl_tag[]{0x1d670b96, 0x5faa0c52, 0x082e0945, 0x98b1a484, 0xa04606ec}; + +bool tl2::service1::Value::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service1ValueReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::service1::Value::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service1ValueWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::service1::Value::tl_name() const { + return Service1Value_tbl_tl_name[value.index()]; +} +uint32_t tl2::service1::Value::tl_tag() const { + return Service1Value_tbl_tl_tag[value.index()]; +} + + +void tl2::details::Service1ValueReset(::tl2::service1::Value& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::Service1ValueReadBoxed(::basictl::tl_istream & s, ::tl2::service1::Value& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0x1d670b96: + if (item.value.index() != 0) { item.value.emplace<0>(); } + break; + case 0x5faa0c52: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::Service1StrvalueRead(s, std::get<1>(item.value))) { return false; } + break; + case 0x082e0945: + if (item.value.index() != 2) { item.value.emplace<2>(); } + if (!::tl2::details::Service1LongvalueRead(s, std::get<2>(item.value))) { return false; } + break; + case 0x98b1a484: + if (item.value.index() != 3) { item.value.emplace<3>(); } + if (!::tl2::details::Service1StrvalueWithTimeRead(s, std::get<3>(item.value))) { return false; } + break; + case 0xa04606ec: + if (item.value.index() != 4) { item.value.emplace<4>(); } + if (!::tl2::details::Service1LongvalueWithTimeRead(s, std::get<4>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::Service1ValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service1::Value& item) { + s.nat_write(Service1Value_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 1: + if (!::tl2::details::Service1StrvalueWrite(s, std::get<1>(item.value))) { return false; } + break; + case 2: + if (!::tl2::details::Service1LongvalueWrite(s, std::get<2>(item.value))) { return false; } + break; + case 3: + if (!::tl2::details::Service1StrvalueWithTimeWrite(s, std::get<3>(item.value))) { return false; } + break; + case 4: + if (!::tl2::details::Service1LongvalueWithTimeWrite(s, std::get<4>(item.value))) { return false; } + break; + } + return true; +} + +bool tl2::details::Service1ValueBoxedMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::service1::Value>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::Service1ValueReadBoxed(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::Service1ValueBoxedMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::service1::Value>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::Service1ValueWriteBoxed(s, *item)) { return false; } + } + return true; +} + +void tl2::details::VectorDictionaryFieldDictionaryIntReset(std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + item.clear(); +} + +bool tl2::details::VectorDictionaryFieldDictionaryIntRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldDictionaryIntRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldDictionaryIntWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldDictionaryIntWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldDictionaryIntReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldDictionaryIntRead(s, item); +} + +bool tl2::details::VectorDictionaryFieldDictionaryIntWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::Dictionary>>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldDictionaryIntWrite(s, item); +} + +void tl2::details::VectorDictionaryFieldService1ValueReset(std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + item.clear(); +} + +bool tl2::details::VectorDictionaryFieldService1ValueRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldService1ValueRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldService1ValueWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldService1ValueWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldService1ValueReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldService1ValueRead(s, item); +} + +bool tl2::details::VectorDictionaryFieldService1ValueWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField<::tl2::service1::Value>>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldService1ValueWrite(s, item); +} + +void tl2::details::VectorDictionaryFieldStringReset(std::vector<::tl2::DictionaryField>& item) { + item.clear(); +} + +bool tl2::details::VectorDictionaryFieldStringRead(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldStringRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldStringWrite(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!::tl2::details::BuiltinVectorDictionaryFieldStringWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorDictionaryFieldStringReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldStringRead(s, item); +} + +bool tl2::details::VectorDictionaryFieldStringWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::DictionaryField>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorDictionaryFieldStringWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.add.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.add.hpp new file mode 100644 index 00000000..b65fceee --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.add.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Add { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string value; + + std::string_view tl_name() const { return "service1.add"; } + uint32_t tl_tag() const { return 0x481df8be; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrGet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrGet.hpp new file mode 100644 index 00000000..112039e2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrGet.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct AddOrGet { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string value; + + std::string_view tl_name() const { return "service1.addOrGet"; } + uint32_t tl_tag() const { return 0x6a42faad; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrIncr.hpp new file mode 100644 index 00000000..feb12ace --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.addOrIncr.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct AddOrIncr { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + int64_t value = 0; + + std::string_view tl_name() const { return "service1.addOrIncr"; } + uint32_t tl_tag() const { return 0x90c4b402; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.append.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.append.hpp new file mode 100644 index 00000000..e141f82f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.append.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Append { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string suffix; + + std::string_view tl_name() const { return "service1.append"; } + uint32_t tl_tag() const { return 0x04dec671; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.cas.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.cas.hpp new file mode 100644 index 00000000..8c44c100 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.cas.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Cas { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string casToken; + std::string newValue; + + std::string_view tl_name() const { return "service1.cas"; } + uint32_t tl_tag() const { return 0x51851964; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.decr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.decr.hpp new file mode 100644 index 00000000..01af3927 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.decr.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct Decr { + std::string key; + int64_t value = 0; + + std::string_view tl_name() const { return "service1.decr"; } + uint32_t tl_tag() const { return 0xeb179ce7; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.delete.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.delete.hpp new file mode 100644 index 00000000..c6aaf181 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.delete.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Delete { + std::string key; + + std::string_view tl_name() const { return "service1.delete"; } + uint32_t tl_tag() const { return 0x83277767; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableExpiration.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableExpiration.hpp new file mode 100644 index 00000000..7bd2aadc --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableExpiration.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct DisableExpiration { + std::string prefix; + + std::string_view tl_name() const { return "service1.disableExpiration"; } + uint32_t tl_tag() const { return 0xf1c39c2d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableKeysStat.hpp new file mode 100644 index 00000000..ff25dbbf --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.disableKeysStat.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct DisableKeysStat { + int32_t period = 0; + + std::string_view tl_name() const { return "service1.disableKeysStat"; } + uint32_t tl_tag() const { return 0x79d6160f; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableExpiration.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableExpiration.hpp new file mode 100644 index 00000000..8e55e492 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableExpiration.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct EnableExpiration { + std::string prefix; + + std::string_view tl_name() const { return "service1.enableExpiration"; } + uint32_t tl_tag() const { return 0x2b51ad67; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableKeysStat.hpp new file mode 100644 index 00000000..8a2d77c7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.enableKeysStat.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct EnableKeysStat { + int32_t period = 0; + + std::string_view tl_name() const { return "service1.enableKeysStat"; } + uint32_t tl_tag() const { return 0x29a7090e; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.exists.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.exists.hpp new file mode 100644 index 00000000..f504d2ca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.exists.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Exists { + std::string key; + + std::string_view tl_name() const { return "service1.exists"; } + uint32_t tl_tag() const { return 0xe0284c9e; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.get.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.get.hpp new file mode 100644 index 00000000..adee8fd0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.get.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct Get { + std::string key; + + std::string_view tl_name() const { return "service1.get"; } + uint32_t tl_tag() const { return 0x29099b19; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getExpireTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getExpireTime.hpp new file mode 100644 index 00000000..6e71e720 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getExpireTime.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct GetExpireTime { + std::string key; + + std::string_view tl_name() const { return "service1.getExpireTime"; } + uint32_t tl_tag() const { return 0x5a731070; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional & result); + bool write_result(::basictl::tl_ostream & s, std::optional & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStat.hpp new file mode 100644 index 00000000..08b4c5c2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStat.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.keysStat.hpp" + + +namespace tl2 { namespace service1 { +struct GetKeysStat { + int32_t period = 0; + + std::string_view tl_name() const { return "service1.getKeysStat"; } + uint32_t tl_tag() const { return 0x06cecd58; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional<::tl2::service1::KeysStat> & result); + bool write_result(::basictl::tl_ostream & s, std::optional<::tl2::service1::KeysStat> & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStatPeriods.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStatPeriods.hpp new file mode 100644 index 00000000..cc9f07c8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getKeysStatPeriods.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct GetKeysStatPeriods { + + std::string_view tl_name() const { return "service1.getKeysStatPeriods"; } + uint32_t tl_tag() const { return 0x8cdf39e3; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcard.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcard.hpp new file mode 100644 index 00000000..745740b3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcard.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../__common/types/map.hpp" + + +namespace tl2 { namespace service1 { +struct GetWildcard { + std::string prefix; + + std::string_view tl_name() const { return "service1.getWildcard"; } + uint32_t tl_tag() const { return 0x2f2abf13; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector<::tl2::Map> & result); + bool write_result(::basictl::tl_ostream & s, std::vector<::tl2::Map> & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardDict.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardDict.hpp new file mode 100644 index 00000000..c1b3c3a9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardDict.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../__common/types/dictionary.hpp" + + +namespace tl2 { namespace service1 { +struct GetWildcardDict { + std::string prefix; + + std::string_view tl_name() const { return "service1.getWildcardDict"; } + uint32_t tl_tag() const { return 0x72bbc81b; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::Dictionary & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::Dictionary & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardList.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardList.hpp new file mode 100644 index 00000000..add96a28 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardList.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct GetWildcardList { + std::string prefix; + + std::string_view tl_name() const { return "service1.getWildcardList"; } + uint32_t tl_tag() const { return 0x56b6ead4; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector & result); + bool write_result(::basictl::tl_ostream & s, std::vector & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardWithFlags.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardWithFlags.hpp new file mode 100644 index 00000000..e21c897d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.getWildcardWithFlags.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" +#include "../../__common/types/dictionary.hpp" + + +namespace tl2 { namespace service1 { +struct GetWildcardWithFlags { + std::string prefix; + + std::string_view tl_name() const { return "service1.getWildcardWithFlags"; } + uint32_t tl_tag() const { return 0x5f6a1f78; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::Dictionary<::tl2::service1::Value> & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::Dictionary<::tl2::service1::Value> & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.incr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.incr.hpp new file mode 100644 index 00000000..51b86437 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.incr.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct Incr { + std::string key; + int64_t value = 0; + + std::string_view tl_name() const { return "service1.incr"; } + uint32_t tl_tag() const { return 0x0f96b56e; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replace.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replace.hpp new file mode 100644 index 00000000..7434085d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replace.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Replace { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string value; + + std::string_view tl_name() const { return "service1.replace"; } + uint32_t tl_tag() const { return 0x7f2c447d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replaceOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replaceOrIncr.hpp new file mode 100644 index 00000000..6f02fc10 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.replaceOrIncr.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct ReplaceOrIncr { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + int64_t value = 0; + + std::string_view tl_name() const { return "service1.replaceOrIncr"; } + uint32_t tl_tag() const { return 0x9d1bdcfd; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.set.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.set.hpp new file mode 100644 index 00000000..42afe5f0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.set.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Set { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + std::string value; + + std::string_view tl_name() const { return "service1.set"; } + uint32_t tl_tag() const { return 0x05ae5f66; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.setOrIncr.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.setOrIncr.hpp new file mode 100644 index 00000000..fd4324b5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.setOrIncr.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service1.Value.hpp" + + +namespace tl2 { namespace service1 { +struct SetOrIncr { + std::string key; + int32_t flags = 0; + int32_t delay = 0; + int64_t value = 0; + + std::string_view tl_name() const { return "service1.setOrIncr"; } + uint32_t tl_tag() const { return 0x772e390d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service1::Value & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service1::Value & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.touch.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.touch.hpp new file mode 100644 index 00000000..c1a70201 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/functions/service1.touch.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Touch { + std::string key; + int32_t delay = 0; + + std::string_view tl_name() const { return "service1.touch"; } + uint32_t tl_tag() const { return 0xb737aa03; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.Value.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.Value.hpp new file mode 100644 index 00000000..52a79232 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.Value.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "service1.strvalueWithTime.hpp" +#include "service1.strvalue.hpp" +#include "service1.not_found.hpp" +#include "service1.longvalueWithTime.hpp" +#include "service1.longvalue.hpp" + + +namespace tl2 { namespace service1 { +struct Value { + std::variant<::tl2::service1::Not_found, ::tl2::service1::Strvalue, ::tl2::service1::Longvalue, ::tl2::service1::StrvalueWithTime, ::tl2::service1::LongvalueWithTime> value; + + bool is_not_found() const { return value.index() == 0; } + bool is_strvalue() const { return value.index() == 1; } + bool is_longvalue() const { return value.index() == 2; } + bool is_strvalueWithTime() const { return value.index() == 3; } + bool is_longvalueWithTime() const { return value.index() == 4; } + + void set_not_found() { value.emplace<0>(); } + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.keysStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.keysStat.hpp new file mode 100644 index 00000000..f7247447 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.keysStat.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../../__common/types/dictionary.hpp" + + +namespace tl2 { namespace service1 { +struct KeysStat { + int32_t start_time = 0; + ::tl2::Dictionary<::tl2::Dictionary> keys_tops{}; + + std::string_view tl_name() const { return "service1.keysStat"; } + uint32_t tl_tag() const { return 0xf0f6bc68; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalue.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalue.hpp new file mode 100644 index 00000000..f9829890 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalue.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Longvalue { + int64_t value = 0; + int32_t flags = 0; + + std::string_view tl_name() const { return "service1.longvalue"; } + uint32_t tl_tag() const { return 0x082e0945; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalueWithTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalueWithTime.hpp new file mode 100644 index 00000000..66e2651c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.longvalueWithTime.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct LongvalueWithTime { + int64_t value = 0; + int32_t flags = 0; + int32_t modificationTime = 0; + + std::string_view tl_name() const { return "service1.longvalueWithTime"; } + uint32_t tl_tag() const { return 0xa04606ec; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.not_found.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.not_found.hpp new file mode 100644 index 00000000..490fa2d7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.not_found.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Not_found { + + std::string_view tl_name() const { return "service1.not_found"; } + uint32_t tl_tag() const { return 0x1d670b96; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalue.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalue.hpp new file mode 100644 index 00000000..9ecbf10a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalue.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct Strvalue { + std::string value; + int32_t flags = 0; + + std::string_view tl_name() const { return "service1.strvalue"; } + uint32_t tl_tag() const { return 0x5faa0c52; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalueWithTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalueWithTime.hpp new file mode 100644 index 00000000..414d2569 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service1/types/service1.strvalueWithTime.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service1 { +struct StrvalueWithTime { + std::string value; + int32_t flags = 0; + int32_t modificationTime = 0; + + std::string_view tl_name() const { return "service1.strvalueWithTime"; } + uint32_t tl_tag() const { return 0x98b1a484; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service1 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.addOrIncrMany.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.addOrIncrMany.hpp new file mode 100644 index 00000000..8b7f6590 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.addOrIncrMany.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service2.addOrIncrMany.hpp" +#include "../../types/service2.counterSet.hpp" + +namespace tl2 { namespace details { + +void Service2AddOrIncrManyReset(::tl2::service2::AddOrIncrMany& item); +bool Service2AddOrIncrManyRead(::basictl::tl_istream & s, ::tl2::service2::AddOrIncrMany& item); +bool Service2AddOrIncrManyWrite(::basictl::tl_ostream & s, const ::tl2::service2::AddOrIncrMany& item); +bool Service2AddOrIncrManyReadBoxed(::basictl::tl_istream & s, ::tl2::service2::AddOrIncrMany& item); +bool Service2AddOrIncrManyWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::AddOrIncrMany& item); + +bool Service2AddOrIncrManyReadResult(::basictl::tl_istream & s, ::tl2::service2::AddOrIncrMany& item, std::vector<::tl2::service2::CounterSet>& result); +bool Service2AddOrIncrManyWriteResult(::basictl::tl_ostream & s, ::tl2::service2::AddOrIncrMany& item, std::vector<::tl2::service2::CounterSet>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.counterSet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.counterSet.hpp new file mode 100644 index 00000000..eb0d0239 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.counterSet.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service2.counterSet.hpp" + +namespace tl2 { namespace details { + +void BuiltinTupleService2CounterSetReset(std::vector<::tl2::service2::CounterSet>& item); +bool BuiltinTupleService2CounterSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_n, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum); +bool BuiltinTupleService2CounterSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_n, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service2CounterSetReset(::tl2::service2::CounterSet& item); +bool Service2CounterSetRead(::basictl::tl_istream & s, ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2CounterSetWrite(::basictl::tl_ostream & s, const ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2CounterSetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2CounterSetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.deltaSet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.deltaSet.hpp new file mode 100644 index 00000000..2460d122 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.deltaSet.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service2.deltaSet.hpp" + +namespace tl2 { namespace details { + +void BuiltinTupleService2DeltaSetReset(std::vector<::tl2::service2::DeltaSet>& item); +bool BuiltinTupleService2DeltaSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_n, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum); +bool BuiltinTupleService2DeltaSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_n, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service2DeltaSetReset(::tl2::service2::DeltaSet& item); +bool Service2DeltaSetRead(::basictl::tl_istream & s, ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2DeltaSetWrite(::basictl::tl_ostream & s, const ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2DeltaSetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); +bool Service2DeltaSetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.objectId.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.objectId.hpp new file mode 100644 index 00000000..5a71d050 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.objectId.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service2.objectId.hpp" + +namespace tl2 { namespace details { + +void Service2ObjectIdReset(::tl2::service2::ObjectId& item); +bool Service2ObjectIdRead(::basictl::tl_istream & s, ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength); +bool Service2ObjectIdWrite(::basictl::tl_ostream & s, const ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength); +bool Service2ObjectIdReadBoxed(::basictl::tl_istream & s, ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength); +bool Service2ObjectIdWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.set.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.set.hpp new file mode 100644 index 00000000..3debbe52 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.set.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service2.set.hpp" +#include "../../../__common/types/true.hpp" + +namespace tl2 { namespace details { + +void Service2SetReset(::tl2::service2::Set& item); +bool Service2SetRead(::basictl::tl_istream & s, ::tl2::service2::Set& item); +bool Service2SetWrite(::basictl::tl_ostream & s, const ::tl2::service2::Set& item); +bool Service2SetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::Set& item); +bool Service2SetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::Set& item); + +bool Service2SetReadResult(::basictl::tl_istream & s, ::tl2::service2::Set& item, ::tl2::True& result); +bool Service2SetWriteResult(::basictl::tl_ostream & s, ::tl2::service2::Set& item, ::tl2::True& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.setObjectTtl.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.setObjectTtl.hpp new file mode 100644 index 00000000..42f5c230 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2.setObjectTtl.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service2.setObjectTtl.hpp" +#include "../../../__common/types/true.hpp" + +namespace tl2 { namespace details { + +void Service2SetObjectTtlReset(::tl2::service2::SetObjectTtl& item); +bool Service2SetObjectTtlRead(::basictl::tl_istream & s, ::tl2::service2::SetObjectTtl& item); +bool Service2SetObjectTtlWrite(::basictl::tl_ostream & s, const ::tl2::service2::SetObjectTtl& item); +bool Service2SetObjectTtlReadBoxed(::basictl::tl_istream & s, ::tl2::service2::SetObjectTtl& item); +bool Service2SetObjectTtlWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::SetObjectTtl& item); + +bool Service2SetObjectTtlReadResult(::basictl::tl_istream & s, ::tl2::service2::SetObjectTtl& item, ::tl2::True& result); +bool Service2SetObjectTtlWriteResult(::basictl::tl_ostream & s, ::tl2::service2::SetObjectTtl& item, ::tl2::True& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_double.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_double.hpp new file mode 100644 index 00000000..3bd1d98b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_double.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/double.hpp" + +namespace tl2 { namespace details { + +void BuiltinTupleDoubleReset(std::vector& item); +bool BuiltinTupleDoubleRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool BuiltinTupleDoubleWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_tuple.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_tuple.hpp new file mode 100644 index 00000000..38ef2c7c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/headers/service2_tuple.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/tuple.hpp" +#include "../../types/service2.deltaSet.hpp" +#include "../../../__common/types/double.hpp" + +namespace tl2 { namespace details { + +void TupleDoubleReset(std::vector& item); +bool TupleDoubleRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleDoubleWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); +bool TupleDoubleReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n); +bool TupleDoubleWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TupleService2DeltaSetReset(std::vector<::tl2::service2::DeltaSet>& item); +bool TupleService2DeltaSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2DeltaSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2DeltaSetReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); +bool TupleService2DeltaSetWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service2/details/namespace_details.cpp new file mode 100644 index 00000000..c6e1a785 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/details/namespace_details.cpp @@ -0,0 +1,484 @@ +#include "headers/service2_tuple.hpp" +#include "headers/service2.setObjectTtl.hpp" +#include "headers/service2.set.hpp" +#include "headers/service2.addOrIncrMany.hpp" +#include "headers/service2.deltaSet.hpp" +#include "headers/service2.objectId.hpp" +#include "headers/service2.counterSet.hpp" +#include "../../__common/details/headers/true.hpp" +#include "../../__common/details/headers/int.hpp" +#include "headers/service2_double.hpp" + + +void tl2::details::BuiltinTupleDoubleReset(std::vector& item) { + item.resize(0); +} + +bool tl2::details::BuiltinTupleDoubleRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + // TODO - check length sanity + item.resize(nat_n); + for(auto && el : item) { + if (!s.double_read(el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTupleDoubleWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (item.size() != nat_n) + return s.set_error_sequence_length(); + for(const auto & el : item) { + if (!s.double_write(el)) { return false;} + } + return true; +} + +void tl2::details::BuiltinTupleService2CounterSetReset(std::vector<::tl2::service2::CounterSet>& item) { + item.resize(0); +} + +bool tl2::details::BuiltinTupleService2CounterSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_n, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum) { + // TODO - check length sanity + item.resize(nat_n); + for(auto && el : item) { + if (!::tl2::details::Service2CounterSetRead(s, el, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTupleService2CounterSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::CounterSet>& item, uint32_t nat_n, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum) { + if (item.size() != nat_n) + return s.set_error_sequence_length(); + for(const auto & el : item) { + if (!::tl2::details::Service2CounterSetWrite(s, el, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + } + return true; +} + +void tl2::details::BuiltinTupleService2DeltaSetReset(std::vector<::tl2::service2::DeltaSet>& item) { + item.resize(0); +} + +bool tl2::details::BuiltinTupleService2DeltaSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_n, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum) { + // TODO - check length sanity + item.resize(nat_n); + for(auto && el : item) { + if (!::tl2::details::Service2DeltaSetRead(s, el, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinTupleService2DeltaSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_n, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum) { + if (item.size() != nat_n) + return s.set_error_sequence_length(); + for(const auto & el : item) { + if (!::tl2::details::Service2DeltaSetWrite(s, el, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + } + return true; +} + +bool tl2::service2::AddOrIncrMany::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service2AddOrIncrManyRead(s, *this)) { return false; } + return true; +} + +bool tl2::service2::AddOrIncrMany::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2AddOrIncrManyWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service2::AddOrIncrMany::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service2AddOrIncrManyReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service2::AddOrIncrMany::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2AddOrIncrManyWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service2AddOrIncrManyReset(::tl2::service2::AddOrIncrMany& item) { + item.objectIdLength = 0; + item.intCountersNum = 0; + item.floatCountersNum = 0; + item.objectsNum = 0; + item.intCounters.clear(); + item.floatCounters.clear(); + item.deltas.clear(); +} + +bool tl2::details::Service2AddOrIncrManyRead(::basictl::tl_istream & s, ::tl2::service2::AddOrIncrMany& item) { + if (!s.nat_read(item.objectIdLength)) { return false; } + if (!s.nat_read(item.intCountersNum)) { return false; } + if (!s.nat_read(item.floatCountersNum)) { return false; } + if (!s.nat_read(item.objectsNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntRead(s, item.intCounters, item.intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntRead(s, item.floatCounters, item.floatCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleService2DeltaSetRead(s, item.deltas, item.objectsNum, item.objectIdLength, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2AddOrIncrManyWrite(::basictl::tl_ostream & s, const ::tl2::service2::AddOrIncrMany& item) { + if (!s.nat_write(item.objectIdLength)) { return false;} + if (!s.nat_write(item.intCountersNum)) { return false;} + if (!s.nat_write(item.floatCountersNum)) { return false;} + if (!s.nat_write(item.objectsNum)) { return false;} + if (!::tl2::details::BuiltinTupleIntWrite(s, item.intCounters, item.intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, item.floatCounters, item.floatCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleService2DeltaSetWrite(s, item.deltas, item.objectsNum, item.objectIdLength, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2AddOrIncrManyReadBoxed(::basictl::tl_istream & s, ::tl2::service2::AddOrIncrMany& item) { + if (!s.nat_read_exact_tag(0x5aa52489)) { return false; } + return tl2::details::Service2AddOrIncrManyRead(s, item); +} + +bool tl2::details::Service2AddOrIncrManyWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::AddOrIncrMany& item) { + if (!s.nat_write(0x5aa52489)) { return false; } + return tl2::details::Service2AddOrIncrManyWrite(s, item); +} + +bool tl2::details::Service2AddOrIncrManyReadResult(::basictl::tl_istream & s, tl2::service2::AddOrIncrMany& item, std::vector<::tl2::service2::CounterSet>& result) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false;} + if (!::tl2::details::BuiltinTupleService2CounterSetRead(s, result, item.objectsNum, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} +bool tl2::details::Service2AddOrIncrManyWriteResult(::basictl::tl_ostream & s, tl2::service2::AddOrIncrMany& item, std::vector<::tl2::service2::CounterSet>& result) { + if (!s.nat_write(0x9770768a)) { return false; } + if (!::tl2::details::BuiltinTupleService2CounterSetWrite(s, result, item.objectsNum, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::AddOrIncrMany::read_result(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet> & result) { + return tl2::details::Service2AddOrIncrManyReadResult(s, *this, result); +} +bool tl2::service2::AddOrIncrMany::write_result(::basictl::tl_ostream & s, std::vector<::tl2::service2::CounterSet> & result) { + return tl2::details::Service2AddOrIncrManyWriteResult(s, *this, result); +} + +bool tl2::service2::CounterSet::read(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2CounterSetRead(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::CounterSet::write(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { + if (!::tl2::details::Service2CounterSetWrite(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::CounterSet::read_boxed(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2CounterSetReadBoxed(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::CounterSet::write_boxed(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { + if (!::tl2::details::Service2CounterSetWriteBoxed(s, *this, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +void tl2::details::Service2CounterSetReset(::tl2::service2::CounterSet& item) { + item.intCounters.clear(); + item.floatCounters.clear(); +} + +bool tl2::details::Service2CounterSetRead(::basictl::tl_istream & s, ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::BuiltinTupleIntRead(s, item.intCounters, nat_intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleDoubleRead(s, item.floatCounters, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2CounterSetWrite(::basictl::tl_ostream & s, const ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::BuiltinTupleIntWrite(s, item.intCounters, nat_intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleDoubleWrite(s, item.floatCounters, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2CounterSetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!s.nat_read_exact_tag(0xf5403fd9)) { return false; } + return tl2::details::Service2CounterSetRead(s, item, nat_intCountersNum, nat_floatCountersNum); +} + +bool tl2::details::Service2CounterSetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::CounterSet& item, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!s.nat_write(0xf5403fd9)) { return false; } + return tl2::details::Service2CounterSetWrite(s, item, nat_intCountersNum, nat_floatCountersNum); +} + +bool tl2::service2::DeltaSet::read(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2DeltaSetRead(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::DeltaSet::write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { + if (!::tl2::details::Service2DeltaSetWrite(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::DeltaSet::read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2DeltaSetReadBoxed(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::service2::DeltaSet::write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const { + if (!::tl2::details::Service2DeltaSetWriteBoxed(s, *this, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +void tl2::details::Service2DeltaSetReset(::tl2::service2::DeltaSet& item) { + ::tl2::details::Service2ObjectIdReset(item.id); + ::tl2::details::Service2CounterSetReset(item.counters); +} + +bool tl2::details::Service2DeltaSetRead(::basictl::tl_istream & s, ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2ObjectIdRead(s, item.id, nat_objectIdLength)) { return false; } + if (!::tl2::details::Service2CounterSetRead(s, item.counters, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2DeltaSetWrite(::basictl::tl_ostream & s, const ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!::tl2::details::Service2ObjectIdWrite(s, item.id, nat_objectIdLength)) { return false; } + if (!::tl2::details::Service2CounterSetWrite(s, item.counters, nat_intCountersNum, nat_floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2DeltaSetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!s.nat_read_exact_tag(0xbf49abc2)) { return false; } + return tl2::details::Service2DeltaSetRead(s, item, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum); +} + +bool tl2::details::Service2DeltaSetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::DeltaSet& item, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum) { + if (!s.nat_write(0xbf49abc2)) { return false; } + return tl2::details::Service2DeltaSetWrite(s, item, nat_objectIdLength, nat_intCountersNum, nat_floatCountersNum); +} + +bool tl2::service2::ObjectId::read(::basictl::tl_istream & s, uint32_t nat_objectIdLength) { + if (!::tl2::details::Service2ObjectIdRead(s, *this, nat_objectIdLength)) { return false; } + return true; +} + +bool tl2::service2::ObjectId::write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const { + if (!::tl2::details::Service2ObjectIdWrite(s, *this, nat_objectIdLength)) { return false; } + return true; +} + +bool tl2::service2::ObjectId::read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength) { + if (!::tl2::details::Service2ObjectIdReadBoxed(s, *this, nat_objectIdLength)) { return false; } + return true; +} + +bool tl2::service2::ObjectId::write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const { + if (!::tl2::details::Service2ObjectIdWriteBoxed(s, *this, nat_objectIdLength)) { return false; } + return true; +} + +void tl2::details::Service2ObjectIdReset(::tl2::service2::ObjectId& item) { + item.id.clear(); +} + +bool tl2::details::Service2ObjectIdRead(::basictl::tl_istream & s, ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength) { + if (!::tl2::details::BuiltinTupleIntRead(s, item.id, nat_objectIdLength)) { return false; } + return true; +} + +bool tl2::details::Service2ObjectIdWrite(::basictl::tl_ostream & s, const ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength) { + if (!::tl2::details::BuiltinTupleIntWrite(s, item.id, nat_objectIdLength)) { return false; } + return true; +} + +bool tl2::details::Service2ObjectIdReadBoxed(::basictl::tl_istream & s, ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength) { + if (!s.nat_read_exact_tag(0xaa0af282)) { return false; } + return tl2::details::Service2ObjectIdRead(s, item, nat_objectIdLength); +} + +bool tl2::details::Service2ObjectIdWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::ObjectId& item, uint32_t nat_objectIdLength) { + if (!s.nat_write(0xaa0af282)) { return false; } + return tl2::details::Service2ObjectIdWrite(s, item, nat_objectIdLength); +} + +bool tl2::service2::Set::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service2SetRead(s, *this)) { return false; } + return true; +} + +bool tl2::service2::Set::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2SetWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service2::Set::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service2SetReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service2::Set::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2SetWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service2SetReset(::tl2::service2::Set& item) { + item.objectIdLength = 0; + item.intCountersNum = 0; + item.floatCountersNum = 0; + item.intCounters.clear(); + item.floatCounters.clear(); + ::tl2::details::Service2DeltaSetReset(item.newValues); +} + +bool tl2::details::Service2SetRead(::basictl::tl_istream & s, ::tl2::service2::Set& item) { + if (!s.nat_read(item.objectIdLength)) { return false; } + if (!s.nat_read(item.intCountersNum)) { return false; } + if (!s.nat_read(item.floatCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntRead(s, item.intCounters, item.intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntRead(s, item.floatCounters, item.floatCountersNum)) { return false; } + if (!::tl2::details::Service2DeltaSetRead(s, item.newValues, item.objectIdLength, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2SetWrite(::basictl::tl_ostream & s, const ::tl2::service2::Set& item) { + if (!s.nat_write(item.objectIdLength)) { return false;} + if (!s.nat_write(item.intCountersNum)) { return false;} + if (!s.nat_write(item.floatCountersNum)) { return false;} + if (!::tl2::details::BuiltinTupleIntWrite(s, item.intCounters, item.intCountersNum)) { return false; } + if (!::tl2::details::BuiltinTupleIntWrite(s, item.floatCounters, item.floatCountersNum)) { return false; } + if (!::tl2::details::Service2DeltaSetWrite(s, item.newValues, item.objectIdLength, item.intCountersNum, item.floatCountersNum)) { return false; } + return true; +} + +bool tl2::details::Service2SetReadBoxed(::basictl::tl_istream & s, ::tl2::service2::Set& item) { + if (!s.nat_read_exact_tag(0x0d31f63d)) { return false; } + return tl2::details::Service2SetRead(s, item); +} + +bool tl2::details::Service2SetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::Set& item) { + if (!s.nat_write(0x0d31f63d)) { return false; } + return tl2::details::Service2SetWrite(s, item); +} + +bool tl2::details::Service2SetReadResult(::basictl::tl_istream & s, tl2::service2::Set& item, ::tl2::True& result) { + if (!::tl2::details::TrueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service2SetWriteResult(::basictl::tl_ostream & s, tl2::service2::Set& item, ::tl2::True& result) { + if (!::tl2::details::TrueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service2::Set::read_result(::basictl::tl_istream & s, ::tl2::True & result) { + return tl2::details::Service2SetReadResult(s, *this, result); +} +bool tl2::service2::Set::write_result(::basictl::tl_ostream & s, ::tl2::True & result) { + return tl2::details::Service2SetWriteResult(s, *this, result); +} + +bool tl2::service2::SetObjectTtl::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service2SetObjectTtlRead(s, *this)) { return false; } + return true; +} + +bool tl2::service2::SetObjectTtl::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2SetObjectTtlWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service2::SetObjectTtl::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service2SetObjectTtlReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service2::SetObjectTtl::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service2SetObjectTtlWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service2SetObjectTtlReset(::tl2::service2::SetObjectTtl& item) { + item.objectIdLength = 0; + ::tl2::details::Service2ObjectIdReset(item.objectId); + item.ttl = 0; +} + +bool tl2::details::Service2SetObjectTtlRead(::basictl::tl_istream & s, ::tl2::service2::SetObjectTtl& item) { + if (!s.nat_read(item.objectIdLength)) { return false; } + if (!::tl2::details::Service2ObjectIdRead(s, item.objectId, item.objectIdLength)) { return false; } + if (!s.int_read(item.ttl)) { return false; } + return true; +} + +bool tl2::details::Service2SetObjectTtlWrite(::basictl::tl_ostream & s, const ::tl2::service2::SetObjectTtl& item) { + if (!s.nat_write(item.objectIdLength)) { return false;} + if (!::tl2::details::Service2ObjectIdWrite(s, item.objectId, item.objectIdLength)) { return false; } + if (!s.int_write(item.ttl)) { return false;} + return true; +} + +bool tl2::details::Service2SetObjectTtlReadBoxed(::basictl::tl_istream & s, ::tl2::service2::SetObjectTtl& item) { + if (!s.nat_read_exact_tag(0x6f98f025)) { return false; } + return tl2::details::Service2SetObjectTtlRead(s, item); +} + +bool tl2::details::Service2SetObjectTtlWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service2::SetObjectTtl& item) { + if (!s.nat_write(0x6f98f025)) { return false; } + return tl2::details::Service2SetObjectTtlWrite(s, item); +} + +bool tl2::details::Service2SetObjectTtlReadResult(::basictl::tl_istream & s, tl2::service2::SetObjectTtl& item, ::tl2::True& result) { + if (!::tl2::details::TrueReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service2SetObjectTtlWriteResult(::basictl::tl_ostream & s, tl2::service2::SetObjectTtl& item, ::tl2::True& result) { + if (!::tl2::details::TrueWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service2::SetObjectTtl::read_result(::basictl::tl_istream & s, ::tl2::True & result) { + return tl2::details::Service2SetObjectTtlReadResult(s, *this, result); +} +bool tl2::service2::SetObjectTtl::write_result(::basictl::tl_ostream & s, ::tl2::True & result) { + return tl2::details::Service2SetObjectTtlWriteResult(s, *this, result); +} + +void tl2::details::TupleDoubleReset(std::vector& item) { + item.clear(); +} + +bool tl2::details::TupleDoubleRead(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleDoubleRead(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleDoubleWrite(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleDoubleWrite(s, item, nat_n)) { return false; } + return true; +} + +bool tl2::details::TupleDoubleReadBoxed(::basictl::tl_istream & s, std::vector& item, uint32_t nat_n) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleDoubleRead(s, item, nat_n); +} + +bool tl2::details::TupleDoubleWriteBoxed(::basictl::tl_ostream & s, const std::vector& item, uint32_t nat_n) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleDoubleWrite(s, item, nat_n); +} + +void tl2::details::TupleService2DeltaSetReset(std::vector<::tl2::service2::DeltaSet>& item) { + item.clear(); +} + +bool tl2::details::TupleService2DeltaSetRead(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleService2DeltaSetRead(s, item, nat_n, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + return true; +} + +bool tl2::details::TupleService2DeltaSetWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!::tl2::details::BuiltinTupleService2DeltaSetWrite(s, item, nat_n, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum)) { return false; } + return true; +} + +bool tl2::details::TupleService2DeltaSetReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!s.nat_read_exact_tag(0x9770768a)) { return false; } + return tl2::details::TupleService2DeltaSetRead(s, item, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum, nat_n); +} + +bool tl2::details::TupleService2DeltaSetWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service2::DeltaSet>& item, uint32_t nat_tobjectIdLength, uint32_t nat_tintCountersNum, uint32_t nat_tfloatCountersNum, uint32_t nat_n) { + if (!s.nat_write(0x9770768a)) { return false; } + return tl2::details::TupleService2DeltaSetWrite(s, item, nat_tobjectIdLength, nat_tintCountersNum, nat_tfloatCountersNum, nat_n); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.addOrIncrMany.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.addOrIncrMany.hpp new file mode 100644 index 00000000..f8b9072d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.addOrIncrMany.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service2.deltaSet.hpp" +#include "../types/service2.counterSet.hpp" + + +namespace tl2 { namespace service2 { +struct AddOrIncrMany { + uint32_t objectIdLength = 0; + uint32_t intCountersNum = 0; + uint32_t floatCountersNum = 0; + uint32_t objectsNum = 0; + std::vector intCounters; + std::vector floatCounters; + std::vector<::tl2::service2::DeltaSet> deltas; + + std::string_view tl_name() const { return "service2.addOrIncrMany"; } + uint32_t tl_tag() const { return 0x5aa52489; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector<::tl2::service2::CounterSet> & result); + bool write_result(::basictl::tl_ostream & s, std::vector<::tl2::service2::CounterSet> & result); +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.set.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.set.hpp new file mode 100644 index 00000000..416156c8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.set.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service2.deltaSet.hpp" +#include "../../__common/types/true.hpp" + + +namespace tl2 { namespace service2 { +struct Set { + uint32_t objectIdLength = 0; + uint32_t intCountersNum = 0; + uint32_t floatCountersNum = 0; + std::vector intCounters; + std::vector floatCounters; + ::tl2::service2::DeltaSet newValues{}; + + std::string_view tl_name() const { return "service2.set"; } + uint32_t tl_tag() const { return 0x0d31f63d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::True & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::True & result); +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.setObjectTtl.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.setObjectTtl.hpp new file mode 100644 index 00000000..918fb970 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/functions/service2.setObjectTtl.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service2.objectId.hpp" +#include "../../__common/types/true.hpp" + + +namespace tl2 { namespace service2 { +struct SetObjectTtl { + uint32_t objectIdLength = 0; + ::tl2::service2::ObjectId objectId{}; + int32_t ttl = 0; + + std::string_view tl_name() const { return "service2.setObjectTtl"; } + uint32_t tl_tag() const { return 0x6f98f025; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::True & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::True & result); +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.counterSet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.counterSet.hpp new file mode 100644 index 00000000..149972c6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.counterSet.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service2 { +struct CounterSet { + std::vector intCounters; + std::vector floatCounters; + + std::string_view tl_name() const { return "service2.counterSet"; } + uint32_t tl_tag() const { return 0xf5403fd9; } + + bool read(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + bool write(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const; + + bool read_boxed(::basictl::tl_istream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + bool write_boxed(::basictl::tl_ostream & s, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const; +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.deltaSet.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.deltaSet.hpp new file mode 100644 index 00000000..19c63d20 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.deltaSet.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "service2.objectId.hpp" +#include "service2.counterSet.hpp" + + +namespace tl2 { namespace service2 { +struct DeltaSet { + ::tl2::service2::ObjectId id{}; + ::tl2::service2::CounterSet counters{}; + + std::string_view tl_name() const { return "service2.deltaSet"; } + uint32_t tl_tag() const { return 0xbf49abc2; } + + bool read(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + bool write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const; + + bool read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum); + bool write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength, uint32_t nat_intCountersNum, uint32_t nat_floatCountersNum)const; +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.objectId.hpp b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.objectId.hpp new file mode 100644 index 00000000..71972721 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service2/types/service2.objectId.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service2 { +struct ObjectId { + std::vector id; + + std::string_view tl_name() const { return "service2.objectId"; } + uint32_t tl_tag() const { return 0xaa0af282; } + + bool read(::basictl::tl_istream & s, uint32_t nat_objectIdLength); + bool write(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const; + + bool read_boxed(::basictl::tl_istream & s, uint32_t nat_objectIdLength); + bool write_boxed(::basictl::tl_ostream & s, uint32_t nat_objectIdLength)const; +}; + +}} // namespace tl2::service2 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.createProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.createProduct.hpp new file mode 100644 index 00000000..c977beff --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.createProduct.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.createProduct.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3CreateProductReset(::tl2::service3::CreateProduct& item); +bool Service3CreateProductRead(::basictl::tl_istream & s, ::tl2::service3::CreateProduct& item); +bool Service3CreateProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::CreateProduct& item); +bool Service3CreateProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::CreateProduct& item); +bool Service3CreateProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::CreateProduct& item); + +bool Service3CreateProductReadResult(::basictl::tl_istream & s, ::tl2::service3::CreateProduct& item, bool& result); +bool Service3CreateProductWriteResult(::basictl::tl_ostream & s, ::tl2::service3::CreateProduct& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteAllProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteAllProducts.hpp new file mode 100644 index 00000000..0dd42043 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteAllProducts.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.deleteAllProducts.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3DeleteAllProductsReset(::tl2::service3::DeleteAllProducts& item); +bool Service3DeleteAllProductsRead(::basictl::tl_istream & s, ::tl2::service3::DeleteAllProducts& item); +bool Service3DeleteAllProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteAllProducts& item); +bool Service3DeleteAllProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteAllProducts& item); +bool Service3DeleteAllProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteAllProducts& item); + +bool Service3DeleteAllProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::DeleteAllProducts& item, bool& result); +bool Service3DeleteAllProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::DeleteAllProducts& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteGroupedProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteGroupedProducts.hpp new file mode 100644 index 00000000..ed5f72df --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteGroupedProducts.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.deleteGroupedProducts.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3DeleteGroupedProductsReset(::tl2::service3::DeleteGroupedProducts& item); +bool Service3DeleteGroupedProductsRead(::basictl::tl_istream & s, ::tl2::service3::DeleteGroupedProducts& item); +bool Service3DeleteGroupedProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteGroupedProducts& item); +bool Service3DeleteGroupedProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteGroupedProducts& item); +bool Service3DeleteGroupedProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteGroupedProducts& item); + +bool Service3DeleteGroupedProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::DeleteGroupedProducts& item, bool& result); +bool Service3DeleteGroupedProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::DeleteGroupedProducts& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteProduct.hpp new file mode 100644 index 00000000..157a1ff6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.deleteProduct.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.deleteProduct.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3DeleteProductReset(::tl2::service3::DeleteProduct& item); +bool Service3DeleteProductRead(::basictl::tl_istream & s, ::tl2::service3::DeleteProduct& item); +bool Service3DeleteProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteProduct& item); +bool Service3DeleteProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteProduct& item); +bool Service3DeleteProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteProduct& item); + +bool Service3DeleteProductReadResult(::basictl::tl_istream & s, ::tl2::service3::DeleteProduct& item, bool& result); +bool Service3DeleteProductWriteResult(::basictl::tl_ostream & s, ::tl2::service3::DeleteProduct& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLastVisitTimestamp.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLastVisitTimestamp.hpp new file mode 100644 index 00000000..fbb81ebc --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLastVisitTimestamp.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.getLastVisitTimestamp.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void Service3GetLastVisitTimestampReset(::tl2::service3::GetLastVisitTimestamp& item); +bool Service3GetLastVisitTimestampRead(::basictl::tl_istream & s, ::tl2::service3::GetLastVisitTimestamp& item); +bool Service3GetLastVisitTimestampWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetLastVisitTimestamp& item); +bool Service3GetLastVisitTimestampReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetLastVisitTimestamp& item); +bool Service3GetLastVisitTimestampWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetLastVisitTimestamp& item); + +bool Service3GetLastVisitTimestampReadResult(::basictl::tl_istream & s, ::tl2::service3::GetLastVisitTimestamp& item, std::optional& result); +bool Service3GetLastVisitTimestampWriteResult(::basictl::tl_ostream & s, ::tl2::service3::GetLastVisitTimestamp& item, std::optional& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLimits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLimits.hpp new file mode 100644 index 00000000..7adea587 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getLimits.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.getLimits.hpp" +#include "../../types/service3.limits.hpp" + +namespace tl2 { namespace details { + +void Service3GetLimitsReset(::tl2::service3::GetLimits& item); +bool Service3GetLimitsRead(::basictl::tl_istream & s, ::tl2::service3::GetLimits& item); +bool Service3GetLimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetLimits& item); +bool Service3GetLimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetLimits& item); +bool Service3GetLimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetLimits& item); + +bool Service3GetLimitsReadResult(::basictl::tl_istream & s, ::tl2::service3::GetLimits& item, ::tl2::service3::Limits& result); +bool Service3GetLimitsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::GetLimits& item, ::tl2::service3::Limits& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProductStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProductStats.hpp new file mode 100644 index 00000000..33eb7e4e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProductStats.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.getProductStats.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../types/service3.productStatsOld.hpp" + +namespace tl2 { namespace details { + +void Service3GetProductStatsReset(::tl2::service3::GetProductStats& item); +bool Service3GetProductStatsRead(::basictl::tl_istream & s, ::tl2::service3::GetProductStats& item); +bool Service3GetProductStatsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetProductStats& item); +bool Service3GetProductStatsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetProductStats& item); +bool Service3GetProductStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetProductStats& item); + +bool Service3GetProductStatsReadResult(::basictl::tl_istream & s, ::tl2::service3::GetProductStats& item, std::optional>& result); +bool Service3GetProductStatsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::GetProductStats& item, std::optional>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProducts.hpp new file mode 100644 index 00000000..3c849a02 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getProducts.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.getProducts.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../types/service3.product.hpp" + +namespace tl2 { namespace details { + +void Service3GetProductsReset(::tl2::service3::GetProducts& item); +bool Service3GetProductsRead(::basictl::tl_istream & s, ::tl2::service3::GetProducts& item); +bool Service3GetProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetProducts& item); +bool Service3GetProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetProducts& item); +bool Service3GetProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetProducts& item); + +bool Service3GetProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::GetProducts& item, std::optional>& result); +bool Service3GetProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::GetProducts& item, std::optional>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getScheduledProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getScheduledProducts.hpp new file mode 100644 index 00000000..9ba27057 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.getScheduledProducts.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.getScheduledProducts.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../types/service3.product.hpp" + +namespace tl2 { namespace details { + +void Service3GetScheduledProductsReset(::tl2::service3::GetScheduledProducts& item); +bool Service3GetScheduledProductsRead(::basictl::tl_istream & s, ::tl2::service3::GetScheduledProducts& item); +bool Service3GetScheduledProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetScheduledProducts& item); +bool Service3GetScheduledProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetScheduledProducts& item); +bool Service3GetScheduledProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetScheduledProducts& item); + +bool Service3GetScheduledProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::GetScheduledProducts& item, std::optional>>& result); +bool Service3GetScheduledProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::GetScheduledProducts& item, std::optional>>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupCountLimit.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupCountLimit.hpp new file mode 100644 index 00000000..f80306a4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupCountLimit.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service3.groupCountLimit.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService3GroupCountLimitReset(std::vector<::tl2::service3::GroupCountLimit>& item); +bool BuiltinVectorService3GroupCountLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item); +bool BuiltinVectorService3GroupCountLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service3GroupCountLimitReset(::tl2::service3::GroupCountLimit& item); +bool Service3GroupCountLimitRead(::basictl::tl_istream & s, ::tl2::service3::GroupCountLimit& item); +bool Service3GroupCountLimitWrite(::basictl::tl_ostream & s, const ::tl2::service3::GroupCountLimit& item); +bool Service3GroupCountLimitReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GroupCountLimit& item); +bool Service3GroupCountLimitWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GroupCountLimit& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupSizeLimit.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupSizeLimit.hpp new file mode 100644 index 00000000..0cf970cb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.groupSizeLimit.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service3.groupSizeLimit.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService3GroupSizeLimitReset(std::vector<::tl2::service3::GroupSizeLimit>& item); +bool BuiltinVectorService3GroupSizeLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item); +bool BuiltinVectorService3GroupSizeLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service3GroupSizeLimitReset(::tl2::service3::GroupSizeLimit& item); +bool Service3GroupSizeLimitRead(::basictl::tl_istream & s, ::tl2::service3::GroupSizeLimit& item); +bool Service3GroupSizeLimitWrite(::basictl::tl_ostream & s, const ::tl2::service3::GroupSizeLimit& item); +bool Service3GroupSizeLimitReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GroupSizeLimit& item); +bool Service3GroupSizeLimitWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GroupSizeLimit& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.limits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.limits.hpp new file mode 100644 index 00000000..90acd2c2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.limits.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service3.limits.hpp" + +namespace tl2 { namespace details { + +void Service3LimitsReset(::tl2::service3::Limits& item); +bool Service3LimitsRead(::basictl::tl_istream & s, ::tl2::service3::Limits& item); +bool Service3LimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::Limits& item); +bool Service3LimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Limits& item); +bool Service3LimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Limits& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.product.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.product.hpp new file mode 100644 index 00000000..3071e921 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.product.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service3.product.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService3ProductReset(std::vector<::tl2::service3::Product>& item); +bool BuiltinVectorService3ProductRead(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t); +bool BuiltinVectorService3ProductWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void BuiltinVectorService3Product0Reset(std::vector<::tl2::service3::Productmode<0>>& item); +bool BuiltinVectorService3Product0Read(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item); +bool BuiltinVectorService3Product0Write(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service3ProductReset(::tl2::service3::Product& item); +bool Service3ProductRead(::basictl::tl_istream & s, ::tl2::service3::Product& item, uint32_t nat_mode); +bool Service3ProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::Product& item, uint32_t nat_mode); +bool Service3ProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Product& item, uint32_t nat_mode); +bool Service3ProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Product& item, uint32_t nat_mode); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service3Product0Reset(::tl2::service3::Productmode<0>& item); +bool Service3Product0Read(::basictl::tl_istream & s, ::tl2::service3::Productmode<0>& item); +bool Service3Product0Write(::basictl::tl_ostream & s, const ::tl2::service3::Productmode<0>& item); +bool Service3Product0ReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Productmode<0>& item); +bool Service3Product0WriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Productmode<0>& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.productStatsOld.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.productStatsOld.hpp new file mode 100644 index 00000000..beea9686 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.productStatsOld.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service3.productStatsOld.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService3ProductStatsOldReset(std::vector<::tl2::service3::ProductStatsOld>& item); +bool BuiltinVectorService3ProductStatsOldRead(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item); +bool BuiltinVectorService3ProductStatsOldWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service3ProductStatsOldReset(::tl2::service3::ProductStatsOld& item); +bool Service3ProductStatsOldRead(::basictl::tl_istream & s, ::tl2::service3::ProductStatsOld& item); +bool Service3ProductStatsOldWrite(::basictl::tl_ostream & s, const ::tl2::service3::ProductStatsOld& item); +bool Service3ProductStatsOldReadBoxed(::basictl::tl_istream & s, ::tl2::service3::ProductStatsOld& item); +bool Service3ProductStatsOldWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::ProductStatsOld& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreAllProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreAllProducts.hpp new file mode 100644 index 00000000..522cdeb9 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreAllProducts.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.restoreAllProducts.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3RestoreAllProductsReset(::tl2::service3::RestoreAllProducts& item); +bool Service3RestoreAllProductsRead(::basictl::tl_istream & s, ::tl2::service3::RestoreAllProducts& item); +bool Service3RestoreAllProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreAllProducts& item); +bool Service3RestoreAllProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreAllProducts& item); +bool Service3RestoreAllProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreAllProducts& item); + +bool Service3RestoreAllProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::RestoreAllProducts& item, bool& result); +bool Service3RestoreAllProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::RestoreAllProducts& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreGroupedProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreGroupedProducts.hpp new file mode 100644 index 00000000..3de63f91 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreGroupedProducts.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.restoreGroupedProducts.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3RestoreGroupedProductsReset(::tl2::service3::RestoreGroupedProducts& item); +bool Service3RestoreGroupedProductsRead(::basictl::tl_istream & s, ::tl2::service3::RestoreGroupedProducts& item); +bool Service3RestoreGroupedProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreGroupedProducts& item); +bool Service3RestoreGroupedProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreGroupedProducts& item); +bool Service3RestoreGroupedProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreGroupedProducts& item); + +bool Service3RestoreGroupedProductsReadResult(::basictl::tl_istream & s, ::tl2::service3::RestoreGroupedProducts& item, bool& result); +bool Service3RestoreGroupedProductsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::RestoreGroupedProducts& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreProduct.hpp new file mode 100644 index 00000000..489f67fe --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.restoreProduct.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.restoreProduct.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3RestoreProductReset(::tl2::service3::RestoreProduct& item); +bool Service3RestoreProductRead(::basictl::tl_istream & s, ::tl2::service3::RestoreProduct& item); +bool Service3RestoreProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreProduct& item); +bool Service3RestoreProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreProduct& item); +bool Service3RestoreProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreProduct& item); + +bool Service3RestoreProductReadResult(::basictl::tl_istream & s, ::tl2::service3::RestoreProduct& item, bool& result); +bool Service3RestoreProductWriteResult(::basictl::tl_ostream & s, ::tl2::service3::RestoreProduct& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLastVisitTimestamp.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLastVisitTimestamp.hpp new file mode 100644 index 00000000..1e070236 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLastVisitTimestamp.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.setLastVisitTimestamp.hpp" +#include "../../../__common/types/Bool.hpp" + +namespace tl2 { namespace details { + +void Service3SetLastVisitTimestampReset(::tl2::service3::SetLastVisitTimestamp& item); +bool Service3SetLastVisitTimestampRead(::basictl::tl_istream & s, ::tl2::service3::SetLastVisitTimestamp& item); +bool Service3SetLastVisitTimestampWrite(::basictl::tl_ostream & s, const ::tl2::service3::SetLastVisitTimestamp& item); +bool Service3SetLastVisitTimestampReadBoxed(::basictl::tl_istream & s, ::tl2::service3::SetLastVisitTimestamp& item); +bool Service3SetLastVisitTimestampWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::SetLastVisitTimestamp& item); + +bool Service3SetLastVisitTimestampReadResult(::basictl::tl_istream & s, ::tl2::service3::SetLastVisitTimestamp& item, bool& result); +bool Service3SetLastVisitTimestampWriteResult(::basictl::tl_ostream & s, ::tl2::service3::SetLastVisitTimestamp& item, bool& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLimits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLimits.hpp new file mode 100644 index 00000000..0b15bd1d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3.setLimits.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service3.setLimits.hpp" +#include "../../../__common/types/boolStat.hpp" + +namespace tl2 { namespace details { + +void Service3SetLimitsReset(::tl2::service3::SetLimits& item); +bool Service3SetLimitsRead(::basictl::tl_istream & s, ::tl2::service3::SetLimits& item); +bool Service3SetLimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::SetLimits& item); +bool Service3SetLimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::SetLimits& item); +bool Service3SetLimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::SetLimits& item); + +bool Service3SetLimitsReadResult(::basictl::tl_istream & s, ::tl2::service3::SetLimits& item, ::tl2::BoolStat& result); +bool Service3SetLimitsWriteResult(::basictl::tl_ostream & s, ::tl2::service3::SetLimits& item, ::tl2::BoolStat& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_boolStat.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_boolStat.hpp new file mode 100644 index 00000000..00e8fb24 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_boolStat.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/boolStat.hpp" + +namespace tl2 { namespace details { + +void BoolStatReset(::tl2::BoolStat& item); +bool BoolStatRead(::basictl::tl_istream & s, ::tl2::BoolStat& item); +bool BoolStatWrite(::basictl::tl_ostream & s, const ::tl2::BoolStat& item); +bool BoolStatReadBoxed(::basictl::tl_istream & s, ::tl2::BoolStat& item); +bool BoolStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoolStat& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_vector.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_vector.hpp new file mode 100644 index 00000000..d6da499a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/headers/service3_vector.hpp @@ -0,0 +1,83 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../../__common/types/vector.hpp" +#include "../../types/service3.productStatsOld.hpp" +#include "../../types/service3.product.hpp" +#include "../../types/service3.groupSizeLimit.hpp" +#include "../../types/service3.groupCountLimit.hpp" + +namespace tl2 { namespace details { + +void VectorService3GroupCountLimitReset(std::vector<::tl2::service3::GroupCountLimit>& item); +bool VectorService3GroupCountLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item); +bool VectorService3GroupCountLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item); +bool VectorService3GroupCountLimitReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item); +bool VectorService3GroupCountLimitWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService3GroupSizeLimitReset(std::vector<::tl2::service3::GroupSizeLimit>& item); +bool VectorService3GroupSizeLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item); +bool VectorService3GroupSizeLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item); +bool VectorService3GroupSizeLimitReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item); +bool VectorService3GroupSizeLimitWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService3ProductReset(std::vector<::tl2::service3::Product>& item); +bool VectorService3ProductRead(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t); +bool VectorService3ProductWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t); +bool VectorService3ProductReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t); +bool VectorService3ProductWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService3Product0Reset(std::vector<::tl2::service3::Productmode<0>>& item); +bool VectorService3Product0Read(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item); +bool VectorService3Product0Write(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item); +bool VectorService3Product0ReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item); +bool VectorService3Product0WriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool VectorService3Product0MaybeReadBoxed(::basictl::tl_istream & s, std::optional>>& item); +bool VectorService3Product0MaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>>& item); + + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool VectorService3ProductMaybeReadBoxed(::basictl::tl_istream & s, std::optional>& item, uint32_t nat_t); +bool VectorService3ProductMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>& item, uint32_t nat_t); + + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void VectorService3ProductStatsOldReset(std::vector<::tl2::service3::ProductStatsOld>& item); +bool VectorService3ProductStatsOldRead(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item); +bool VectorService3ProductStatsOldWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item); +bool VectorService3ProductStatsOldReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item); +bool VectorService3ProductStatsOldWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool VectorService3ProductStatsOldMaybeReadBoxed(::basictl::tl_istream & s, std::optional>& item); +bool VectorService3ProductStatsOldMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service3/details/namespace_details.cpp new file mode 100644 index 00000000..7e6195ed --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/details/namespace_details.cpp @@ -0,0 +1,1630 @@ +#include "headers/service3_vector.hpp" +#include "headers/service3.setLimits.hpp" +#include "headers/service3.setLastVisitTimestamp.hpp" +#include "headers/service3.restoreProduct.hpp" +#include "headers/service3.restoreGroupedProducts.hpp" +#include "headers/service3.restoreAllProducts.hpp" +#include "headers/service3.productStatsOld.hpp" +#include "headers/service3.product.hpp" +#include "headers/service3.limits.hpp" +#include "headers/service3.groupSizeLimit.hpp" +#include "headers/service3.groupCountLimit.hpp" +#include "headers/service3.getScheduledProducts.hpp" +#include "headers/service3.getProducts.hpp" +#include "headers/service3.getProductStats.hpp" +#include "headers/service3.getLimits.hpp" +#include "headers/service3.getLastVisitTimestamp.hpp" +#include "headers/service3.deleteProduct.hpp" +#include "headers/service3.deleteGroupedProducts.hpp" +#include "headers/service3.deleteAllProducts.hpp" +#include "headers/service3.createProduct.hpp" +#include "../../__common/details/headers/int.hpp" +#include "headers/service3_boolStat.hpp" +#include "../../__common/details/headers/Bool.hpp" + + +bool tl2::BoolStat::read(::basictl::tl_istream & s) { + if (!::tl2::details::BoolStatRead(s, *this)) { return false; } + return true; +} + +bool tl2::BoolStat::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoolStatWrite(s, *this)) { return false; } + return true; +} + +bool tl2::BoolStat::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::BoolStatReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::BoolStat::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::BoolStatWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::BoolStatReset(::tl2::BoolStat& item) { + item.statTrue = 0; + item.statFalse = 0; + item.statUnknown = 0; +} + +bool tl2::details::BoolStatRead(::basictl::tl_istream & s, ::tl2::BoolStat& item) { + if (!s.int_read(item.statTrue)) { return false; } + if (!s.int_read(item.statFalse)) { return false; } + if (!s.int_read(item.statUnknown)) { return false; } + return true; +} + +bool tl2::details::BoolStatWrite(::basictl::tl_ostream & s, const ::tl2::BoolStat& item) { + if (!s.int_write(item.statTrue)) { return false;} + if (!s.int_write(item.statFalse)) { return false;} + if (!s.int_write(item.statUnknown)) { return false;} + return true; +} + +bool tl2::details::BoolStatReadBoxed(::basictl::tl_istream & s, ::tl2::BoolStat& item) { + if (!s.nat_read_exact_tag(0x92cbcbfa)) { return false; } + return tl2::details::BoolStatRead(s, item); +} + +bool tl2::details::BoolStatWriteBoxed(::basictl::tl_ostream & s, const ::tl2::BoolStat& item) { + if (!s.nat_write(0x92cbcbfa)) { return false; } + return tl2::details::BoolStatWrite(s, item); +} + +void tl2::details::BuiltinVectorService3GroupCountLimitReset(std::vector<::tl2::service3::GroupCountLimit>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService3GroupCountLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service3GroupCountLimitRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService3GroupCountLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service3GroupCountLimitWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService3GroupSizeLimitReset(std::vector<::tl2::service3::GroupSizeLimit>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService3GroupSizeLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service3GroupSizeLimitRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService3GroupSizeLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service3GroupSizeLimitWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService3ProductReset(std::vector<::tl2::service3::Product>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService3ProductRead(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service3ProductRead(s, el, nat_t)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService3ProductWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service3ProductWrite(s, el, nat_t)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService3Product0Reset(std::vector<::tl2::service3::Productmode<0>>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService3Product0Read(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service3Product0Read(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService3Product0Write(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service3Product0Write(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService3ProductStatsOldReset(std::vector<::tl2::service3::ProductStatsOld>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService3ProductStatsOldRead(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service3ProductStatsOldRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService3ProductStatsOldWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service3ProductStatsOldWrite(s, el)) { return false; } + } + return true; +} + +bool tl2::service3::CreateProduct::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3CreateProductRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::CreateProduct::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3CreateProductWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::CreateProduct::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3CreateProductReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::CreateProduct::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3CreateProductWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3CreateProductReset(::tl2::service3::CreateProduct& item) { + item.user_id = 0; + item.type = 0; + item.id.clear(); + item.info.clear(); + item.date = 0; + item.expiration_date = 0; +} + +bool tl2::details::Service3CreateProductRead(::basictl::tl_istream & s, ::tl2::service3::CreateProduct& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.info)) { return false; } + if (!s.int_read(item.date)) { return false; } + if (!s.int_read(item.expiration_date)) { return false; } + return true; +} + +bool tl2::details::Service3CreateProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::CreateProduct& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.info)) { return false; } + if (!s.int_write(item.date)) { return false;} + if (!s.int_write(item.expiration_date)) { return false;} + return true; +} + +bool tl2::details::Service3CreateProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::CreateProduct& item) { + if (!s.nat_read_exact_tag(0xb7d92bd9)) { return false; } + return tl2::details::Service3CreateProductRead(s, item); +} + +bool tl2::details::Service3CreateProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::CreateProduct& item) { + if (!s.nat_write(0xb7d92bd9)) { return false; } + return tl2::details::Service3CreateProductWrite(s, item); +} + +bool tl2::details::Service3CreateProductReadResult(::basictl::tl_istream & s, tl2::service3::CreateProduct& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3CreateProductWriteResult(::basictl::tl_ostream & s, tl2::service3::CreateProduct& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::CreateProduct::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3CreateProductReadResult(s, *this, result); +} +bool tl2::service3::CreateProduct::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3CreateProductWriteResult(s, *this, result); +} + +bool tl2::service3::DeleteAllProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteAllProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteAllProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteAllProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteAllProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteAllProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteAllProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteAllProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3DeleteAllProductsReset(::tl2::service3::DeleteAllProducts& item) { + item.user_id = 0; + item.type = 0; + item.start_date = 0; + item.end_date = 0; +} + +bool tl2::details::Service3DeleteAllProductsRead(::basictl::tl_istream & s, ::tl2::service3::DeleteAllProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!s.int_read(item.start_date)) { return false; } + if (!s.int_read(item.end_date)) { return false; } + return true; +} + +bool tl2::details::Service3DeleteAllProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteAllProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!s.int_write(item.start_date)) { return false;} + if (!s.int_write(item.end_date)) { return false;} + return true; +} + +bool tl2::details::Service3DeleteAllProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteAllProducts& item) { + if (!s.nat_read_exact_tag(0x4494acc2)) { return false; } + return tl2::details::Service3DeleteAllProductsRead(s, item); +} + +bool tl2::details::Service3DeleteAllProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteAllProducts& item) { + if (!s.nat_write(0x4494acc2)) { return false; } + return tl2::details::Service3DeleteAllProductsWrite(s, item); +} + +bool tl2::details::Service3DeleteAllProductsReadResult(::basictl::tl_istream & s, tl2::service3::DeleteAllProducts& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3DeleteAllProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::DeleteAllProducts& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::DeleteAllProducts::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3DeleteAllProductsReadResult(s, *this, result); +} +bool tl2::service3::DeleteAllProducts::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3DeleteAllProductsWriteResult(s, *this, result); +} + +bool tl2::service3::DeleteGroupedProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteGroupedProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteGroupedProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteGroupedProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteGroupedProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteGroupedProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteGroupedProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteGroupedProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3DeleteGroupedProductsReset(::tl2::service3::DeleteGroupedProducts& item) { + item.user_id = 0; + item.type = 0; + item.id.clear(); + item.start_date = 0; + item.end_date = 0; +} + +bool tl2::details::Service3DeleteGroupedProductsRead(::basictl::tl_istream & s, ::tl2::service3::DeleteGroupedProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!s.int_read(item.start_date)) { return false; } + if (!s.int_read(item.end_date)) { return false; } + return true; +} + +bool tl2::details::Service3DeleteGroupedProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteGroupedProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!s.int_write(item.start_date)) { return false;} + if (!s.int_write(item.end_date)) { return false;} + return true; +} + +bool tl2::details::Service3DeleteGroupedProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteGroupedProducts& item) { + if (!s.nat_read_exact_tag(0xe468e614)) { return false; } + return tl2::details::Service3DeleteGroupedProductsRead(s, item); +} + +bool tl2::details::Service3DeleteGroupedProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteGroupedProducts& item) { + if (!s.nat_write(0xe468e614)) { return false; } + return tl2::details::Service3DeleteGroupedProductsWrite(s, item); +} + +bool tl2::details::Service3DeleteGroupedProductsReadResult(::basictl::tl_istream & s, tl2::service3::DeleteGroupedProducts& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3DeleteGroupedProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::DeleteGroupedProducts& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::DeleteGroupedProducts::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3DeleteGroupedProductsReadResult(s, *this, result); +} +bool tl2::service3::DeleteGroupedProducts::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3DeleteGroupedProductsWriteResult(s, *this, result); +} + +bool tl2::service3::DeleteProduct::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteProductRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteProduct::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteProductWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteProduct::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3DeleteProductReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::DeleteProduct::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3DeleteProductWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3DeleteProductReset(::tl2::service3::DeleteProduct& item) { + item.user_id = 0; + item.type = 0; + item.id.clear(); + item.info.clear(); +} + +bool tl2::details::Service3DeleteProductRead(::basictl::tl_istream & s, ::tl2::service3::DeleteProduct& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.info)) { return false; } + return true; +} + +bool tl2::details::Service3DeleteProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::DeleteProduct& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.info)) { return false; } + return true; +} + +bool tl2::details::Service3DeleteProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::DeleteProduct& item) { + if (!s.nat_read_exact_tag(0x6867e707)) { return false; } + return tl2::details::Service3DeleteProductRead(s, item); +} + +bool tl2::details::Service3DeleteProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::DeleteProduct& item) { + if (!s.nat_write(0x6867e707)) { return false; } + return tl2::details::Service3DeleteProductWrite(s, item); +} + +bool tl2::details::Service3DeleteProductReadResult(::basictl::tl_istream & s, tl2::service3::DeleteProduct& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3DeleteProductWriteResult(::basictl::tl_ostream & s, tl2::service3::DeleteProduct& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::DeleteProduct::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3DeleteProductReadResult(s, *this, result); +} +bool tl2::service3::DeleteProduct::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3DeleteProductWriteResult(s, *this, result); +} + +bool tl2::service3::GetLastVisitTimestamp::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetLastVisitTimestampRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLastVisitTimestamp::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetLastVisitTimestampWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLastVisitTimestamp::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetLastVisitTimestampReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLastVisitTimestamp::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetLastVisitTimestampWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GetLastVisitTimestampReset(::tl2::service3::GetLastVisitTimestamp& item) { + item.user_id = 0; +} + +bool tl2::details::Service3GetLastVisitTimestampRead(::basictl::tl_istream & s, ::tl2::service3::GetLastVisitTimestamp& item) { + if (!s.int_read(item.user_id)) { return false; } + return true; +} + +bool tl2::details::Service3GetLastVisitTimestampWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetLastVisitTimestamp& item) { + if (!s.int_write(item.user_id)) { return false;} + return true; +} + +bool tl2::details::Service3GetLastVisitTimestampReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetLastVisitTimestamp& item) { + if (!s.nat_read_exact_tag(0x9a4c788d)) { return false; } + return tl2::details::Service3GetLastVisitTimestampRead(s, item); +} + +bool tl2::details::Service3GetLastVisitTimestampWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetLastVisitTimestamp& item) { + if (!s.nat_write(0x9a4c788d)) { return false; } + return tl2::details::Service3GetLastVisitTimestampWrite(s, item); +} + +bool tl2::details::Service3GetLastVisitTimestampReadResult(::basictl::tl_istream & s, tl2::service3::GetLastVisitTimestamp& item, std::optional& result) { + if (!::tl2::details::IntMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3GetLastVisitTimestampWriteResult(::basictl::tl_ostream & s, tl2::service3::GetLastVisitTimestamp& item, std::optional& result) { + if (!::tl2::details::IntMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::GetLastVisitTimestamp::read_result(::basictl::tl_istream & s, std::optional & result) { + return tl2::details::Service3GetLastVisitTimestampReadResult(s, *this, result); +} +bool tl2::service3::GetLastVisitTimestamp::write_result(::basictl::tl_ostream & s, std::optional & result) { + return tl2::details::Service3GetLastVisitTimestampWriteResult(s, *this, result); +} + +bool tl2::service3::GetLimits::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetLimitsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLimits::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetLimitsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLimits::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetLimitsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetLimits::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetLimitsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GetLimitsReset(::tl2::service3::GetLimits& item) { +} + +bool tl2::details::Service3GetLimitsRead(::basictl::tl_istream & s, ::tl2::service3::GetLimits& item) { + return true; +} + +bool tl2::details::Service3GetLimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetLimits& item) { + return true; +} + +bool tl2::details::Service3GetLimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetLimits& item) { + if (!s.nat_read_exact_tag(0xeb399467)) { return false; } + return tl2::details::Service3GetLimitsRead(s, item); +} + +bool tl2::details::Service3GetLimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetLimits& item) { + if (!s.nat_write(0xeb399467)) { return false; } + return tl2::details::Service3GetLimitsWrite(s, item); +} + +bool tl2::details::Service3GetLimitsReadResult(::basictl::tl_istream & s, tl2::service3::GetLimits& item, ::tl2::service3::Limits& result) { + if (!::tl2::details::Service3LimitsReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3GetLimitsWriteResult(::basictl::tl_ostream & s, tl2::service3::GetLimits& item, ::tl2::service3::Limits& result) { + if (!::tl2::details::Service3LimitsWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::GetLimits::read_result(::basictl::tl_istream & s, ::tl2::service3::Limits & result) { + return tl2::details::Service3GetLimitsReadResult(s, *this, result); +} +bool tl2::service3::GetLimits::write_result(::basictl::tl_ostream & s, ::tl2::service3::Limits & result) { + return tl2::details::Service3GetLimitsWriteResult(s, *this, result); +} + +bool tl2::service3::GetProductStats::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetProductStatsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProductStats::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetProductStatsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProductStats::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetProductStatsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProductStats::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetProductStatsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GetProductStatsReset(::tl2::service3::GetProductStats& item) { + item.user_id = 0; + item.types.clear(); +} + +bool tl2::details::Service3GetProductStatsRead(::basictl::tl_istream & s, ::tl2::service3::GetProductStats& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.types)) { return false; } + return true; +} + +bool tl2::details::Service3GetProductStatsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetProductStats& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.types)) { return false; } + return true; +} + +bool tl2::details::Service3GetProductStatsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetProductStats& item) { + if (!s.nat_read_exact_tag(0x261f6898)) { return false; } + return tl2::details::Service3GetProductStatsRead(s, item); +} + +bool tl2::details::Service3GetProductStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetProductStats& item) { + if (!s.nat_write(0x261f6898)) { return false; } + return tl2::details::Service3GetProductStatsWrite(s, item); +} + +bool tl2::details::Service3GetProductStatsReadResult(::basictl::tl_istream & s, tl2::service3::GetProductStats& item, std::optional>& result) { + if (!::tl2::details::VectorService3ProductStatsOldMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3GetProductStatsWriteResult(::basictl::tl_ostream & s, tl2::service3::GetProductStats& item, std::optional>& result) { + if (!::tl2::details::VectorService3ProductStatsOldMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::GetProductStats::read_result(::basictl::tl_istream & s, std::optional> & result) { + return tl2::details::Service3GetProductStatsReadResult(s, *this, result); +} +bool tl2::service3::GetProductStats::write_result(::basictl::tl_ostream & s, std::optional> & result) { + return tl2::details::Service3GetProductStatsWriteResult(s, *this, result); +} + +bool tl2::service3::GetProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GetProductsReset(::tl2::service3::GetProducts& item) { + item.user_id = 0; + item.mode = 0; + item.types.clear(); + item.start_date = 0; + item.end_date = 0; + item.offset = 0; + item.limit = 0; + item.allowed_info0.clear(); +} + +bool tl2::details::Service3GetProductsRead(::basictl::tl_istream & s, ::tl2::service3::GetProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.nat_read(item.mode)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.types)) { return false; } + if (!s.int_read(item.start_date)) { return false; } + if (!s.int_read(item.end_date)) { return false; } + if (!s.int_read(item.offset)) { return false; } + if (!s.int_read(item.limit)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.allowed_info0)) { return false; } + return true; +} + +bool tl2::details::Service3GetProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.nat_write(item.mode)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.types)) { return false; } + if (!s.int_write(item.start_date)) { return false;} + if (!s.int_write(item.end_date)) { return false;} + if (!s.int_write(item.offset)) { return false;} + if (!s.int_write(item.limit)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.allowed_info0)) { return false; } + return true; +} + +bool tl2::details::Service3GetProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetProducts& item) { + if (!s.nat_read_exact_tag(0xeb306233)) { return false; } + return tl2::details::Service3GetProductsRead(s, item); +} + +bool tl2::details::Service3GetProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetProducts& item) { + if (!s.nat_write(0xeb306233)) { return false; } + return tl2::details::Service3GetProductsWrite(s, item); +} + +bool tl2::details::Service3GetProductsReadResult(::basictl::tl_istream & s, tl2::service3::GetProducts& item, std::optional>& result) { + if (!::tl2::details::VectorService3ProductMaybeReadBoxed(s, result, item.mode)) { return false; } + return true; +} +bool tl2::details::Service3GetProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::GetProducts& item, std::optional>& result) { + if (!::tl2::details::VectorService3ProductMaybeWriteBoxed(s, result, item.mode)) { return false; } + return true; +} + +bool tl2::service3::GetProducts::read_result(::basictl::tl_istream & s, std::optional> & result) { + return tl2::details::Service3GetProductsReadResult(s, *this, result); +} +bool tl2::service3::GetProducts::write_result(::basictl::tl_ostream & s, std::optional> & result) { + return tl2::details::Service3GetProductsWriteResult(s, *this, result); +} + +bool tl2::service3::GetScheduledProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetScheduledProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetScheduledProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetScheduledProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetScheduledProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GetScheduledProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GetScheduledProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GetScheduledProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GetScheduledProductsReset(::tl2::service3::GetScheduledProducts& item) { + item.user_id = 0; + item.types.clear(); +} + +bool tl2::details::Service3GetScheduledProductsRead(::basictl::tl_istream & s, ::tl2::service3::GetScheduledProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.types)) { return false; } + return true; +} + +bool tl2::details::Service3GetScheduledProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::GetScheduledProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.types)) { return false; } + return true; +} + +bool tl2::details::Service3GetScheduledProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GetScheduledProducts& item) { + if (!s.nat_read_exact_tag(0xf53ad7bd)) { return false; } + return tl2::details::Service3GetScheduledProductsRead(s, item); +} + +bool tl2::details::Service3GetScheduledProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GetScheduledProducts& item) { + if (!s.nat_write(0xf53ad7bd)) { return false; } + return tl2::details::Service3GetScheduledProductsWrite(s, item); +} + +bool tl2::details::Service3GetScheduledProductsReadResult(::basictl::tl_istream & s, tl2::service3::GetScheduledProducts& item, std::optional>>& result) { + if (!::tl2::details::VectorService3Product0MaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3GetScheduledProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::GetScheduledProducts& item, std::optional>>& result) { + if (!::tl2::details::VectorService3Product0MaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::GetScheduledProducts::read_result(::basictl::tl_istream & s, std::optional>> & result) { + return tl2::details::Service3GetScheduledProductsReadResult(s, *this, result); +} +bool tl2::service3::GetScheduledProducts::write_result(::basictl::tl_ostream & s, std::optional>> & result) { + return tl2::details::Service3GetScheduledProductsWriteResult(s, *this, result); +} + +bool tl2::service3::GroupCountLimit::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GroupCountLimitRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupCountLimit::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GroupCountLimitWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupCountLimit::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GroupCountLimitReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupCountLimit::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GroupCountLimitWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GroupCountLimitReset(::tl2::service3::GroupCountLimit& item) { + item.types.clear(); + item.limit = 0; +} + +bool tl2::details::Service3GroupCountLimitRead(::basictl::tl_istream & s, ::tl2::service3::GroupCountLimit& item) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.types)) { return false; } + if (!s.int_read(item.limit)) { return false; } + return true; +} + +bool tl2::details::Service3GroupCountLimitWrite(::basictl::tl_ostream & s, const ::tl2::service3::GroupCountLimit& item) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.types)) { return false; } + if (!s.int_write(item.limit)) { return false;} + return true; +} + +bool tl2::details::Service3GroupCountLimitReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GroupCountLimit& item) { + if (!s.nat_read_exact_tag(0x8c04ea7f)) { return false; } + return tl2::details::Service3GroupCountLimitRead(s, item); +} + +bool tl2::details::Service3GroupCountLimitWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GroupCountLimit& item) { + if (!s.nat_write(0x8c04ea7f)) { return false; } + return tl2::details::Service3GroupCountLimitWrite(s, item); +} + +bool tl2::service3::GroupSizeLimit::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GroupSizeLimitRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupSizeLimit::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GroupSizeLimitWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupSizeLimit::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3GroupSizeLimitReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::GroupSizeLimit::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3GroupSizeLimitWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3GroupSizeLimitReset(::tl2::service3::GroupSizeLimit& item) { + item.type = 0; + item.limit = 0; +} + +bool tl2::details::Service3GroupSizeLimitRead(::basictl::tl_istream & s, ::tl2::service3::GroupSizeLimit& item) { + if (!s.int_read(item.type)) { return false; } + if (!s.int_read(item.limit)) { return false; } + return true; +} + +bool tl2::details::Service3GroupSizeLimitWrite(::basictl::tl_ostream & s, const ::tl2::service3::GroupSizeLimit& item) { + if (!s.int_write(item.type)) { return false;} + if (!s.int_write(item.limit)) { return false;} + return true; +} + +bool tl2::details::Service3GroupSizeLimitReadBoxed(::basictl::tl_istream & s, ::tl2::service3::GroupSizeLimit& item) { + if (!s.nat_read_exact_tag(0x90e59396)) { return false; } + return tl2::details::Service3GroupSizeLimitRead(s, item); +} + +bool tl2::details::Service3GroupSizeLimitWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::GroupSizeLimit& item) { + if (!s.nat_write(0x90e59396)) { return false; } + return tl2::details::Service3GroupSizeLimitWrite(s, item); +} + +bool tl2::service3::Limits::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3LimitsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::Limits::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3LimitsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::Limits::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3LimitsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::Limits::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3LimitsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3LimitsReset(::tl2::service3::Limits& item) { + item.default_group_size_limit = 0; + item.custom_group_size_limits.clear(); + item.default_group_count_limit = 0; + item.custom_group_count_limits.clear(); +} + +bool tl2::details::Service3LimitsRead(::basictl::tl_istream & s, ::tl2::service3::Limits& item) { + if (!s.int_read(item.default_group_size_limit)) { return false; } + if (!::tl2::details::BuiltinVectorService3GroupSizeLimitRead(s, item.custom_group_size_limits)) { return false; } + if (!s.int_read(item.default_group_count_limit)) { return false; } + if (!::tl2::details::BuiltinVectorService3GroupCountLimitRead(s, item.custom_group_count_limits)) { return false; } + return true; +} + +bool tl2::details::Service3LimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::Limits& item) { + if (!s.int_write(item.default_group_size_limit)) { return false;} + if (!::tl2::details::BuiltinVectorService3GroupSizeLimitWrite(s, item.custom_group_size_limits)) { return false; } + if (!s.int_write(item.default_group_count_limit)) { return false;} + if (!::tl2::details::BuiltinVectorService3GroupCountLimitWrite(s, item.custom_group_count_limits)) { return false; } + return true; +} + +bool tl2::details::Service3LimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Limits& item) { + if (!s.nat_read_exact_tag(0x80ee61ca)) { return false; } + return tl2::details::Service3LimitsRead(s, item); +} + +bool tl2::details::Service3LimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Limits& item) { + if (!s.nat_write(0x80ee61ca)) { return false; } + return tl2::details::Service3LimitsWrite(s, item); +} + +bool tl2::service3::Product::read(::basictl::tl_istream & s, uint32_t nat_mode) { + if (!::tl2::details::Service3ProductRead(s, *this, nat_mode)) { return false; } + return true; +} + +bool tl2::service3::Product::write(::basictl::tl_ostream & s, uint32_t nat_mode)const { + if (!::tl2::details::Service3ProductWrite(s, *this, nat_mode)) { return false; } + return true; +} + +bool tl2::service3::Product::read_boxed(::basictl::tl_istream & s, uint32_t nat_mode) { + if (!::tl2::details::Service3ProductReadBoxed(s, *this, nat_mode)) { return false; } + return true; +} + +bool tl2::service3::Product::write_boxed(::basictl::tl_ostream & s, uint32_t nat_mode)const { + if (!::tl2::details::Service3ProductWriteBoxed(s, *this, nat_mode)) { return false; } + return true; +} + +void tl2::details::Service3ProductReset(::tl2::service3::Product& item) { + item.type = 0; + item.id.clear(); + item.info.clear(); + item.date = 0; + item.expiration_date = 0; + item.removed = false; +} + +bool tl2::details::Service3ProductRead(::basictl::tl_istream & s, ::tl2::service3::Product& item, uint32_t nat_mode) { + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.info)) { return false; } + if (!s.int_read(item.date)) { return false; } + if (!s.int_read(item.expiration_date)) { return false; } + if ((nat_mode & (1<<0)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.removed)) { return false; } + } else { + item.removed = false; + } + return true; +} + +bool tl2::details::Service3ProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::Product& item, uint32_t nat_mode) { + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.info)) { return false; } + if (!s.int_write(item.date)) { return false;} + if (!s.int_write(item.expiration_date)) { return false;} + if ((nat_mode & (1<<0)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.removed)) { return false; } + } + return true; +} + +bool tl2::details::Service3ProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Product& item, uint32_t nat_mode) { + if (!s.nat_read_exact_tag(0x461f4ce2)) { return false; } + return tl2::details::Service3ProductRead(s, item, nat_mode); +} + +bool tl2::details::Service3ProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Product& item, uint32_t nat_mode) { + if (!s.nat_write(0x461f4ce2)) { return false; } + return tl2::details::Service3ProductWrite(s, item, nat_mode); +} + +void tl2::details::Service3Product0Reset(::tl2::service3::Productmode<0>& item) { + item.type = 0; + item.id.clear(); + item.info.clear(); + item.date = 0; + item.expiration_date = 0; + item.removed = false; +} + +bool tl2::details::Service3Product0Read(::basictl::tl_istream & s, ::tl2::service3::Productmode<0>& item) { + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.info)) { return false; } + if (!s.int_read(item.date)) { return false; } + if (!s.int_read(item.expiration_date)) { return false; } + if ((0 & (1<<0)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.removed)) { return false; } + } else { + item.removed = false; + } + return true; +} + +bool tl2::details::Service3Product0Write(::basictl::tl_ostream & s, const ::tl2::service3::Productmode<0>& item) { + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.info)) { return false; } + if (!s.int_write(item.date)) { return false;} + if (!s.int_write(item.expiration_date)) { return false;} + if ((0 & (1<<0)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.removed)) { return false; } + } + return true; +} + +bool tl2::details::Service3Product0ReadBoxed(::basictl::tl_istream & s, ::tl2::service3::Productmode<0>& item) { + if (!s.nat_read_exact_tag(0x461f4ce2)) { return false; } + return tl2::details::Service3Product0Read(s, item); +} + +bool tl2::details::Service3Product0WriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::Productmode<0>& item) { + if (!s.nat_write(0x461f4ce2)) { return false; } + return tl2::details::Service3Product0Write(s, item); +} + +bool tl2::service3::ProductStatsOld::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3ProductStatsOldRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::ProductStatsOld::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3ProductStatsOldWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::ProductStatsOld::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3ProductStatsOldReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::ProductStatsOld::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3ProductStatsOldWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3ProductStatsOldReset(::tl2::service3::ProductStatsOld& item) { + item.type = 0; + item.count_new = 0; + item.count_total = 0; + item.count_scheduled = 0; + item.next_scheduled_at = 0; +} + +bool tl2::details::Service3ProductStatsOldRead(::basictl::tl_istream & s, ::tl2::service3::ProductStatsOld& item) { + if (!s.int_read(item.type)) { return false; } + if (!s.int_read(item.count_new)) { return false; } + if (!s.int_read(item.count_total)) { return false; } + if (!s.int_read(item.count_scheduled)) { return false; } + if (!s.int_read(item.next_scheduled_at)) { return false; } + return true; +} + +bool tl2::details::Service3ProductStatsOldWrite(::basictl::tl_ostream & s, const ::tl2::service3::ProductStatsOld& item) { + if (!s.int_write(item.type)) { return false;} + if (!s.int_write(item.count_new)) { return false;} + if (!s.int_write(item.count_total)) { return false;} + if (!s.int_write(item.count_scheduled)) { return false;} + if (!s.int_write(item.next_scheduled_at)) { return false;} + return true; +} + +bool tl2::details::Service3ProductStatsOldReadBoxed(::basictl::tl_istream & s, ::tl2::service3::ProductStatsOld& item) { + if (!s.nat_read_exact_tag(0x6319810b)) { return false; } + return tl2::details::Service3ProductStatsOldRead(s, item); +} + +bool tl2::details::Service3ProductStatsOldWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::ProductStatsOld& item) { + if (!s.nat_write(0x6319810b)) { return false; } + return tl2::details::Service3ProductStatsOldWrite(s, item); +} + +bool tl2::service3::RestoreAllProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreAllProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreAllProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreAllProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreAllProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreAllProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreAllProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreAllProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3RestoreAllProductsReset(::tl2::service3::RestoreAllProducts& item) { + item.user_id = 0; + item.type = 0; + item.start_date = 0; + item.end_date = 0; +} + +bool tl2::details::Service3RestoreAllProductsRead(::basictl::tl_istream & s, ::tl2::service3::RestoreAllProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!s.int_read(item.start_date)) { return false; } + if (!s.int_read(item.end_date)) { return false; } + return true; +} + +bool tl2::details::Service3RestoreAllProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreAllProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!s.int_write(item.start_date)) { return false;} + if (!s.int_write(item.end_date)) { return false;} + return true; +} + +bool tl2::details::Service3RestoreAllProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreAllProducts& item) { + if (!s.nat_read_exact_tag(0x4d839ed0)) { return false; } + return tl2::details::Service3RestoreAllProductsRead(s, item); +} + +bool tl2::details::Service3RestoreAllProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreAllProducts& item) { + if (!s.nat_write(0x4d839ed0)) { return false; } + return tl2::details::Service3RestoreAllProductsWrite(s, item); +} + +bool tl2::details::Service3RestoreAllProductsReadResult(::basictl::tl_istream & s, tl2::service3::RestoreAllProducts& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3RestoreAllProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::RestoreAllProducts& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::RestoreAllProducts::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3RestoreAllProductsReadResult(s, *this, result); +} +bool tl2::service3::RestoreAllProducts::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3RestoreAllProductsWriteResult(s, *this, result); +} + +bool tl2::service3::RestoreGroupedProducts::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreGroupedProductsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreGroupedProducts::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreGroupedProductsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreGroupedProducts::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreGroupedProductsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreGroupedProducts::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreGroupedProductsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3RestoreGroupedProductsReset(::tl2::service3::RestoreGroupedProducts& item) { + item.user_id = 0; + item.type = 0; + item.id.clear(); + item.start_date = 0; + item.end_date = 0; +} + +bool tl2::details::Service3RestoreGroupedProductsRead(::basictl::tl_istream & s, ::tl2::service3::RestoreGroupedProducts& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!s.int_read(item.start_date)) { return false; } + if (!s.int_read(item.end_date)) { return false; } + return true; +} + +bool tl2::details::Service3RestoreGroupedProductsWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreGroupedProducts& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!s.int_write(item.start_date)) { return false;} + if (!s.int_write(item.end_date)) { return false;} + return true; +} + +bool tl2::details::Service3RestoreGroupedProductsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreGroupedProducts& item) { + if (!s.nat_read_exact_tag(0x1f17bfac)) { return false; } + return tl2::details::Service3RestoreGroupedProductsRead(s, item); +} + +bool tl2::details::Service3RestoreGroupedProductsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreGroupedProducts& item) { + if (!s.nat_write(0x1f17bfac)) { return false; } + return tl2::details::Service3RestoreGroupedProductsWrite(s, item); +} + +bool tl2::details::Service3RestoreGroupedProductsReadResult(::basictl::tl_istream & s, tl2::service3::RestoreGroupedProducts& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3RestoreGroupedProductsWriteResult(::basictl::tl_ostream & s, tl2::service3::RestoreGroupedProducts& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::RestoreGroupedProducts::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3RestoreGroupedProductsReadResult(s, *this, result); +} +bool tl2::service3::RestoreGroupedProducts::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3RestoreGroupedProductsWriteResult(s, *this, result); +} + +bool tl2::service3::RestoreProduct::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreProductRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreProduct::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreProductWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreProduct::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3RestoreProductReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::RestoreProduct::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3RestoreProductWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3RestoreProductReset(::tl2::service3::RestoreProduct& item) { + item.user_id = 0; + item.type = 0; + item.id.clear(); + item.info.clear(); +} + +bool tl2::details::Service3RestoreProductRead(::basictl::tl_istream & s, ::tl2::service3::RestoreProduct& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.info)) { return false; } + return true; +} + +bool tl2::details::Service3RestoreProductWrite(::basictl::tl_ostream & s, const ::tl2::service3::RestoreProduct& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.info)) { return false; } + return true; +} + +bool tl2::details::Service3RestoreProductReadBoxed(::basictl::tl_istream & s, ::tl2::service3::RestoreProduct& item) { + if (!s.nat_read_exact_tag(0x6170d515)) { return false; } + return tl2::details::Service3RestoreProductRead(s, item); +} + +bool tl2::details::Service3RestoreProductWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::RestoreProduct& item) { + if (!s.nat_write(0x6170d515)) { return false; } + return tl2::details::Service3RestoreProductWrite(s, item); +} + +bool tl2::details::Service3RestoreProductReadResult(::basictl::tl_istream & s, tl2::service3::RestoreProduct& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3RestoreProductWriteResult(::basictl::tl_ostream & s, tl2::service3::RestoreProduct& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::RestoreProduct::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3RestoreProductReadResult(s, *this, result); +} +bool tl2::service3::RestoreProduct::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3RestoreProductWriteResult(s, *this, result); +} + +bool tl2::service3::SetLastVisitTimestamp::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3SetLastVisitTimestampRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLastVisitTimestamp::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3SetLastVisitTimestampWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLastVisitTimestamp::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3SetLastVisitTimestampReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLastVisitTimestamp::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3SetLastVisitTimestampWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3SetLastVisitTimestampReset(::tl2::service3::SetLastVisitTimestamp& item) { + item.user_id = 0; + item.timestamp = 0; +} + +bool tl2::details::Service3SetLastVisitTimestampRead(::basictl::tl_istream & s, ::tl2::service3::SetLastVisitTimestamp& item) { + if (!s.int_read(item.user_id)) { return false; } + if (!s.int_read(item.timestamp)) { return false; } + return true; +} + +bool tl2::details::Service3SetLastVisitTimestampWrite(::basictl::tl_ostream & s, const ::tl2::service3::SetLastVisitTimestamp& item) { + if (!s.int_write(item.user_id)) { return false;} + if (!s.int_write(item.timestamp)) { return false;} + return true; +} + +bool tl2::details::Service3SetLastVisitTimestampReadBoxed(::basictl::tl_istream & s, ::tl2::service3::SetLastVisitTimestamp& item) { + if (!s.nat_read_exact_tag(0x7909b020)) { return false; } + return tl2::details::Service3SetLastVisitTimestampRead(s, item); +} + +bool tl2::details::Service3SetLastVisitTimestampWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::SetLastVisitTimestamp& item) { + if (!s.nat_write(0x7909b020)) { return false; } + return tl2::details::Service3SetLastVisitTimestampWrite(s, item); +} + +bool tl2::details::Service3SetLastVisitTimestampReadResult(::basictl::tl_istream & s, tl2::service3::SetLastVisitTimestamp& item, bool& result) { + if (!::tl2::details::BoolReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3SetLastVisitTimestampWriteResult(::basictl::tl_ostream & s, tl2::service3::SetLastVisitTimestamp& item, bool& result) { + if (!::tl2::details::BoolWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::SetLastVisitTimestamp::read_result(::basictl::tl_istream & s, bool & result) { + return tl2::details::Service3SetLastVisitTimestampReadResult(s, *this, result); +} +bool tl2::service3::SetLastVisitTimestamp::write_result(::basictl::tl_ostream & s, bool & result) { + return tl2::details::Service3SetLastVisitTimestampWriteResult(s, *this, result); +} + +bool tl2::service3::SetLimits::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service3SetLimitsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLimits::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3SetLimitsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLimits::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service3SetLimitsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service3::SetLimits::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service3SetLimitsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service3SetLimitsReset(::tl2::service3::SetLimits& item) { + ::tl2::details::Service3LimitsReset(item.limits); +} + +bool tl2::details::Service3SetLimitsRead(::basictl::tl_istream & s, ::tl2::service3::SetLimits& item) { + if (!::tl2::details::Service3LimitsRead(s, item.limits)) { return false; } + return true; +} + +bool tl2::details::Service3SetLimitsWrite(::basictl::tl_ostream & s, const ::tl2::service3::SetLimits& item) { + if (!::tl2::details::Service3LimitsWrite(s, item.limits)) { return false; } + return true; +} + +bool tl2::details::Service3SetLimitsReadBoxed(::basictl::tl_istream & s, ::tl2::service3::SetLimits& item) { + if (!s.nat_read_exact_tag(0x3ad5c19c)) { return false; } + return tl2::details::Service3SetLimitsRead(s, item); +} + +bool tl2::details::Service3SetLimitsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service3::SetLimits& item) { + if (!s.nat_write(0x3ad5c19c)) { return false; } + return tl2::details::Service3SetLimitsWrite(s, item); +} + +bool tl2::details::Service3SetLimitsReadResult(::basictl::tl_istream & s, tl2::service3::SetLimits& item, ::tl2::BoolStat& result) { + if (!::tl2::details::BoolStatReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service3SetLimitsWriteResult(::basictl::tl_ostream & s, tl2::service3::SetLimits& item, ::tl2::BoolStat& result) { + if (!::tl2::details::BoolStatWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service3::SetLimits::read_result(::basictl::tl_istream & s, ::tl2::BoolStat & result) { + return tl2::details::Service3SetLimitsReadResult(s, *this, result); +} +bool tl2::service3::SetLimits::write_result(::basictl::tl_ostream & s, ::tl2::BoolStat & result) { + return tl2::details::Service3SetLimitsWriteResult(s, *this, result); +} + +void tl2::details::VectorService3GroupCountLimitReset(std::vector<::tl2::service3::GroupCountLimit>& item) { + item.clear(); +} + +bool tl2::details::VectorService3GroupCountLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item) { + if (!::tl2::details::BuiltinVectorService3GroupCountLimitRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3GroupCountLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item) { + if (!::tl2::details::BuiltinVectorService3GroupCountLimitWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3GroupCountLimitReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupCountLimit>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService3GroupCountLimitRead(s, item); +} + +bool tl2::details::VectorService3GroupCountLimitWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupCountLimit>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService3GroupCountLimitWrite(s, item); +} + +void tl2::details::VectorService3GroupSizeLimitReset(std::vector<::tl2::service3::GroupSizeLimit>& item) { + item.clear(); +} + +bool tl2::details::VectorService3GroupSizeLimitRead(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item) { + if (!::tl2::details::BuiltinVectorService3GroupSizeLimitRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3GroupSizeLimitWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item) { + if (!::tl2::details::BuiltinVectorService3GroupSizeLimitWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3GroupSizeLimitReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::GroupSizeLimit>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService3GroupSizeLimitRead(s, item); +} + +bool tl2::details::VectorService3GroupSizeLimitWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::GroupSizeLimit>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService3GroupSizeLimitWrite(s, item); +} + +void tl2::details::VectorService3ProductReset(std::vector<::tl2::service3::Product>& item) { + item.clear(); +} + +bool tl2::details::VectorService3ProductRead(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + if (!::tl2::details::BuiltinVectorService3ProductRead(s, item, nat_t)) { return false; } + return true; +} + +bool tl2::details::VectorService3ProductWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + if (!::tl2::details::BuiltinVectorService3ProductWrite(s, item, nat_t)) { return false; } + return true; +} + +bool tl2::details::VectorService3ProductReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService3ProductRead(s, item, nat_t); +} + +bool tl2::details::VectorService3ProductWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Product>& item, uint32_t nat_t) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService3ProductWrite(s, item, nat_t); +} + +void tl2::details::VectorService3Product0Reset(std::vector<::tl2::service3::Productmode<0>>& item) { + item.clear(); +} + +bool tl2::details::VectorService3Product0Read(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item) { + if (!::tl2::details::BuiltinVectorService3Product0Read(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3Product0Write(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item) { + if (!::tl2::details::BuiltinVectorService3Product0Write(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3Product0ReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::Productmode<0>>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService3Product0Read(s, item); +} + +bool tl2::details::VectorService3Product0WriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::Productmode<0>>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService3Product0Write(s, item); +} + +bool tl2::details::VectorService3Product0MaybeReadBoxed(::basictl::tl_istream & s, std::optional>>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::BuiltinVectorService3Product0Read(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::VectorService3Product0MaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::BuiltinVectorService3Product0Write(s, *item)) { return false; } + } + return true; +} + +bool tl2::details::VectorService3ProductMaybeReadBoxed(::basictl::tl_istream & s, std::optional>& item, uint32_t nat_t) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::BuiltinVectorService3ProductRead(s, *item, nat_t)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::VectorService3ProductMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>& item, uint32_t nat_t) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::BuiltinVectorService3ProductWrite(s, *item, nat_t)) { return false; } + } + return true; +} + +void tl2::details::VectorService3ProductStatsOldReset(std::vector<::tl2::service3::ProductStatsOld>& item) { + item.clear(); +} + +bool tl2::details::VectorService3ProductStatsOldRead(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item) { + if (!::tl2::details::BuiltinVectorService3ProductStatsOldRead(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3ProductStatsOldWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item) { + if (!::tl2::details::BuiltinVectorService3ProductStatsOldWrite(s, item)) { return false; } + return true; +} + +bool tl2::details::VectorService3ProductStatsOldReadBoxed(::basictl::tl_istream & s, std::vector<::tl2::service3::ProductStatsOld>& item) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false; } + return tl2::details::VectorService3ProductStatsOldRead(s, item); +} + +bool tl2::details::VectorService3ProductStatsOldWriteBoxed(::basictl::tl_ostream & s, const std::vector<::tl2::service3::ProductStatsOld>& item) { + if (!s.nat_write(0x1cb5c415)) { return false; } + return tl2::details::VectorService3ProductStatsOldWrite(s, item); +} + +bool tl2::details::VectorService3ProductStatsOldMaybeReadBoxed(::basictl::tl_istream & s, std::optional>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::BuiltinVectorService3ProductStatsOldRead(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::VectorService3ProductStatsOldMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::BuiltinVectorService3ProductStatsOldWrite(s, *item)) { return false; } + } + return true; +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.createProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.createProduct.hpp new file mode 100644 index 00000000..8b98f1e7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.createProduct.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct CreateProduct { + int32_t user_id = 0; + int32_t type = 0; + std::vector id; + std::vector info; + int32_t date = 0; + int32_t expiration_date = 0; + + std::string_view tl_name() const { return "service3.createProduct"; } + uint32_t tl_tag() const { return 0xb7d92bd9; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteAllProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteAllProducts.hpp new file mode 100644 index 00000000..64033607 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteAllProducts.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct DeleteAllProducts { + int32_t user_id = 0; + int32_t type = 0; + int32_t start_date = 0; + int32_t end_date = 0; + + std::string_view tl_name() const { return "service3.deleteAllProducts"; } + uint32_t tl_tag() const { return 0x4494acc2; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteGroupedProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteGroupedProducts.hpp new file mode 100644 index 00000000..151f766b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteGroupedProducts.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct DeleteGroupedProducts { + int32_t user_id = 0; + int32_t type = 0; + std::vector id; + int32_t start_date = 0; + int32_t end_date = 0; + + std::string_view tl_name() const { return "service3.deleteGroupedProducts"; } + uint32_t tl_tag() const { return 0xe468e614; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteProduct.hpp new file mode 100644 index 00000000..7278dde2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.deleteProduct.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct DeleteProduct { + int32_t user_id = 0; + int32_t type = 0; + std::vector id; + std::vector info; + + std::string_view tl_name() const { return "service3.deleteProduct"; } + uint32_t tl_tag() const { return 0x6867e707; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLastVisitTimestamp.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLastVisitTimestamp.hpp new file mode 100644 index 00000000..c55e9aa5 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLastVisitTimestamp.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct GetLastVisitTimestamp { + int32_t user_id = 0; + + std::string_view tl_name() const { return "service3.getLastVisitTimestamp"; } + uint32_t tl_tag() const { return 0x9a4c788d; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional & result); + bool write_result(::basictl::tl_ostream & s, std::optional & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLimits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLimits.hpp new file mode 100644 index 00000000..5cd80390 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getLimits.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service3.limits.hpp" + + +namespace tl2 { namespace service3 { +struct GetLimits { + + std::string_view tl_name() const { return "service3.getLimits"; } + uint32_t tl_tag() const { return 0xeb399467; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service3::Limits & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service3::Limits & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProductStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProductStats.hpp new file mode 100644 index 00000000..5a05bb41 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProductStats.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service3.productStatsOld.hpp" + + +namespace tl2 { namespace service3 { +struct GetProductStats { + int32_t user_id = 0; + std::vector types; + + std::string_view tl_name() const { return "service3.getProductStats"; } + uint32_t tl_tag() const { return 0x261f6898; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional> & result); + bool write_result(::basictl::tl_ostream & s, std::optional> & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProducts.hpp new file mode 100644 index 00000000..b88df287 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getProducts.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service3.product.hpp" + + +namespace tl2 { namespace service3 { +struct GetProducts { + int32_t user_id = 0; + uint32_t mode = 0; + std::vector types; + int32_t start_date = 0; + int32_t end_date = 0; + int32_t offset = 0; + int32_t limit = 0; + std::vector allowed_info0; + + std::string_view tl_name() const { return "service3.getProducts"; } + uint32_t tl_tag() const { return 0xeb306233; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional> & result); + bool write_result(::basictl::tl_ostream & s, std::optional> & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getScheduledProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getScheduledProducts.hpp new file mode 100644 index 00000000..e4dc85f2 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.getScheduledProducts.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service3.product.hpp" + + +namespace tl2 { namespace service3 { +struct GetScheduledProducts { + int32_t user_id = 0; + std::vector types; + + std::string_view tl_name() const { return "service3.getScheduledProducts"; } + uint32_t tl_tag() const { return 0xf53ad7bd; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional>> & result); + bool write_result(::basictl::tl_ostream & s, std::optional>> & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreAllProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreAllProducts.hpp new file mode 100644 index 00000000..a0afd209 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreAllProducts.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct RestoreAllProducts { + int32_t user_id = 0; + int32_t type = 0; + int32_t start_date = 0; + int32_t end_date = 0; + + std::string_view tl_name() const { return "service3.restoreAllProducts"; } + uint32_t tl_tag() const { return 0x4d839ed0; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreGroupedProducts.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreGroupedProducts.hpp new file mode 100644 index 00000000..c5c83b00 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreGroupedProducts.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct RestoreGroupedProducts { + int32_t user_id = 0; + int32_t type = 0; + std::vector id; + int32_t start_date = 0; + int32_t end_date = 0; + + std::string_view tl_name() const { return "service3.restoreGroupedProducts"; } + uint32_t tl_tag() const { return 0x1f17bfac; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreProduct.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreProduct.hpp new file mode 100644 index 00000000..369c9310 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.restoreProduct.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct RestoreProduct { + int32_t user_id = 0; + int32_t type = 0; + std::vector id; + std::vector info; + + std::string_view tl_name() const { return "service3.restoreProduct"; } + uint32_t tl_tag() const { return 0x6170d515; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLastVisitTimestamp.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLastVisitTimestamp.hpp new file mode 100644 index 00000000..a2165862 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLastVisitTimestamp.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct SetLastVisitTimestamp { + int32_t user_id = 0; + int32_t timestamp = 0; + + std::string_view tl_name() const { return "service3.setLastVisitTimestamp"; } + uint32_t tl_tag() const { return 0x7909b020; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, bool & result); + bool write_result(::basictl::tl_ostream & s, bool & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLimits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLimits.hpp new file mode 100644 index 00000000..e6e5e677 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/functions/service3.setLimits.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service3.limits.hpp" +#include "../../__common/types/boolStat.hpp" + + +namespace tl2 { namespace service3 { +struct SetLimits { + ::tl2::service3::Limits limits{}; + + std::string_view tl_name() const { return "service3.setLimits"; } + uint32_t tl_tag() const { return 0x3ad5c19c; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::BoolStat & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::BoolStat & result); +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupCountLimit.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupCountLimit.hpp new file mode 100644 index 00000000..89888abf --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupCountLimit.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct GroupCountLimit { + std::vector types; + int32_t limit = 0; + + std::string_view tl_name() const { return "service3.groupCountLimit"; } + uint32_t tl_tag() const { return 0x8c04ea7f; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupSizeLimit.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupSizeLimit.hpp new file mode 100644 index 00000000..6f552d3b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.groupSizeLimit.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct GroupSizeLimit { + int32_t type = 0; + int32_t limit = 0; + + std::string_view tl_name() const { return "service3.groupSizeLimit"; } + uint32_t tl_tag() const { return 0x90e59396; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.limits.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.limits.hpp new file mode 100644 index 00000000..b534f5b6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.limits.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "service3.groupSizeLimit.hpp" +#include "service3.groupCountLimit.hpp" + + +namespace tl2 { namespace service3 { +struct Limits { + int32_t default_group_size_limit = 0; + std::vector<::tl2::service3::GroupSizeLimit> custom_group_size_limits; + int32_t default_group_count_limit = 0; + std::vector<::tl2::service3::GroupCountLimit> custom_group_count_limits; + + std::string_view tl_name() const { return "service3.limits"; } + uint32_t tl_tag() const { return 0x80ee61ca; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.product.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.product.hpp new file mode 100644 index 00000000..1205fa59 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.product.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct Product { + int32_t type = 0; + std::vector id; + std::vector info; + int32_t date = 0; + int32_t expiration_date = 0; + bool removed = false; + + std::string_view tl_name() const { return "service3.product"; } + uint32_t tl_tag() const { return 0x461f4ce2; } + + bool read(::basictl::tl_istream & s, uint32_t nat_mode); + bool write(::basictl::tl_ostream & s, uint32_t nat_mode)const; + + bool read_boxed(::basictl::tl_istream & s, uint32_t nat_mode); + bool write_boxed(::basictl::tl_ostream & s, uint32_t nat_mode)const; +}; + +}} // namespace tl2::service3 + +namespace tl2 { namespace service3 { +template +struct Productmode { + int32_t type = 0; + std::vector id; + std::vector info; + int32_t date = 0; + int32_t expiration_date = 0; + bool removed = false; + + std::string_view tl_name() const { return "service3.product"; } + uint32_t tl_tag() const { return 0x461f4ce2; } +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.productStatsOld.hpp b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.productStatsOld.hpp new file mode 100644 index 00000000..92a278a3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service3/types/service3.productStatsOld.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service3 { +struct ProductStatsOld { + int32_t type = 0; + int32_t count_new = 0; + int32_t count_total = 0; + int32_t count_scheduled = 0; + int32_t next_scheduled_at = 0; + + std::string_view tl_name() const { return "service3.productStatsOld"; } + uint32_t tl_tag() const { return 0x6319810b; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service3 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.modifiedNewsEntry.hpp b/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.modifiedNewsEntry.hpp new file mode 100644 index 00000000..b95af832 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.modifiedNewsEntry.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service4.modifiedNewsEntry.hpp" + +namespace tl2 { namespace details { + +void Service4ModifiedNewsEntryReset(::tl2::service4::ModifiedNewsEntry& item); +bool Service4ModifiedNewsEntryRead(::basictl::tl_istream & s, ::tl2::service4::ModifiedNewsEntry& item); +bool Service4ModifiedNewsEntryWrite(::basictl::tl_ostream & s, const ::tl2::service4::ModifiedNewsEntry& item); +bool Service4ModifiedNewsEntryReadBoxed(::basictl::tl_istream & s, ::tl2::service4::ModifiedNewsEntry& item); +bool Service4ModifiedNewsEntryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service4::ModifiedNewsEntry& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.object.hpp b/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.object.hpp new file mode 100644 index 00000000..0fccfb78 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service4/details/headers/service4.object.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service4.object.hpp" + +namespace tl2 { namespace details { + +void Service4ObjectReset(::tl2::service4::Object& item); +bool Service4ObjectRead(::basictl::tl_istream & s, ::tl2::service4::Object& item); +bool Service4ObjectWrite(::basictl::tl_ostream & s, const ::tl2::service4::Object& item); +bool Service4ObjectReadBoxed(::basictl::tl_istream & s, ::tl2::service4::Object& item); +bool Service4ObjectWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service4::Object& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service4/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service4/details/namespace_details.cpp new file mode 100644 index 00000000..78477417 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service4/details/namespace_details.cpp @@ -0,0 +1,132 @@ +#include "headers/service4.modifiedNewsEntry.hpp" +#include "headers/service4.object.hpp" +#include "../../__common/details/headers/int.hpp" +#include "../../__common/details/headers/Bool.hpp" + + +bool tl2::service4::ModifiedNewsEntry::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service4ModifiedNewsEntryRead(s, *this)) { return false; } + return true; +} + +bool tl2::service4::ModifiedNewsEntry::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service4ModifiedNewsEntryWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service4::ModifiedNewsEntry::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service4ModifiedNewsEntryReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service4::ModifiedNewsEntry::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service4ModifiedNewsEntryWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service4ModifiedNewsEntryReset(::tl2::service4::ModifiedNewsEntry& item) { + ::tl2::details::Service4ObjectReset(item.object); + item.creation_date = 0; + item.fields_mask = 0; + item.restoration_date = 0; + item.deletion_date = 0; + item.hidden_by_privacy = false; +} + +bool tl2::details::Service4ModifiedNewsEntryRead(::basictl::tl_istream & s, ::tl2::service4::ModifiedNewsEntry& item) { + if (!::tl2::details::Service4ObjectRead(s, item.object)) { return false; } + if (!s.int_read(item.creation_date)) { return false; } + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.int_read(item.restoration_date)) { return false; } + } else { + item.restoration_date = 0; + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_read(item.deletion_date)) { return false; } + } else { + item.deletion_date = 0; + } + if ((item.fields_mask & (1<<16)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.hidden_by_privacy)) { return false; } + } else { + item.hidden_by_privacy = false; + } + return true; +} + +bool tl2::details::Service4ModifiedNewsEntryWrite(::basictl::tl_ostream & s, const ::tl2::service4::ModifiedNewsEntry& item) { + if (!::tl2::details::Service4ObjectWrite(s, item.object)) { return false; } + if (!s.int_write(item.creation_date)) { return false;} + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.int_write(item.restoration_date)) { return false;} + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_write(item.deletion_date)) { return false;} + } + if ((item.fields_mask & (1<<16)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.hidden_by_privacy)) { return false; } + } + return true; +} + +bool tl2::details::Service4ModifiedNewsEntryReadBoxed(::basictl::tl_istream & s, ::tl2::service4::ModifiedNewsEntry& item) { + if (!s.nat_read_exact_tag(0xda19832a)) { return false; } + return tl2::details::Service4ModifiedNewsEntryRead(s, item); +} + +bool tl2::details::Service4ModifiedNewsEntryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service4::ModifiedNewsEntry& item) { + if (!s.nat_write(0xda19832a)) { return false; } + return tl2::details::Service4ModifiedNewsEntryWrite(s, item); +} + +bool tl2::service4::Object::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service4ObjectRead(s, *this)) { return false; } + return true; +} + +bool tl2::service4::Object::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service4ObjectWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service4::Object::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service4ObjectReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service4::Object::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service4ObjectWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service4ObjectReset(::tl2::service4::Object& item) { + item.type = 0; + item.joint_id.clear(); + item.object_id.clear(); +} + +bool tl2::details::Service4ObjectRead(::basictl::tl_istream & s, ::tl2::service4::Object& item) { + if (!s.int_read(item.type)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.joint_id)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.object_id)) { return false; } + return true; +} + +bool tl2::details::Service4ObjectWrite(::basictl::tl_ostream & s, const ::tl2::service4::Object& item) { + if (!s.int_write(item.type)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.joint_id)) { return false; } + if (!::tl2::details::BuiltinVectorIntWrite(s, item.object_id)) { return false; } + return true; +} + +bool tl2::details::Service4ObjectReadBoxed(::basictl::tl_istream & s, ::tl2::service4::Object& item) { + if (!s.nat_read_exact_tag(0xa6eeca4f)) { return false; } + return tl2::details::Service4ObjectRead(s, item); +} + +bool tl2::details::Service4ObjectWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service4::Object& item) { + if (!s.nat_write(0xa6eeca4f)) { return false; } + return tl2::details::Service4ObjectWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.modifiedNewsEntry.hpp b/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.modifiedNewsEntry.hpp new file mode 100644 index 00000000..15a6ed34 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.modifiedNewsEntry.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "service4.object.hpp" + + +namespace tl2 { namespace service4 { +struct ModifiedNewsEntry { + ::tl2::service4::Object object{}; + int32_t creation_date = 0; + uint32_t fields_mask = 0; + int32_t restoration_date = 0; + int32_t deletion_date = 0; + bool hidden_by_privacy = false; + + std::string_view tl_name() const { return "service4.modifiedNewsEntry"; } + uint32_t tl_tag() const { return 0xda19832a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service4 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.object.hpp b/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.object.hpp new file mode 100644 index 00000000..01ab4565 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service4/types/service4.object.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service4 { +struct Object { + int32_t type = 0; + std::vector joint_id; + std::vector object_id; + + std::string_view tl_name() const { return "service4.object"; } + uint32_t tl_tag() const { return 0xa6eeca4f; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service4 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.Output.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.Output.hpp new file mode 100644 index 00000000..c9b0d703 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.Output.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service5.Output.hpp" + +namespace tl2 { namespace details { + +void Service5OutputReset(::tl2::service5::Output& item); +bool Service5OutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Output& item); +bool Service5OutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Output& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.emptyOutput.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.emptyOutput.hpp new file mode 100644 index 00000000..5dad880e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.emptyOutput.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service5.emptyOutput.hpp" + +namespace tl2 { namespace details { + +void Service5EmptyOutputReset(::tl2::service5::EmptyOutput& item); +bool Service5EmptyOutputRead(::basictl::tl_istream & s, ::tl2::service5::EmptyOutput& item); +bool Service5EmptyOutputWrite(::basictl::tl_ostream & s, const ::tl2::service5::EmptyOutput& item); +bool Service5EmptyOutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::EmptyOutput& item); +bool Service5EmptyOutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::EmptyOutput& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.insert.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.insert.hpp new file mode 100644 index 00000000..a3b8d5c4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.insert.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service5.insert.hpp" +#include "../../types/service5.Output.hpp" + +namespace tl2 { namespace details { + +void Service5InsertReset(::tl2::service5::Insert& item); +bool Service5InsertRead(::basictl::tl_istream & s, ::tl2::service5::Insert& item); +bool Service5InsertWrite(::basictl::tl_ostream & s, const ::tl2::service5::Insert& item); +bool Service5InsertReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Insert& item); +bool Service5InsertWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Insert& item); + +bool Service5InsertReadResult(::basictl::tl_istream & s, ::tl2::service5::Insert& item, ::tl2::service5::Output& result); +bool Service5InsertWriteResult(::basictl::tl_ostream & s, ::tl2::service5::Insert& item, ::tl2::service5::Output& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.params.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.params.hpp new file mode 100644 index 00000000..22cc0890 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.params.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service5.params.hpp" + +namespace tl2 { namespace details { + +void Service5ParamsReset(::tl2::service5::Params& item); +bool Service5ParamsRead(::basictl::tl_istream & s, ::tl2::service5::Params& item); +bool Service5ParamsWrite(::basictl::tl_ostream & s, const ::tl2::service5::Params& item); +bool Service5ParamsReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Params& item); +bool Service5ParamsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Params& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.performQuery.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.performQuery.hpp new file mode 100644 index 00000000..8ce9d051 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.performQuery.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service5.performQuery.hpp" +#include "../../types/service5.Output.hpp" + +namespace tl2 { namespace details { + +void Service5PerformQueryReset(::tl2::service5::PerformQuery& item); +bool Service5PerformQueryRead(::basictl::tl_istream & s, ::tl2::service5::PerformQuery& item); +bool Service5PerformQueryWrite(::basictl::tl_ostream & s, const ::tl2::service5::PerformQuery& item); +bool Service5PerformQueryReadBoxed(::basictl::tl_istream & s, ::tl2::service5::PerformQuery& item); +bool Service5PerformQueryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::PerformQuery& item); + +bool Service5PerformQueryReadResult(::basictl::tl_istream & s, ::tl2::service5::PerformQuery& item, ::tl2::service5::Output& result); +bool Service5PerformQueryWriteResult(::basictl::tl_ostream & s, ::tl2::service5::PerformQuery& item, ::tl2::service5::Output& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.query.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.query.hpp new file mode 100644 index 00000000..7672606a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.query.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service5.query.hpp" +#include "../../types/service5.Output.hpp" + +namespace tl2 { namespace details { + +void Service5QueryReset(::tl2::service5::Query& item); +bool Service5QueryRead(::basictl::tl_istream & s, ::tl2::service5::Query& item); +bool Service5QueryWrite(::basictl::tl_ostream & s, const ::tl2::service5::Query& item); +bool Service5QueryReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Query& item); +bool Service5QueryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Query& item); + +bool Service5QueryReadResult(::basictl::tl_istream & s, ::tl2::service5::Query& item, ::tl2::service5::Output& result); +bool Service5QueryWriteResult(::basictl::tl_ostream & s, ::tl2::service5::Query& item, ::tl2::service5::Output& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.stringOutput.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.stringOutput.hpp new file mode 100644 index 00000000..1c5286f0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/headers/service5.stringOutput.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service5.stringOutput.hpp" + +namespace tl2 { namespace details { + +void Service5StringOutputReset(::tl2::service5::StringOutput& item); +bool Service5StringOutputRead(::basictl::tl_istream & s, ::tl2::service5::StringOutput& item); +bool Service5StringOutputWrite(::basictl::tl_ostream & s, const ::tl2::service5::StringOutput& item); +bool Service5StringOutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::StringOutput& item); +bool Service5StringOutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::StringOutput& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service5/details/namespace_details.cpp new file mode 100644 index 00000000..42a3a217 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/details/namespace_details.cpp @@ -0,0 +1,394 @@ +#include "headers/service5.query.hpp" +#include "headers/service5.performQuery.hpp" +#include "headers/service5.params.hpp" +#include "headers/service5.Output.hpp" +#include "headers/service5.stringOutput.hpp" +#include "headers/service5.insert.hpp" +#include "headers/service5.emptyOutput.hpp" + + +bool tl2::service5::EmptyOutput::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5EmptyOutputRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::EmptyOutput::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5EmptyOutputWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::EmptyOutput::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5EmptyOutputReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::EmptyOutput::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5EmptyOutputWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5EmptyOutputReset(::tl2::service5::EmptyOutput& item) { +} + +bool tl2::details::Service5EmptyOutputRead(::basictl::tl_istream & s, ::tl2::service5::EmptyOutput& item) { + return true; +} + +bool tl2::details::Service5EmptyOutputWrite(::basictl::tl_ostream & s, const ::tl2::service5::EmptyOutput& item) { + return true; +} + +bool tl2::details::Service5EmptyOutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::EmptyOutput& item) { + if (!s.nat_read_exact_tag(0x11e46879)) { return false; } + return tl2::details::Service5EmptyOutputRead(s, item); +} + +bool tl2::details::Service5EmptyOutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::EmptyOutput& item) { + if (!s.nat_write(0x11e46879)) { return false; } + return tl2::details::Service5EmptyOutputWrite(s, item); +} + +bool tl2::service5::Insert::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5InsertRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Insert::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5InsertWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Insert::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5InsertReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Insert::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5InsertWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5InsertReset(::tl2::service5::Insert& item) { + item.table.clear(); + item.data.clear(); +} + +bool tl2::details::Service5InsertRead(::basictl::tl_istream & s, ::tl2::service5::Insert& item) { + if (!s.string_read(item.table)) { return false; } + if (!s.string_read(item.data)) { return false; } + return true; +} + +bool tl2::details::Service5InsertWrite(::basictl::tl_ostream & s, const ::tl2::service5::Insert& item) { + if (!s.string_write(item.table)) { return false;} + if (!s.string_write(item.data)) { return false;} + return true; +} + +bool tl2::details::Service5InsertReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Insert& item) { + if (!s.nat_read_exact_tag(0xc911ee2c)) { return false; } + return tl2::details::Service5InsertRead(s, item); +} + +bool tl2::details::Service5InsertWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Insert& item) { + if (!s.nat_write(0xc911ee2c)) { return false; } + return tl2::details::Service5InsertWrite(s, item); +} + +bool tl2::details::Service5InsertReadResult(::basictl::tl_istream & s, tl2::service5::Insert& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service5InsertWriteResult(::basictl::tl_ostream & s, tl2::service5::Insert& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service5::Insert::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5InsertReadResult(s, *this, result); +} +bool tl2::service5::Insert::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5InsertWriteResult(s, *this, result); +} + +static const std::string_view Service5Output_tbl_tl_name[]{"service5.emptyOutput", "service5.stringOutput"}; +static const uint32_t Service5Output_tbl_tl_tag[]{0x11e46879, 0x179e9863}; + +bool tl2::service5::Output::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5OutputReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::service5::Output::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5OutputWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::service5::Output::tl_name() const { + return Service5Output_tbl_tl_name[value.index()]; +} +uint32_t tl2::service5::Output::tl_tag() const { + return Service5Output_tbl_tl_tag[value.index()]; +} + + +void tl2::details::Service5OutputReset(::tl2::service5::Output& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::Service5OutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Output& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0x11e46879: + if (item.value.index() != 0) { item.value.emplace<0>(); } + break; + case 0x179e9863: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::Service5StringOutputRead(s, std::get<1>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::Service5OutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Output& item) { + s.nat_write(Service5Output_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 1: + if (!::tl2::details::Service5StringOutputWrite(s, std::get<1>(item.value))) { return false; } + break; + } + return true; +} + +bool tl2::service5::Params::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5ParamsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Params::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5ParamsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Params::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5ParamsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Params::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5ParamsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5ParamsReset(::tl2::service5::Params& item) { + item.fields_mask = 0; + item.max_execution_speed = 0; + item.max_execution_speed_bytes = 0; +} + +bool tl2::details::Service5ParamsRead(::basictl::tl_istream & s, ::tl2::service5::Params& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.int_read(item.max_execution_speed)) { return false; } + } else { + item.max_execution_speed = 0; + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_read(item.max_execution_speed_bytes)) { return false; } + } else { + item.max_execution_speed_bytes = 0; + } + return true; +} + +bool tl2::details::Service5ParamsWrite(::basictl::tl_ostream & s, const ::tl2::service5::Params& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.int_write(item.max_execution_speed)) { return false;} + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_write(item.max_execution_speed_bytes)) { return false;} + } + return true; +} + +bool tl2::details::Service5ParamsReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Params& item) { + if (!s.nat_read_exact_tag(0x12ae5cb5)) { return false; } + return tl2::details::Service5ParamsRead(s, item); +} + +bool tl2::details::Service5ParamsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Params& item) { + if (!s.nat_write(0x12ae5cb5)) { return false; } + return tl2::details::Service5ParamsWrite(s, item); +} + +bool tl2::service5::PerformQuery::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5PerformQueryRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::PerformQuery::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5PerformQueryWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::PerformQuery::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5PerformQueryReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::PerformQuery::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5PerformQueryWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5PerformQueryReset(::tl2::service5::PerformQuery& item) { + item.query.clear(); +} + +bool tl2::details::Service5PerformQueryRead(::basictl::tl_istream & s, ::tl2::service5::PerformQuery& item) { + if (!s.string_read(item.query)) { return false; } + return true; +} + +bool tl2::details::Service5PerformQueryWrite(::basictl::tl_ostream & s, const ::tl2::service5::PerformQuery& item) { + if (!s.string_write(item.query)) { return false;} + return true; +} + +bool tl2::details::Service5PerformQueryReadBoxed(::basictl::tl_istream & s, ::tl2::service5::PerformQuery& item) { + if (!s.nat_read_exact_tag(0x019d80a5)) { return false; } + return tl2::details::Service5PerformQueryRead(s, item); +} + +bool tl2::details::Service5PerformQueryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::PerformQuery& item) { + if (!s.nat_write(0x019d80a5)) { return false; } + return tl2::details::Service5PerformQueryWrite(s, item); +} + +bool tl2::details::Service5PerformQueryReadResult(::basictl::tl_istream & s, tl2::service5::PerformQuery& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service5PerformQueryWriteResult(::basictl::tl_ostream & s, tl2::service5::PerformQuery& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service5::PerformQuery::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5PerformQueryReadResult(s, *this, result); +} +bool tl2::service5::PerformQuery::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5PerformQueryWriteResult(s, *this, result); +} + +bool tl2::service5::Query::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5QueryRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Query::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5QueryWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Query::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5QueryReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::Query::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5QueryWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5QueryReset(::tl2::service5::Query& item) { + item.query.clear(); + ::tl2::details::Service5ParamsReset(item.params); +} + +bool tl2::details::Service5QueryRead(::basictl::tl_istream & s, ::tl2::service5::Query& item) { + if (!s.string_read(item.query)) { return false; } + if (!::tl2::details::Service5ParamsRead(s, item.params)) { return false; } + return true; +} + +bool tl2::details::Service5QueryWrite(::basictl::tl_ostream & s, const ::tl2::service5::Query& item) { + if (!s.string_write(item.query)) { return false;} + if (!::tl2::details::Service5ParamsWrite(s, item.params)) { return false; } + return true; +} + +bool tl2::details::Service5QueryReadBoxed(::basictl::tl_istream & s, ::tl2::service5::Query& item) { + if (!s.nat_read_exact_tag(0xb3b62513)) { return false; } + return tl2::details::Service5QueryRead(s, item); +} + +bool tl2::details::Service5QueryWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::Query& item) { + if (!s.nat_write(0xb3b62513)) { return false; } + return tl2::details::Service5QueryWrite(s, item); +} + +bool tl2::details::Service5QueryReadResult(::basictl::tl_istream & s, tl2::service5::Query& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::Service5QueryWriteResult(::basictl::tl_ostream & s, tl2::service5::Query& item, ::tl2::service5::Output& result) { + if (!::tl2::details::Service5OutputWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::service5::Query::read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5QueryReadResult(s, *this, result); +} +bool tl2::service5::Query::write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result) { + return tl2::details::Service5QueryWriteResult(s, *this, result); +} + +bool tl2::service5::StringOutput::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service5StringOutputRead(s, *this)) { return false; } + return true; +} + +bool tl2::service5::StringOutput::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5StringOutputWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service5::StringOutput::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service5StringOutputReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service5::StringOutput::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service5StringOutputWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service5StringOutputReset(::tl2::service5::StringOutput& item) { + item.http_code = 0; + item.response.clear(); +} + +bool tl2::details::Service5StringOutputRead(::basictl::tl_istream & s, ::tl2::service5::StringOutput& item) { + if (!s.int_read(item.http_code)) { return false; } + if (!s.string_read(item.response)) { return false; } + return true; +} + +bool tl2::details::Service5StringOutputWrite(::basictl::tl_ostream & s, const ::tl2::service5::StringOutput& item) { + if (!s.int_write(item.http_code)) { return false;} + if (!s.string_write(item.response)) { return false;} + return true; +} + +bool tl2::details::Service5StringOutputReadBoxed(::basictl::tl_istream & s, ::tl2::service5::StringOutput& item) { + if (!s.nat_read_exact_tag(0x179e9863)) { return false; } + return tl2::details::Service5StringOutputRead(s, item); +} + +bool tl2::details::Service5StringOutputWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service5::StringOutput& item) { + if (!s.nat_write(0x179e9863)) { return false; } + return tl2::details::Service5StringOutputWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.insert.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.insert.hpp new file mode 100644 index 00000000..b06e601b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.insert.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service5.Output.hpp" + + +namespace tl2 { namespace service5 { +struct Insert { + std::string table; + std::string data; + + std::string_view tl_name() const { return "service5.insert"; } + uint32_t tl_tag() const { return 0xc911ee2c; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result); +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.performQuery.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.performQuery.hpp new file mode 100644 index 00000000..bfce5420 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.performQuery.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service5.Output.hpp" + + +namespace tl2 { namespace service5 { +struct PerformQuery { + std::string query; + + std::string_view tl_name() const { return "service5.performQuery"; } + uint32_t tl_tag() const { return 0x019d80a5; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result); +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.query.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.query.hpp new file mode 100644 index 00000000..dffbd4c4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/functions/service5.query.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service5.params.hpp" +#include "../types/service5.Output.hpp" + + +namespace tl2 { namespace service5 { +struct Query { + std::string query; + ::tl2::service5::Params params{}; + + std::string_view tl_name() const { return "service5.query"; } + uint32_t tl_tag() const { return 0xb3b62513; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::service5::Output & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::service5::Output & result); +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.Output.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.Output.hpp new file mode 100644 index 00000000..1a708368 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.Output.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "service5.stringOutput.hpp" +#include "service5.emptyOutput.hpp" + + +namespace tl2 { namespace service5 { +struct Output { + std::variant<::tl2::service5::EmptyOutput, ::tl2::service5::StringOutput> value; + + bool is_empty() const { return value.index() == 0; } + bool is_string() const { return value.index() == 1; } + + void set_empty() { value.emplace<0>(); } + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.emptyOutput.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.emptyOutput.hpp new file mode 100644 index 00000000..60f1633c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.emptyOutput.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service5 { +struct EmptyOutput { + + std::string_view tl_name() const { return "service5.emptyOutput"; } + uint32_t tl_tag() const { return 0x11e46879; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.params.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.params.hpp new file mode 100644 index 00000000..2b02064c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.params.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service5 { +struct Params { + uint32_t fields_mask = 0; + int32_t max_execution_speed = 0; + int32_t max_execution_speed_bytes = 0; + + std::string_view tl_name() const { return "service5.params"; } + uint32_t tl_tag() const { return 0x12ae5cb5; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.stringOutput.hpp b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.stringOutput.hpp new file mode 100644 index 00000000..c48186d0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service5/types/service5.stringOutput.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service5 { +struct StringOutput { + int32_t http_code = 0; + std::string response; + + std::string_view tl_name() const { return "service5.stringOutput"; } + uint32_t tl_tag() const { return 0x179e9863; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service5 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.error.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.error.hpp new file mode 100644 index 00000000..8ece3dbd --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.error.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service6.error.hpp" + +namespace tl2 { namespace details { + +void Service6ErrorReset(::tl2::service6::Error& item); +bool Service6ErrorRead(::basictl::tl_istream & s, ::tl2::service6::Error& item); +bool Service6ErrorWrite(::basictl::tl_ostream & s, const ::tl2::service6::Error& item); +bool Service6ErrorReadBoxed(::basictl::tl_istream & s, ::tl2::service6::Error& item); +bool Service6ErrorWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::Error& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findResultRow.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findResultRow.hpp new file mode 100644 index 00000000..ef709d4c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findResultRow.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service6.findResultRow.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService6FindResultRowReset(std::vector<::tl2::service6::FindResultRow>& item); +bool BuiltinVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item); +bool BuiltinVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service6FindResultRowReset(::tl2::service6::FindResultRow& item); +bool Service6FindResultRowRead(::basictl::tl_istream & s, ::tl2::service6::FindResultRow& item); +bool Service6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::service6::FindResultRow& item); +bool Service6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::service6::FindResultRow& item); +bool Service6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::FindResultRow& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findWithBoundsResult.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findWithBoundsResult.hpp new file mode 100644 index 00000000..924c5926 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.findWithBoundsResult.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/service6.findWithBoundsResult.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorService6FindWithBoundsResultReset(std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool BuiltinVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item); +bool BuiltinVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void Service6FindWithBoundsResultReset(::tl2::service6::FindWithBoundsResult& item); +bool Service6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::service6::FindWithBoundsResult& item); +bool Service6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::service6::FindWithBoundsResult& item); +bool Service6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::service6::FindWithBoundsResult& item); +bool Service6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::FindWithBoundsResult& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFind.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFind.hpp new file mode 100644 index 00000000..a5ff7cfa --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFind.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service6.multiFind.hpp" +#include "../../types/service6.findResultRow.hpp" +#include "../../types/service6.error.hpp" +#include "../../../__common/types/Either.hpp" + +namespace tl2 { namespace details { + +void Service6MultiFindReset(::tl2::service6::MultiFind& item); +bool Service6MultiFindRead(::basictl::tl_istream & s, ::tl2::service6::MultiFind& item); +bool Service6MultiFindWrite(::basictl::tl_ostream & s, const ::tl2::service6::MultiFind& item); +bool Service6MultiFindReadBoxed(::basictl::tl_istream & s, ::tl2::service6::MultiFind& item); +bool Service6MultiFindWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::MultiFind& item); + +bool Service6MultiFindReadResult(::basictl::tl_istream & s, ::tl2::service6::MultiFind& item, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& result); +bool Service6MultiFindWriteResult(::basictl::tl_ostream & s, ::tl2::service6::MultiFind& item, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFindWithBounds.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFindWithBounds.hpp new file mode 100644 index 00000000..2ff4c4ec --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/headers/service6.multiFindWithBounds.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/service6.multiFindWithBounds.hpp" +#include "../../types/service6.findWithBoundsResult.hpp" +#include "../../../__common/types/Either.hpp" + +namespace tl2 { namespace details { + +void Service6MultiFindWithBoundsReset(::tl2::service6::MultiFindWithBounds& item); +bool Service6MultiFindWithBoundsRead(::basictl::tl_istream & s, ::tl2::service6::MultiFindWithBounds& item); +bool Service6MultiFindWithBoundsWrite(::basictl::tl_ostream & s, const ::tl2::service6::MultiFindWithBounds& item); +bool Service6MultiFindWithBoundsReadBoxed(::basictl::tl_istream & s, ::tl2::service6::MultiFindWithBounds& item); +bool Service6MultiFindWithBoundsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::MultiFindWithBounds& item); + +bool Service6MultiFindWithBoundsReadResult(::basictl::tl_istream & s, ::tl2::service6::MultiFindWithBounds& item, std::vector<::tl2::Either>>& result); +bool Service6MultiFindWithBoundsWriteResult(::basictl::tl_ostream & s, ::tl2::service6::MultiFindWithBounds& item, std::vector<::tl2::Either>>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/service6/details/namespace_details.cpp new file mode 100644 index 00000000..8be169ce --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/details/namespace_details.cpp @@ -0,0 +1,316 @@ +#include "headers/service6.multiFindWithBounds.hpp" +#include "headers/service6.multiFind.hpp" +#include "headers/service6.findWithBoundsResult.hpp" +#include "headers/service6.findResultRow.hpp" +#include "headers/service6.error.hpp" +#include "../../__common/details/headers/int.hpp" +#include "../../__independent_types/details/headers/Either.hpp" + + +void tl2::details::BuiltinVectorService6FindResultRowReset(std::vector<::tl2::service6::FindResultRow>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService6FindResultRowRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindResultRow>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service6FindResultRowRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService6FindResultRowWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindResultRow>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service6FindResultRowWrite(s, el)) { return false; } + } + return true; +} + +void tl2::details::BuiltinVectorService6FindWithBoundsResultReset(std::vector<::tl2::service6::FindWithBoundsResult>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorService6FindWithBoundsResultRead(::basictl::tl_istream & s, std::vector<::tl2::service6::FindWithBoundsResult>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::Service6FindWithBoundsResultRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorService6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const std::vector<::tl2::service6::FindWithBoundsResult>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::Service6FindWithBoundsResultWrite(s, el)) { return false; } + } + return true; +} + +bool tl2::service6::Error::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service6ErrorRead(s, *this)) { return false; } + return true; +} + +bool tl2::service6::Error::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6ErrorWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service6::Error::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service6ErrorReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service6::Error::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6ErrorWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service6ErrorReset(::tl2::service6::Error& item) { + item.code = 0; +} + +bool tl2::details::Service6ErrorRead(::basictl::tl_istream & s, ::tl2::service6::Error& item) { + if (!s.int_read(item.code)) { return false; } + return true; +} + +bool tl2::details::Service6ErrorWrite(::basictl::tl_ostream & s, const ::tl2::service6::Error& item) { + if (!s.int_write(item.code)) { return false;} + return true; +} + +bool tl2::details::Service6ErrorReadBoxed(::basictl::tl_istream & s, ::tl2::service6::Error& item) { + if (!s.nat_read_exact_tag(0x738553ef)) { return false; } + return tl2::details::Service6ErrorRead(s, item); +} + +bool tl2::details::Service6ErrorWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::Error& item) { + if (!s.nat_write(0x738553ef)) { return false; } + return tl2::details::Service6ErrorWrite(s, item); +} + +bool tl2::service6::FindResultRow::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service6FindResultRowRead(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindResultRow::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6FindResultRowWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindResultRow::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service6FindResultRowReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindResultRow::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6FindResultRowWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service6FindResultRowReset(::tl2::service6::FindResultRow& item) { + item.x = 0; +} + +bool tl2::details::Service6FindResultRowRead(::basictl::tl_istream & s, ::tl2::service6::FindResultRow& item) { + if (!s.int_read(item.x)) { return false; } + return true; +} + +bool tl2::details::Service6FindResultRowWrite(::basictl::tl_ostream & s, const ::tl2::service6::FindResultRow& item) { + if (!s.int_write(item.x)) { return false;} + return true; +} + +bool tl2::details::Service6FindResultRowReadBoxed(::basictl::tl_istream & s, ::tl2::service6::FindResultRow& item) { + if (!s.nat_read_exact_tag(0xbd3946e3)) { return false; } + return tl2::details::Service6FindResultRowRead(s, item); +} + +bool tl2::details::Service6FindResultRowWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::FindResultRow& item) { + if (!s.nat_write(0xbd3946e3)) { return false; } + return tl2::details::Service6FindResultRowWrite(s, item); +} + +bool tl2::service6::FindWithBoundsResult::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service6FindWithBoundsResultRead(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindWithBoundsResult::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6FindWithBoundsResultWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindWithBoundsResult::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service6FindWithBoundsResultReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service6::FindWithBoundsResult::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6FindWithBoundsResultWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service6FindWithBoundsResultReset(::tl2::service6::FindWithBoundsResult& item) { + item.x = 0; +} + +bool tl2::details::Service6FindWithBoundsResultRead(::basictl::tl_istream & s, ::tl2::service6::FindWithBoundsResult& item) { + if (!s.int_read(item.x)) { return false; } + return true; +} + +bool tl2::details::Service6FindWithBoundsResultWrite(::basictl::tl_ostream & s, const ::tl2::service6::FindWithBoundsResult& item) { + if (!s.int_write(item.x)) { return false;} + return true; +} + +bool tl2::details::Service6FindWithBoundsResultReadBoxed(::basictl::tl_istream & s, ::tl2::service6::FindWithBoundsResult& item) { + if (!s.nat_read_exact_tag(0x3ded850a)) { return false; } + return tl2::details::Service6FindWithBoundsResultRead(s, item); +} + +bool tl2::details::Service6FindWithBoundsResultWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::FindWithBoundsResult& item) { + if (!s.nat_write(0x3ded850a)) { return false; } + return tl2::details::Service6FindWithBoundsResultWrite(s, item); +} + +bool tl2::service6::MultiFind::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service6MultiFindRead(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFind::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6MultiFindWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFind::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service6MultiFindReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFind::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6MultiFindWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service6MultiFindReset(::tl2::service6::MultiFind& item) { + item.clusters.clear(); + item.limit = 0; + item.eq_threshold = 0; +} + +bool tl2::details::Service6MultiFindRead(::basictl::tl_istream & s, ::tl2::service6::MultiFind& item) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.clusters)) { return false; } + if (!s.int_read(item.limit)) { return false; } + if (!s.double_read(item.eq_threshold)) { return false; } + return true; +} + +bool tl2::details::Service6MultiFindWrite(::basictl::tl_ostream & s, const ::tl2::service6::MultiFind& item) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.clusters)) { return false; } + if (!s.int_write(item.limit)) { return false;} + if (!s.double_write(item.eq_threshold)) { return false;} + return true; +} + +bool tl2::details::Service6MultiFindReadBoxed(::basictl::tl_istream & s, ::tl2::service6::MultiFind& item) { + if (!s.nat_read_exact_tag(0xe62178d8)) { return false; } + return tl2::details::Service6MultiFindRead(s, item); +} + +bool tl2::details::Service6MultiFindWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::MultiFind& item) { + if (!s.nat_write(0xe62178d8)) { return false; } + return tl2::details::Service6MultiFindWrite(s, item); +} + +bool tl2::details::Service6MultiFindReadResult(::basictl::tl_istream & s, tl2::service6::MultiFind& item, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowRead(s, result)) { return false; } + return true; +} +bool tl2::details::Service6MultiFindWriteResult(::basictl::tl_ostream & s, tl2::service6::MultiFind& item, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>>& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorEitherService6ErrorVectorService6FindResultRowWrite(s, result)) { return false; } + return true; +} + +bool tl2::service6::MultiFind::read_result(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result) { + return tl2::details::Service6MultiFindReadResult(s, *this, result); +} +bool tl2::service6::MultiFind::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result) { + return tl2::details::Service6MultiFindWriteResult(s, *this, result); +} + +bool tl2::service6::MultiFindWithBounds::read(::basictl::tl_istream & s) { + if (!::tl2::details::Service6MultiFindWithBoundsRead(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFindWithBounds::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6MultiFindWithBoundsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFindWithBounds::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::Service6MultiFindWithBoundsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::service6::MultiFindWithBounds::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::Service6MultiFindWithBoundsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::Service6MultiFindWithBoundsReset(::tl2::service6::MultiFindWithBounds& item) { + item.clusters.clear(); +} + +bool tl2::details::Service6MultiFindWithBoundsRead(::basictl::tl_istream & s, ::tl2::service6::MultiFindWithBounds& item) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.clusters)) { return false; } + return true; +} + +bool tl2::details::Service6MultiFindWithBoundsWrite(::basictl::tl_ostream & s, const ::tl2::service6::MultiFindWithBounds& item) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.clusters)) { return false; } + return true; +} + +bool tl2::details::Service6MultiFindWithBoundsReadBoxed(::basictl::tl_istream & s, ::tl2::service6::MultiFindWithBounds& item) { + if (!s.nat_read_exact_tag(0x84b168cf)) { return false; } + return tl2::details::Service6MultiFindWithBoundsRead(s, item); +} + +bool tl2::details::Service6MultiFindWithBoundsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::service6::MultiFindWithBounds& item) { + if (!s.nat_write(0x84b168cf)) { return false; } + return tl2::details::Service6MultiFindWithBoundsWrite(s, item); +} + +bool tl2::details::Service6MultiFindWithBoundsReadResult(::basictl::tl_istream & s, tl2::service6::MultiFindWithBounds& item, std::vector<::tl2::Either>>& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultRead(s, result)) { return false; } + return true; +} +bool tl2::details::Service6MultiFindWithBoundsWriteResult(::basictl::tl_ostream & s, tl2::service6::MultiFindWithBounds& item, std::vector<::tl2::Either>>& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorEitherIntVectorService6FindWithBoundsResultWrite(s, result)) { return false; } + return true; +} + +bool tl2::service6::MultiFindWithBounds::read_result(::basictl::tl_istream & s, std::vector<::tl2::Either>> & result) { + return tl2::details::Service6MultiFindWithBoundsReadResult(s, *this, result); +} +bool tl2::service6::MultiFindWithBounds::write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either>> & result) { + return tl2::details::Service6MultiFindWithBoundsWriteResult(s, *this, result); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFind.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFind.hpp new file mode 100644 index 00000000..0acd862c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFind.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service6.findResultRow.hpp" +#include "../types/service6.error.hpp" +#include "../../__common/types/Either.hpp" + + +namespace tl2 { namespace service6 { +struct MultiFind { + std::vector clusters; + int32_t limit = 0; + double eq_threshold = 0; + + std::string_view tl_name() const { return "service6.multiFind"; } + uint32_t tl_tag() const { return 0xe62178d8; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result); + bool write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either<::tl2::service6::Error, std::vector<::tl2::service6::FindResultRow>>> & result); +}; + +}} // namespace tl2::service6 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFindWithBounds.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFindWithBounds.hpp new file mode 100644 index 00000000..8486c95a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/functions/service6.multiFindWithBounds.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/service6.findWithBoundsResult.hpp" +#include "../../__common/types/Either.hpp" + + +namespace tl2 { namespace service6 { +struct MultiFindWithBounds { + std::vector clusters; + + std::string_view tl_name() const { return "service6.multiFindWithBounds"; } + uint32_t tl_tag() const { return 0x84b168cf; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector<::tl2::Either>> & result); + bool write_result(::basictl::tl_ostream & s, std::vector<::tl2::Either>> & result); +}; + +}} // namespace tl2::service6 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.error.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.error.hpp new file mode 100644 index 00000000..c67abbe1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.error.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service6 { +struct Error { + int32_t code = 0; + + std::string_view tl_name() const { return "service6.error"; } + uint32_t tl_tag() const { return 0x738553ef; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service6 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findResultRow.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findResultRow.hpp new file mode 100644 index 00000000..4d9f41c7 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findResultRow.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service6 { +struct FindResultRow { + int32_t x = 0; + + std::string_view tl_name() const { return "service6.findResultRow"; } + uint32_t tl_tag() const { return 0xbd3946e3; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service6 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findWithBoundsResult.hpp b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findWithBoundsResult.hpp new file mode 100644 index 00000000..711fb5eb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/service6/types/service6.findWithBoundsResult.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace service6 { +struct FindWithBoundsResult { + int32_t x = 0; + + std::string_view tl_name() const { return "service6.findWithBoundsResult"; } + uint32_t tl_tag() const { return 0x3ded850a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::service6 + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatus.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatus.hpp new file mode 100644 index 00000000..ff84c068 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatus.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.TaskStatus.hpp" + +namespace tl2 { namespace details { + +void TasksTaskStatusReset(::tl2::tasks::TaskStatus& item); +bool TasksTaskStatusReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatus& item); +bool TasksTaskStatusWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatus& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatusItems.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatusItems.hpp new file mode 100644 index 00000000..3eaf471c --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.TaskStatusItems.hpp @@ -0,0 +1,45 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.TaskStatusItems.hpp" + +namespace tl2 { namespace details { + +void TasksTaskStatusInProgressReset(::tl2::tasks::TaskStatusInProgress& item); +bool TasksTaskStatusInProgressRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusInProgress& item); +bool TasksTaskStatusInProgressWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusInProgress& item); +bool TasksTaskStatusInProgressReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusInProgress& item); +bool TasksTaskStatusInProgressWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusInProgress& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TasksTaskStatusNotCurrentlyInEngineReset(::tl2::tasks::TaskStatusNotCurrentlyInEngine& item); +bool TasksTaskStatusNotCurrentlyInEngineRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item); +bool TasksTaskStatusNotCurrentlyInEngineWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item); +bool TasksTaskStatusNotCurrentlyInEngineReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item); +bool TasksTaskStatusNotCurrentlyInEngineWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TasksTaskStatusScheduledReset(::tl2::tasks::TaskStatusScheduled& item); +bool TasksTaskStatusScheduledRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusScheduled& item); +bool TasksTaskStatusScheduledWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusScheduled& item); +bool TasksTaskStatusScheduledReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusScheduled& item); +bool TasksTaskStatusScheduledWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusScheduled& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TasksTaskStatusWaitingReset(::tl2::tasks::TaskStatusWaiting& item); +bool TasksTaskStatusWaitingRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusWaiting& item); +bool TasksTaskStatusWaitingWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusWaiting& item); +bool TasksTaskStatusWaitingReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusWaiting& item); +bool TasksTaskStatusWaitingWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusWaiting& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.addTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.addTask.hpp new file mode 100644 index 00000000..22eef219 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.addTask.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/tasks.addTask.hpp" + +namespace tl2 { namespace details { + +void TasksAddTaskReset(::tl2::tasks::AddTask& item); +bool TasksAddTaskRead(::basictl::tl_istream & s, ::tl2::tasks::AddTask& item); +bool TasksAddTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::AddTask& item); +bool TasksAddTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::AddTask& item); +bool TasksAddTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::AddTask& item); + +bool TasksAddTaskReadResult(::basictl::tl_istream & s, ::tl2::tasks::AddTask& item, int64_t& result); +bool TasksAddTaskWriteResult(::basictl::tl_ostream & s, ::tl2::tasks::AddTask& item, int64_t& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTask.hpp new file mode 100644 index 00000000..05ede983 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTask.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.cronTask.hpp" + +namespace tl2 { namespace details { + +void TasksCronTaskReset(::tl2::tasks::CronTask& item); +bool TasksCronTaskRead(::basictl::tl_istream & s, ::tl2::tasks::CronTask& item); +bool TasksCronTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTask& item); +bool TasksCronTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTask& item); +bool TasksCronTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTask& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTaskWithId.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTaskWithId.hpp new file mode 100644 index 00000000..8667868f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTaskWithId.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.cronTaskWithId.hpp" + +namespace tl2 { namespace details { + +void TasksCronTaskWithIdReset(::tl2::tasks::CronTaskWithId& item); +bool TasksCronTaskWithIdRead(::basictl::tl_istream & s, ::tl2::tasks::CronTaskWithId& item); +bool TasksCronTaskWithIdWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTaskWithId& item); +bool TasksCronTaskWithIdReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTaskWithId& item); +bool TasksCronTaskWithIdWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTaskWithId& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTime.hpp new file mode 100644 index 00000000..7ae5d82f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.cronTime.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.cronTime.hpp" + +namespace tl2 { namespace details { + +void TasksCronTimeReset(::tl2::tasks::CronTime& item); +bool TasksCronTimeRead(::basictl::tl_istream & s, ::tl2::tasks::CronTime& item); +bool TasksCronTimeWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTime& item); +bool TasksCronTimeReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTime& item); +bool TasksCronTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTime& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getAnyTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getAnyTask.hpp new file mode 100644 index 00000000..28d64ae1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getAnyTask.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/tasks.getAnyTask.hpp" +#include "../../types/tasks.taskInfo.hpp" + +namespace tl2 { namespace details { + +void TasksGetAnyTaskReset(::tl2::tasks::GetAnyTask& item); +bool TasksGetAnyTaskRead(::basictl::tl_istream & s, ::tl2::tasks::GetAnyTask& item); +bool TasksGetAnyTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetAnyTask& item); +bool TasksGetAnyTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetAnyTask& item); +bool TasksGetAnyTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetAnyTask& item); + +bool TasksGetAnyTaskReadResult(::basictl::tl_istream & s, ::tl2::tasks::GetAnyTask& item, std::optional<::tl2::tasks::TaskInfo>& result); +bool TasksGetAnyTaskWriteResult(::basictl::tl_ostream & s, ::tl2::tasks::GetAnyTask& item, std::optional<::tl2::tasks::TaskInfo>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueSize.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueSize.hpp new file mode 100644 index 00000000..73993db0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueSize.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/tasks.getQueueSize.hpp" +#include "../../types/tasks.queueStats.hpp" + +namespace tl2 { namespace details { + +void TasksGetQueueSizeReset(::tl2::tasks::GetQueueSize& item); +bool TasksGetQueueSizeRead(::basictl::tl_istream & s, ::tl2::tasks::GetQueueSize& item); +bool TasksGetQueueSizeWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueSize& item); +bool TasksGetQueueSizeReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetQueueSize& item); +bool TasksGetQueueSizeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueSize& item); + +bool TasksGetQueueSizeReadResult(::basictl::tl_istream & s, ::tl2::tasks::GetQueueSize& item, ::tl2::tasks::QueueStats& result); +bool TasksGetQueueSizeWriteResult(::basictl::tl_ostream & s, ::tl2::tasks::GetQueueSize& item, ::tl2::tasks::QueueStats& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueTypes.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueTypes.hpp new file mode 100644 index 00000000..2f684ce1 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getQueueTypes.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/tasks.getQueueTypes.hpp" +#include "../../types/tasks.queueTypeInfo.hpp" + +namespace tl2 { namespace details { + +void TasksGetQueueTypesReset(::tl2::tasks::GetQueueTypes& item); +bool TasksGetQueueTypesRead(::basictl::tl_istream & s, ::tl2::tasks::GetQueueTypes& item); +bool TasksGetQueueTypesWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueTypes& item); +bool TasksGetQueueTypesReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetQueueTypes& item); +bool TasksGetQueueTypesWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueTypes& item); + +bool TasksGetQueueTypesReadResult(::basictl::tl_istream & s, ::tl2::tasks::GetQueueTypes& item, std::vector<::tl2::tasks::QueueTypeInfo>& result); +bool TasksGetQueueTypesWriteResult(::basictl::tl_ostream & s, ::tl2::tasks::GetQueueTypes& item, std::vector<::tl2::tasks::QueueTypeInfo>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getTaskFromQueue.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getTaskFromQueue.hpp new file mode 100644 index 00000000..cb13daeb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.getTaskFromQueue.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/tasks.getTaskFromQueue.hpp" +#include "../../types/tasks.taskInfo.hpp" + +namespace tl2 { namespace details { + +void TasksGetTaskFromQueueReset(::tl2::tasks::GetTaskFromQueue& item); +bool TasksGetTaskFromQueueRead(::basictl::tl_istream & s, ::tl2::tasks::GetTaskFromQueue& item); +bool TasksGetTaskFromQueueWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetTaskFromQueue& item); +bool TasksGetTaskFromQueueReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetTaskFromQueue& item); +bool TasksGetTaskFromQueueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetTaskFromQueue& item); + +bool TasksGetTaskFromQueueReadResult(::basictl::tl_istream & s, ::tl2::tasks::GetTaskFromQueue& item, std::optional<::tl2::tasks::TaskInfo>& result); +bool TasksGetTaskFromQueueWriteResult(::basictl::tl_ostream & s, ::tl2::tasks::GetTaskFromQueue& item, std::optional<::tl2::tasks::TaskInfo>& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueStats.hpp new file mode 100644 index 00000000..2cd539bb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueStats.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.queueStats.hpp" + +namespace tl2 { namespace details { + +void TasksQueueStatsReset(::tl2::tasks::QueueStats& item); +bool TasksQueueStatsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask); +bool TasksQueueStatsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask); +bool TasksQueueStatsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask); +bool TasksQueueStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeInfo.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeInfo.hpp new file mode 100644 index 00000000..28e04072 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeInfo.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.queueTypeInfo.hpp" + +namespace tl2 { namespace details { + +void BuiltinVectorTasksQueueTypeInfoReset(std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool BuiltinVectorTasksQueueTypeInfoRead(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item); +bool BuiltinVectorTasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +void TasksQueueTypeInfoReset(::tl2::tasks::QueueTypeInfo& item); +bool TasksQueueTypeInfoRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeInfo& item); +bool TasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeInfo& item); +bool TasksQueueTypeInfoReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeInfo& item); +bool TasksQueueTypeInfoWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeInfo& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeSettings.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeSettings.hpp new file mode 100644 index 00000000..7f8a2ed4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeSettings.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.queueTypeSettings.hpp" + +namespace tl2 { namespace details { + +void TasksQueueTypeSettingsReset(::tl2::tasks::QueueTypeSettings& item); +bool TasksQueueTypeSettingsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeSettings& item); +bool TasksQueueTypeSettingsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeSettings& item); +bool TasksQueueTypeSettingsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeSettings& item); +bool TasksQueueTypeSettingsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeSettings& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeStats.hpp new file mode 100644 index 00000000..739bedec --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.queueTypeStats.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.queueTypeStats.hpp" + +namespace tl2 { namespace details { + +void TasksQueueTypeStatsReset(::tl2::tasks::QueueTypeStats& item); +bool TasksQueueTypeStatsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats& item); +bool TasksQueueTypeStatsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeStats& item); +bool TasksQueueTypeStatsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats& item); +bool TasksQueueTypeStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeStats& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.task.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.task.hpp new file mode 100644 index 00000000..309a3a62 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.task.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.task.hpp" + +namespace tl2 { namespace details { + +void TasksTaskReset(::tl2::tasks::Task& item); +bool TasksTaskRead(::basictl::tl_istream & s, ::tl2::tasks::Task& item); +bool TasksTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::Task& item); +bool TasksTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::Task& item); +bool TasksTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::Task& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.taskInfo.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.taskInfo.hpp new file mode 100644 index 00000000..ca73bfe8 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/headers/tasks.taskInfo.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tasks.taskInfo.hpp" + +namespace tl2 { namespace details { + +void TasksTaskInfoReset(::tl2::tasks::TaskInfo& item); +bool TasksTaskInfoRead(::basictl::tl_istream & s, ::tl2::tasks::TaskInfo& item); +bool TasksTaskInfoWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskInfo& item); +bool TasksTaskInfoReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskInfo& item); +bool TasksTaskInfoWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskInfo& item); + +}} // namespace tl2::details + +namespace tl2 { namespace details { + +bool TasksTaskInfoMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo>& item); +bool TasksTaskInfoMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::tasks::TaskInfo>& item); + + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/namespace_details.cpp new file mode 100644 index 00000000..620a44cb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/details/namespace_details.cpp @@ -0,0 +1,1262 @@ +#include "headers/tasks.TaskStatus.hpp" +#include "headers/tasks.TaskStatusItems.hpp" +#include "headers/tasks.taskInfo.hpp" +#include "headers/tasks.queueTypeInfo.hpp" +#include "headers/tasks.queueTypeSettings.hpp" +#include "headers/tasks.queueStats.hpp" +#include "headers/tasks.getTaskFromQueue.hpp" +#include "headers/tasks.getQueueTypes.hpp" +#include "headers/tasks.getQueueSize.hpp" +#include "headers/tasks.getAnyTask.hpp" +#include "headers/tasks.cronTaskWithId.hpp" +#include "headers/tasks.cronTask.hpp" +#include "headers/tasks.cronTime.hpp" +#include "headers/tasks.addTask.hpp" +#include "headers/tasks.task.hpp" +#include "headers/tasks.queueTypeStats.hpp" +#include "../../__common/details/headers/int.hpp" +#include "../../__common/details/headers/Bool.hpp" + + +void tl2::details::BuiltinVectorTasksQueueTypeInfoReset(std::vector<::tl2::tasks::QueueTypeInfo>& item) { + item.resize(0); // TODO - unwrap +} + +bool tl2::details::BuiltinVectorTasksQueueTypeInfoRead(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo>& item) { + uint32_t len = 0; + if (!s.nat_read(len)) { return false; } + // TODO - check length sanity + item.resize(len); + for(auto && el : item) { + if (!::tl2::details::TasksQueueTypeInfoRead(s, el)) { return false; } + } + return true; +} + +bool tl2::details::BuiltinVectorTasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const std::vector<::tl2::tasks::QueueTypeInfo>& item) { + if (!s.nat_write(item.size())) { return false; } + for(const auto & el : item) { + if (!::tl2::details::TasksQueueTypeInfoWrite(s, el)) { return false; } + } + return true; +} + +bool tl2::tasks::AddTask::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksAddTaskRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::AddTask::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksAddTaskWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::AddTask::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksAddTaskReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::AddTask::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksAddTaskWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksAddTaskReset(::tl2::tasks::AddTask& item) { + item.type_name.clear(); + item.queue_id.clear(); + ::tl2::details::TasksTaskReset(item.task); +} + +bool tl2::details::TasksAddTaskRead(::basictl::tl_istream & s, ::tl2::tasks::AddTask& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskRead(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksAddTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::AddTask& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskWrite(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksAddTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::AddTask& item) { + if (!s.nat_read_exact_tag(0x2ca073d5)) { return false; } + return tl2::details::TasksAddTaskRead(s, item); +} + +bool tl2::details::TasksAddTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::AddTask& item) { + if (!s.nat_write(0x2ca073d5)) { return false; } + return tl2::details::TasksAddTaskWrite(s, item); +} + +bool tl2::details::TasksAddTaskReadResult(::basictl::tl_istream & s, tl2::tasks::AddTask& item, int64_t& result) { + if (!s.nat_read_exact_tag(0x22076cba)) { return false;} + if (!s.long_read(result)) { return false; } + return true; +} +bool tl2::details::TasksAddTaskWriteResult(::basictl::tl_ostream & s, tl2::tasks::AddTask& item, int64_t& result) { + if (!s.nat_write(0x22076cba)) { return false; } + if (!s.long_write(result)) { return false;} + return true; +} + +bool tl2::tasks::AddTask::read_result(::basictl::tl_istream & s, int64_t & result) { + return tl2::details::TasksAddTaskReadResult(s, *this, result); +} +bool tl2::tasks::AddTask::write_result(::basictl::tl_ostream & s, int64_t & result) { + return tl2::details::TasksAddTaskWriteResult(s, *this, result); +} + +bool tl2::tasks::CronTask::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTaskRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTask::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTaskWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTask::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTaskReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTask::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTaskWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksCronTaskReset(::tl2::tasks::CronTask& item) { + item.type_name.clear(); + item.queue_id.clear(); + ::tl2::details::TasksTaskReset(item.task); + ::tl2::details::TasksCronTimeReset(item.time); +} + +bool tl2::details::TasksCronTaskRead(::basictl::tl_istream & s, ::tl2::tasks::CronTask& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskRead(s, item.task)) { return false; } + if (!::tl2::details::TasksCronTimeRead(s, item.time)) { return false; } + return true; +} + +bool tl2::details::TasksCronTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTask& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskWrite(s, item.task)) { return false; } + if (!::tl2::details::TasksCronTimeWrite(s, item.time)) { return false; } + return true; +} + +bool tl2::details::TasksCronTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTask& item) { + if (!s.nat_read_exact_tag(0xc90cf28a)) { return false; } + return tl2::details::TasksCronTaskRead(s, item); +} + +bool tl2::details::TasksCronTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTask& item) { + if (!s.nat_write(0xc90cf28a)) { return false; } + return tl2::details::TasksCronTaskWrite(s, item); +} + +bool tl2::tasks::CronTaskWithId::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTaskWithIdRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTaskWithId::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTaskWithIdWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTaskWithId::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTaskWithIdReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTaskWithId::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTaskWithIdWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksCronTaskWithIdReset(::tl2::tasks::CronTaskWithId& item) { + item.id = 0; + item.next_time = 0; + ::tl2::details::TasksCronTaskReset(item.task); +} + +bool tl2::details::TasksCronTaskWithIdRead(::basictl::tl_istream & s, ::tl2::tasks::CronTaskWithId& item) { + if (!s.int_read(item.id)) { return false; } + if (!s.int_read(item.next_time)) { return false; } + if (!::tl2::details::TasksCronTaskRead(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksCronTaskWithIdWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTaskWithId& item) { + if (!s.int_write(item.id)) { return false;} + if (!s.int_write(item.next_time)) { return false;} + if (!::tl2::details::TasksCronTaskWrite(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksCronTaskWithIdReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTaskWithId& item) { + if (!s.nat_read_exact_tag(0x3a958001)) { return false; } + return tl2::details::TasksCronTaskWithIdRead(s, item); +} + +bool tl2::details::TasksCronTaskWithIdWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTaskWithId& item) { + if (!s.nat_write(0x3a958001)) { return false; } + return tl2::details::TasksCronTaskWithIdWrite(s, item); +} + +bool tl2::tasks::CronTime::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTimeRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTime::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTimeWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTime::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksCronTimeReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::CronTime::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksCronTimeWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksCronTimeReset(::tl2::tasks::CronTime& item) { + item.fields_mask = 0; + item.seconds.clear(); + item.minutes.clear(); + item.hours.clear(); + item.days_of_week.clear(); + item.days.clear(); + item.months.clear(); +} + +bool tl2::details::TasksCronTimeRead(::basictl::tl_istream & s, ::tl2::tasks::CronTime& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.seconds)) { return false; } + } else { + item.seconds.clear(); + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.minutes)) { return false; } + } else { + item.minutes.clear(); + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.hours)) { return false; } + } else { + item.hours.clear(); + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.days_of_week)) { return false; } + } else { + item.days_of_week.clear(); + } + if ((item.fields_mask & (1<<4)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.days)) { return false; } + } else { + item.days.clear(); + } + if ((item.fields_mask & (1<<5)) != 0) { + if (!::tl2::details::BuiltinVectorIntRead(s, item.months)) { return false; } + } else { + item.months.clear(); + } + return true; +} + +bool tl2::details::TasksCronTimeWrite(::basictl::tl_ostream & s, const ::tl2::tasks::CronTime& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.seconds)) { return false; } + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.minutes)) { return false; } + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.hours)) { return false; } + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.days_of_week)) { return false; } + } + if ((item.fields_mask & (1<<4)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.days)) { return false; } + } + if ((item.fields_mask & (1<<5)) != 0) { + if (!::tl2::details::BuiltinVectorIntWrite(s, item.months)) { return false; } + } + return true; +} + +bool tl2::details::TasksCronTimeReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::CronTime& item) { + if (!s.nat_read_exact_tag(0xd4177d7f)) { return false; } + return tl2::details::TasksCronTimeRead(s, item); +} + +bool tl2::details::TasksCronTimeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::CronTime& item) { + if (!s.nat_write(0xd4177d7f)) { return false; } + return tl2::details::TasksCronTimeWrite(s, item); +} + +bool tl2::tasks::GetAnyTask::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetAnyTaskRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetAnyTask::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetAnyTaskWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetAnyTask::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetAnyTaskReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetAnyTask::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetAnyTaskWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksGetAnyTaskReset(::tl2::tasks::GetAnyTask& item) { +} + +bool tl2::details::TasksGetAnyTaskRead(::basictl::tl_istream & s, ::tl2::tasks::GetAnyTask& item) { + return true; +} + +bool tl2::details::TasksGetAnyTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetAnyTask& item) { + return true; +} + +bool tl2::details::TasksGetAnyTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetAnyTask& item) { + if (!s.nat_read_exact_tag(0x4a9c7dbb)) { return false; } + return tl2::details::TasksGetAnyTaskRead(s, item); +} + +bool tl2::details::TasksGetAnyTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetAnyTask& item) { + if (!s.nat_write(0x4a9c7dbb)) { return false; } + return tl2::details::TasksGetAnyTaskWrite(s, item); +} + +bool tl2::details::TasksGetAnyTaskReadResult(::basictl::tl_istream & s, tl2::tasks::GetAnyTask& item, std::optional<::tl2::tasks::TaskInfo>& result) { + if (!::tl2::details::TasksTaskInfoMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::TasksGetAnyTaskWriteResult(::basictl::tl_ostream & s, tl2::tasks::GetAnyTask& item, std::optional<::tl2::tasks::TaskInfo>& result) { + if (!::tl2::details::TasksTaskInfoMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::tasks::GetAnyTask::read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result) { + return tl2::details::TasksGetAnyTaskReadResult(s, *this, result); +} +bool tl2::tasks::GetAnyTask::write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result) { + return tl2::details::TasksGetAnyTaskWriteResult(s, *this, result); +} + +bool tl2::tasks::GetQueueSize::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetQueueSizeRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueSize::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetQueueSizeWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueSize::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetQueueSizeReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueSize::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetQueueSizeWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksGetQueueSizeReset(::tl2::tasks::GetQueueSize& item) { + item.type_name.clear(); + item.queue_id.clear(); + item.fields_mask = 0; +} + +bool tl2::details::TasksGetQueueSizeRead(::basictl::tl_istream & s, ::tl2::tasks::GetQueueSize& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.queue_id)) { return false; } + if (!s.nat_read(item.fields_mask)) { return false; } + return true; +} + +bool tl2::details::TasksGetQueueSizeWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueSize& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.queue_id)) { return false; } + if (!s.nat_write(item.fields_mask)) { return false;} + return true; +} + +bool tl2::details::TasksGetQueueSizeReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetQueueSize& item) { + if (!s.nat_read_exact_tag(0xd8fcda03)) { return false; } + return tl2::details::TasksGetQueueSizeRead(s, item); +} + +bool tl2::details::TasksGetQueueSizeWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueSize& item) { + if (!s.nat_write(0xd8fcda03)) { return false; } + return tl2::details::TasksGetQueueSizeWrite(s, item); +} + +bool tl2::details::TasksGetQueueSizeReadResult(::basictl::tl_istream & s, tl2::tasks::GetQueueSize& item, ::tl2::tasks::QueueStats& result) { + if (!::tl2::details::TasksQueueStatsReadBoxed(s, result, item.fields_mask)) { return false; } + return true; +} +bool tl2::details::TasksGetQueueSizeWriteResult(::basictl::tl_ostream & s, tl2::tasks::GetQueueSize& item, ::tl2::tasks::QueueStats& result) { + if (!::tl2::details::TasksQueueStatsWriteBoxed(s, result, item.fields_mask)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueSize::read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueStats & result) { + return tl2::details::TasksGetQueueSizeReadResult(s, *this, result); +} +bool tl2::tasks::GetQueueSize::write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueStats & result) { + return tl2::details::TasksGetQueueSizeWriteResult(s, *this, result); +} + +bool tl2::tasks::GetQueueTypes::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetQueueTypesRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueTypes::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetQueueTypesWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueTypes::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetQueueTypesReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueTypes::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetQueueTypesWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksGetQueueTypesReset(::tl2::tasks::GetQueueTypes& item) { + item.settings_mask = 0; + item.stats_mask = 0; +} + +bool tl2::details::TasksGetQueueTypesRead(::basictl::tl_istream & s, ::tl2::tasks::GetQueueTypes& item) { + if (!s.nat_read(item.settings_mask)) { return false; } + if (!s.nat_read(item.stats_mask)) { return false; } + return true; +} + +bool tl2::details::TasksGetQueueTypesWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueTypes& item) { + if (!s.nat_write(item.settings_mask)) { return false;} + if (!s.nat_write(item.stats_mask)) { return false;} + return true; +} + +bool tl2::details::TasksGetQueueTypesReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetQueueTypes& item) { + if (!s.nat_read_exact_tag(0x5434457a)) { return false; } + return tl2::details::TasksGetQueueTypesRead(s, item); +} + +bool tl2::details::TasksGetQueueTypesWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetQueueTypes& item) { + if (!s.nat_write(0x5434457a)) { return false; } + return tl2::details::TasksGetQueueTypesWrite(s, item); +} + +bool tl2::details::TasksGetQueueTypesReadResult(::basictl::tl_istream & s, tl2::tasks::GetQueueTypes& item, std::vector<::tl2::tasks::QueueTypeInfo>& result) { + if (!s.nat_read_exact_tag(0x1cb5c415)) { return false;} + if (!::tl2::details::BuiltinVectorTasksQueueTypeInfoRead(s, result)) { return false; } + return true; +} +bool tl2::details::TasksGetQueueTypesWriteResult(::basictl::tl_ostream & s, tl2::tasks::GetQueueTypes& item, std::vector<::tl2::tasks::QueueTypeInfo>& result) { + if (!s.nat_write(0x1cb5c415)) { return false; } + if (!::tl2::details::BuiltinVectorTasksQueueTypeInfoWrite(s, result)) { return false; } + return true; +} + +bool tl2::tasks::GetQueueTypes::read_result(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result) { + return tl2::details::TasksGetQueueTypesReadResult(s, *this, result); +} +bool tl2::tasks::GetQueueTypes::write_result(::basictl::tl_ostream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result) { + return tl2::details::TasksGetQueueTypesWriteResult(s, *this, result); +} + +bool tl2::tasks::GetTaskFromQueue::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetTaskFromQueueRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetTaskFromQueue::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetTaskFromQueueWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetTaskFromQueue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksGetTaskFromQueueReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::GetTaskFromQueue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksGetTaskFromQueueWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksGetTaskFromQueueReset(::tl2::tasks::GetTaskFromQueue& item) { + item.type_name.clear(); + item.queue_id.clear(); +} + +bool tl2::details::TasksGetTaskFromQueueRead(::basictl::tl_istream & s, ::tl2::tasks::GetTaskFromQueue& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.queue_id)) { return false; } + return true; +} + +bool tl2::details::TasksGetTaskFromQueueWrite(::basictl::tl_ostream & s, const ::tl2::tasks::GetTaskFromQueue& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.queue_id)) { return false; } + return true; +} + +bool tl2::details::TasksGetTaskFromQueueReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::GetTaskFromQueue& item) { + if (!s.nat_read_exact_tag(0x6a52b698)) { return false; } + return tl2::details::TasksGetTaskFromQueueRead(s, item); +} + +bool tl2::details::TasksGetTaskFromQueueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::GetTaskFromQueue& item) { + if (!s.nat_write(0x6a52b698)) { return false; } + return tl2::details::TasksGetTaskFromQueueWrite(s, item); +} + +bool tl2::details::TasksGetTaskFromQueueReadResult(::basictl::tl_istream & s, tl2::tasks::GetTaskFromQueue& item, std::optional<::tl2::tasks::TaskInfo>& result) { + if (!::tl2::details::TasksTaskInfoMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::TasksGetTaskFromQueueWriteResult(::basictl::tl_ostream & s, tl2::tasks::GetTaskFromQueue& item, std::optional<::tl2::tasks::TaskInfo>& result) { + if (!::tl2::details::TasksTaskInfoMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::tasks::GetTaskFromQueue::read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result) { + return tl2::details::TasksGetTaskFromQueueReadResult(s, *this, result); +} +bool tl2::tasks::GetTaskFromQueue::write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result) { + return tl2::details::TasksGetTaskFromQueueWriteResult(s, *this, result); +} + +bool tl2::tasks::QueueStats::read(::basictl::tl_istream & s, uint32_t nat_fields_mask) { + if (!::tl2::details::TasksQueueStatsRead(s, *this, nat_fields_mask)) { return false; } + return true; +} + +bool tl2::tasks::QueueStats::write(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const { + if (!::tl2::details::TasksQueueStatsWrite(s, *this, nat_fields_mask)) { return false; } + return true; +} + +bool tl2::tasks::QueueStats::read_boxed(::basictl::tl_istream & s, uint32_t nat_fields_mask) { + if (!::tl2::details::TasksQueueStatsReadBoxed(s, *this, nat_fields_mask)) { return false; } + return true; +} + +bool tl2::tasks::QueueStats::write_boxed(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const { + if (!::tl2::details::TasksQueueStatsWriteBoxed(s, *this, nat_fields_mask)) { return false; } + return true; +} + +void tl2::details::TasksQueueStatsReset(::tl2::tasks::QueueStats& item) { + item.waiting_size = 0; + item.scheduled_size = 0; + item.in_progress_size = 0; +} + +bool tl2::details::TasksQueueStatsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask) { + if ((nat_fields_mask & (1<<0)) != 0) { + if (!s.int_read(item.waiting_size)) { return false; } + } else { + item.waiting_size = 0; + } + if ((nat_fields_mask & (1<<1)) != 0) { + if (!s.int_read(item.scheduled_size)) { return false; } + } else { + item.scheduled_size = 0; + } + if ((nat_fields_mask & (1<<2)) != 0) { + if (!s.int_read(item.in_progress_size)) { return false; } + } else { + item.in_progress_size = 0; + } + return true; +} + +bool tl2::details::TasksQueueStatsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask) { + if ((nat_fields_mask & (1<<0)) != 0) { + if (!s.int_write(item.waiting_size)) { return false;} + } + if ((nat_fields_mask & (1<<1)) != 0) { + if (!s.int_write(item.scheduled_size)) { return false;} + } + if ((nat_fields_mask & (1<<2)) != 0) { + if (!s.int_write(item.in_progress_size)) { return false;} + } + return true; +} + +bool tl2::details::TasksQueueStatsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask) { + if (!s.nat_read_exact_tag(0x1d942543)) { return false; } + return tl2::details::TasksQueueStatsRead(s, item, nat_fields_mask); +} + +bool tl2::details::TasksQueueStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueStats& item, uint32_t nat_fields_mask) { + if (!s.nat_write(0x1d942543)) { return false; } + return tl2::details::TasksQueueStatsWrite(s, item, nat_fields_mask); +} + +bool tl2::tasks::QueueTypeInfo::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeInfoRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeInfo::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeInfoWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeInfo::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeInfoReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeInfo::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeInfoWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksQueueTypeInfoReset(::tl2::tasks::QueueTypeInfo& item) { + item.type_name.clear(); + ::tl2::details::TasksQueueTypeSettingsReset(item.settings); + ::tl2::details::TasksQueueTypeStatsReset(item.stats); +} + +bool tl2::details::TasksQueueTypeInfoRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeInfo& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::TasksQueueTypeSettingsRead(s, item.settings)) { return false; } + if (!::tl2::details::TasksQueueTypeStatsRead(s, item.stats)) { return false; } + return true; +} + +bool tl2::details::TasksQueueTypeInfoWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeInfo& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::TasksQueueTypeSettingsWrite(s, item.settings)) { return false; } + if (!::tl2::details::TasksQueueTypeStatsWrite(s, item.stats)) { return false; } + return true; +} + +bool tl2::details::TasksQueueTypeInfoReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeInfo& item) { + if (!s.nat_read_exact_tag(0x38d38d3e)) { return false; } + return tl2::details::TasksQueueTypeInfoRead(s, item); +} + +bool tl2::details::TasksQueueTypeInfoWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeInfo& item) { + if (!s.nat_write(0x38d38d3e)) { return false; } + return tl2::details::TasksQueueTypeInfoWrite(s, item); +} + +bool tl2::tasks::QueueTypeSettings::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeSettingsRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeSettings::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeSettingsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeSettings::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeSettingsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeSettings::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeSettingsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksQueueTypeSettingsReset(::tl2::tasks::QueueTypeSettings& item) { + item.fields_mask = 0; + item.is_enabled = false; + item.is_persistent = false; + item.priority = 0; + item.default_retry_time = 0; + item.default_retry_num = 0; + item.move_to_queue_type_on_error.clear(); + item.is_blocking = false; + item.timelimit = 0; + item.max_queue_size = 0; +} + +bool tl2::details::TasksQueueTypeSettingsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeSettings& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.is_enabled)) { return false; } + } else { + item.is_enabled = false; + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.is_persistent)) { return false; } + } else { + item.is_persistent = false; + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.int_read(item.priority)) { return false; } + } else { + item.priority = 0; + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_read(item.default_retry_time)) { return false; } + } else { + item.default_retry_time = 0; + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_read(item.default_retry_num)) { return false; } + } else { + item.default_retry_num = 0; + } + if ((item.fields_mask & (1<<4)) != 0) { + if (!s.string_read(item.move_to_queue_type_on_error)) { return false; } + } else { + item.move_to_queue_type_on_error.clear(); + } + if ((item.fields_mask & (1<<5)) != 0) { + if (!::tl2::details::BoolReadBoxed(s, item.is_blocking)) { return false; } + } else { + item.is_blocking = false; + } + if ((item.fields_mask & (1<<6)) != 0) { + if (!s.int_read(item.timelimit)) { return false; } + } else { + item.timelimit = 0; + } + if ((item.fields_mask & (1<<7)) != 0) { + if (!s.int_read(item.max_queue_size)) { return false; } + } else { + item.max_queue_size = 0; + } + return true; +} + +bool tl2::details::TasksQueueTypeSettingsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeSettings& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.is_enabled)) { return false; } + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.is_persistent)) { return false; } + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.int_write(item.priority)) { return false;} + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_write(item.default_retry_time)) { return false;} + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_write(item.default_retry_num)) { return false;} + } + if ((item.fields_mask & (1<<4)) != 0) { + if (!s.string_write(item.move_to_queue_type_on_error)) { return false;} + } + if ((item.fields_mask & (1<<5)) != 0) { + if (!::tl2::details::BoolWriteBoxed(s, item.is_blocking)) { return false; } + } + if ((item.fields_mask & (1<<6)) != 0) { + if (!s.int_write(item.timelimit)) { return false;} + } + if ((item.fields_mask & (1<<7)) != 0) { + if (!s.int_write(item.max_queue_size)) { return false;} + } + return true; +} + +bool tl2::details::TasksQueueTypeSettingsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeSettings& item) { + if (!s.nat_read_exact_tag(0x561fbc09)) { return false; } + return tl2::details::TasksQueueTypeSettingsRead(s, item); +} + +bool tl2::details::TasksQueueTypeSettingsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeSettings& item) { + if (!s.nat_write(0x561fbc09)) { return false; } + return tl2::details::TasksQueueTypeSettingsWrite(s, item); +} + +bool tl2::tasks::QueueTypeStats::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeStatsRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeStats::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeStatsWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeStats::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksQueueTypeStatsReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::QueueTypeStats::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksQueueTypeStatsWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksQueueTypeStatsReset(::tl2::tasks::QueueTypeStats& item) { + item.fields_mask = 0; + item.waiting_size = 0; + item.scheduled_size = 0; + item.in_progress_size = 0; + item.num_queues = 0; +} + +bool tl2::details::TasksQueueTypeStatsRead(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.long_read(item.waiting_size)) { return false; } + } else { + item.waiting_size = 0; + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.long_read(item.scheduled_size)) { return false; } + } else { + item.scheduled_size = 0; + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.long_read(item.in_progress_size)) { return false; } + } else { + item.in_progress_size = 0; + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_read(item.num_queues)) { return false; } + } else { + item.num_queues = 0; + } + return true; +} + +bool tl2::details::TasksQueueTypeStatsWrite(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeStats& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.long_write(item.waiting_size)) { return false;} + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.long_write(item.scheduled_size)) { return false;} + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.long_write(item.in_progress_size)) { return false;} + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_write(item.num_queues)) { return false;} + } + return true; +} + +bool tl2::details::TasksQueueTypeStatsReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::QueueTypeStats& item) { + if (!s.nat_read_exact_tag(0xe1b785f2)) { return false; } + return tl2::details::TasksQueueTypeStatsRead(s, item); +} + +bool tl2::details::TasksQueueTypeStatsWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::QueueTypeStats& item) { + if (!s.nat_write(0xe1b785f2)) { return false; } + return tl2::details::TasksQueueTypeStatsWrite(s, item); +} + +bool tl2::tasks::Task::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::Task::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::Task::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::Task::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskReset(::tl2::tasks::Task& item) { + item.fields_mask = 0; + item.flags = 0; + item.tag.clear(); + item.data.clear(); + item.id = 0; + item.retries = 0; + item.scheduled_time = 0; + item.deadline = 0; +} + +bool tl2::details::TasksTaskRead(::basictl::tl_istream & s, ::tl2::tasks::Task& item) { + if (!s.nat_read(item.fields_mask)) { return false; } + if (!s.int_read(item.flags)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.tag)) { return false; } + if (!s.string_read(item.data)) { return false; } + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.long_read(item.id)) { return false; } + } else { + item.id = 0; + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_read(item.retries)) { return false; } + } else { + item.retries = 0; + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.int_read(item.scheduled_time)) { return false; } + } else { + item.scheduled_time = 0; + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_read(item.deadline)) { return false; } + } else { + item.deadline = 0; + } + return true; +} + +bool tl2::details::TasksTaskWrite(::basictl::tl_ostream & s, const ::tl2::tasks::Task& item) { + if (!s.nat_write(item.fields_mask)) { return false;} + if (!s.int_write(item.flags)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.tag)) { return false; } + if (!s.string_write(item.data)) { return false;} + if ((item.fields_mask & (1<<0)) != 0) { + if (!s.long_write(item.id)) { return false;} + } + if ((item.fields_mask & (1<<1)) != 0) { + if (!s.int_write(item.retries)) { return false;} + } + if ((item.fields_mask & (1<<2)) != 0) { + if (!s.int_write(item.scheduled_time)) { return false;} + } + if ((item.fields_mask & (1<<3)) != 0) { + if (!s.int_write(item.deadline)) { return false;} + } + return true; +} + +bool tl2::details::TasksTaskReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::Task& item) { + if (!s.nat_read_exact_tag(0x7c23bc2c)) { return false; } + return tl2::details::TasksTaskRead(s, item); +} + +bool tl2::details::TasksTaskWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::Task& item) { + if (!s.nat_write(0x7c23bc2c)) { return false; } + return tl2::details::TasksTaskWrite(s, item); +} + +bool tl2::tasks::TaskInfo::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskInfoRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskInfo::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskInfoWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskInfo::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskInfoReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskInfo::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskInfoWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskInfoReset(::tl2::tasks::TaskInfo& item) { + item.type_name.clear(); + item.queue_id.clear(); + ::tl2::details::TasksTaskReset(item.task); +} + +bool tl2::details::TasksTaskInfoRead(::basictl::tl_istream & s, ::tl2::tasks::TaskInfo& item) { + if (!s.string_read(item.type_name)) { return false; } + if (!::tl2::details::BuiltinVectorIntRead(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskRead(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksTaskInfoWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskInfo& item) { + if (!s.string_write(item.type_name)) { return false;} + if (!::tl2::details::BuiltinVectorIntWrite(s, item.queue_id)) { return false; } + if (!::tl2::details::TasksTaskWrite(s, item.task)) { return false; } + return true; +} + +bool tl2::details::TasksTaskInfoReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskInfo& item) { + if (!s.nat_read_exact_tag(0x06f0c6a6)) { return false; } + return tl2::details::TasksTaskInfoRead(s, item); +} + +bool tl2::details::TasksTaskInfoWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskInfo& item) { + if (!s.nat_write(0x06f0c6a6)) { return false; } + return tl2::details::TasksTaskInfoWrite(s, item); +} + +bool tl2::details::TasksTaskInfoMaybeReadBoxed(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo>& item) { + bool has_item = false; + if (!s.bool_read(has_item, 0x27930a7b, 0x3f9c8ef8)) { return false; } + if (has_item) { + if (!item) { + item.emplace(); + } + if (!::tl2::details::TasksTaskInfoRead(s, *item)) { return false; } + return true; + } + item.reset(); + return true; +} + +bool tl2::details::TasksTaskInfoMaybeWriteBoxed(::basictl::tl_ostream & s, const std::optional<::tl2::tasks::TaskInfo>& item) { + if (!s.nat_write(item ? 0x3f9c8ef8 : 0x27930a7b)) { return false; } + if (item) { + if (!::tl2::details::TasksTaskInfoWrite(s, *item)) { return false; } + } + return true; +} + +static const std::string_view TasksTaskStatus_tbl_tl_name[]{"tasks.taskStatusNotCurrentlyInEngine", "tasks.taskStatusScheduled", "tasks.taskStatusWaiting", "tasks.taskStatusInProgress"}; +static const uint32_t TasksTaskStatus_tbl_tl_tag[]{0xb207caaa, 0x0aca80a9, 0x16739c2c, 0x06ef70e7}; + +bool tl2::tasks::TaskStatus::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::tasks::TaskStatus::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::tasks::TaskStatus::tl_name() const { + return TasksTaskStatus_tbl_tl_name[value.index()]; +} +uint32_t tl2::tasks::TaskStatus::tl_tag() const { + return TasksTaskStatus_tbl_tl_tag[value.index()]; +} + + +void tl2::details::TasksTaskStatusReset(::tl2::tasks::TaskStatus& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::TasksTaskStatusReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatus& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0xb207caaa: + if (item.value.index() != 0) { item.value.emplace<0>(); } + break; + case 0x0aca80a9: + if (item.value.index() != 1) { item.value.emplace<1>(); } + break; + case 0x16739c2c: + if (item.value.index() != 2) { item.value.emplace<2>(); } + break; + case 0x06ef70e7: + if (item.value.index() != 3) { item.value.emplace<3>(); } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::TasksTaskStatusWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatus& item) { + s.nat_write(TasksTaskStatus_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + } + return true; +} + +bool tl2::tasks::TaskStatusInProgress::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusInProgressRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusInProgress::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusInProgressWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusInProgress::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusInProgressReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusInProgress::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusInProgressWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskStatusInProgressReset(::tl2::tasks::TaskStatusInProgress& item) { +} + +bool tl2::details::TasksTaskStatusInProgressRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusInProgress& item) { + return true; +} + +bool tl2::details::TasksTaskStatusInProgressWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusInProgress& item) { + return true; +} + +bool tl2::details::TasksTaskStatusInProgressReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusInProgress& item) { + if (!s.nat_read_exact_tag(0x06ef70e7)) { return false; } + return tl2::details::TasksTaskStatusInProgressRead(s, item); +} + +bool tl2::details::TasksTaskStatusInProgressWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusInProgress& item) { + if (!s.nat_write(0x06ef70e7)) { return false; } + return tl2::details::TasksTaskStatusInProgressWrite(s, item); +} + +bool tl2::tasks::TaskStatusNotCurrentlyInEngine::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusNotCurrentlyInEngine::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusNotCurrentlyInEngine::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusNotCurrentlyInEngine::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusNotCurrentlyInEngineWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskStatusNotCurrentlyInEngineReset(::tl2::tasks::TaskStatusNotCurrentlyInEngine& item) { +} + +bool tl2::details::TasksTaskStatusNotCurrentlyInEngineRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item) { + return true; +} + +bool tl2::details::TasksTaskStatusNotCurrentlyInEngineWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item) { + return true; +} + +bool tl2::details::TasksTaskStatusNotCurrentlyInEngineReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item) { + if (!s.nat_read_exact_tag(0xb207caaa)) { return false; } + return tl2::details::TasksTaskStatusNotCurrentlyInEngineRead(s, item); +} + +bool tl2::details::TasksTaskStatusNotCurrentlyInEngineWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusNotCurrentlyInEngine& item) { + if (!s.nat_write(0xb207caaa)) { return false; } + return tl2::details::TasksTaskStatusNotCurrentlyInEngineWrite(s, item); +} + +bool tl2::tasks::TaskStatusScheduled::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusScheduledRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusScheduled::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusScheduledWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusScheduled::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusScheduledReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusScheduled::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusScheduledWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskStatusScheduledReset(::tl2::tasks::TaskStatusScheduled& item) { +} + +bool tl2::details::TasksTaskStatusScheduledRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusScheduled& item) { + return true; +} + +bool tl2::details::TasksTaskStatusScheduledWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusScheduled& item) { + return true; +} + +bool tl2::details::TasksTaskStatusScheduledReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusScheduled& item) { + if (!s.nat_read_exact_tag(0x0aca80a9)) { return false; } + return tl2::details::TasksTaskStatusScheduledRead(s, item); +} + +bool tl2::details::TasksTaskStatusScheduledWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusScheduled& item) { + if (!s.nat_write(0x0aca80a9)) { return false; } + return tl2::details::TasksTaskStatusScheduledWrite(s, item); +} + +bool tl2::tasks::TaskStatusWaiting::read(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusWaitingRead(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusWaiting::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusWaitingWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusWaiting::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TasksTaskStatusWaitingReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tasks::TaskStatusWaiting::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TasksTaskStatusWaitingWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TasksTaskStatusWaitingReset(::tl2::tasks::TaskStatusWaiting& item) { +} + +bool tl2::details::TasksTaskStatusWaitingRead(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusWaiting& item) { + return true; +} + +bool tl2::details::TasksTaskStatusWaitingWrite(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusWaiting& item) { + return true; +} + +bool tl2::details::TasksTaskStatusWaitingReadBoxed(::basictl::tl_istream & s, ::tl2::tasks::TaskStatusWaiting& item) { + if (!s.nat_read_exact_tag(0x16739c2c)) { return false; } + return tl2::details::TasksTaskStatusWaitingRead(s, item); +} + +bool tl2::details::TasksTaskStatusWaitingWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tasks::TaskStatusWaiting& item) { + if (!s.nat_write(0x16739c2c)) { return false; } + return tl2::details::TasksTaskStatusWaitingWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.addTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.addTask.hpp new file mode 100644 index 00000000..6f6d7c3e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.addTask.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/tasks.task.hpp" + + +namespace tl2 { namespace tasks { +struct AddTask { + std::string type_name; + std::vector queue_id; + ::tl2::tasks::Task task{}; + + std::string_view tl_name() const { return "tasks.addTask"; } + uint32_t tl_tag() const { return 0x2ca073d5; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, int64_t & result); + bool write_result(::basictl::tl_ostream & s, int64_t & result); +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getAnyTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getAnyTask.hpp new file mode 100644 index 00000000..e4cf526b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getAnyTask.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/tasks.taskInfo.hpp" + + +namespace tl2 { namespace tasks { +struct GetAnyTask { + + std::string_view tl_name() const { return "tasks.getAnyTask"; } + uint32_t tl_tag() const { return 0x4a9c7dbb; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result); + bool write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result); +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueSize.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueSize.hpp new file mode 100644 index 00000000..f33abafb --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueSize.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/tasks.queueStats.hpp" + + +namespace tl2 { namespace tasks { +struct GetQueueSize { + std::string type_name; + std::vector queue_id; + uint32_t fields_mask = 0; + + std::string_view tl_name() const { return "tasks.getQueueSize"; } + uint32_t tl_tag() const { return 0xd8fcda03; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, ::tl2::tasks::QueueStats & result); + bool write_result(::basictl::tl_ostream & s, ::tl2::tasks::QueueStats & result); +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueTypes.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueTypes.hpp new file mode 100644 index 00000000..b067b03d --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getQueueTypes.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/tasks.queueTypeInfo.hpp" + + +namespace tl2 { namespace tasks { +struct GetQueueTypes { + uint32_t settings_mask = 0; + uint32_t stats_mask = 0; + + std::string_view tl_name() const { return "tasks.getQueueTypes"; } + uint32_t tl_tag() const { return 0x5434457a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result); + bool write_result(::basictl::tl_ostream & s, std::vector<::tl2::tasks::QueueTypeInfo> & result); +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getTaskFromQueue.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getTaskFromQueue.hpp new file mode 100644 index 00000000..219b3b0a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/functions/tasks.getTaskFromQueue.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "../types/tasks.taskInfo.hpp" + + +namespace tl2 { namespace tasks { +struct GetTaskFromQueue { + std::string type_name; + std::vector queue_id; + + std::string_view tl_name() const { return "tasks.getTaskFromQueue"; } + uint32_t tl_tag() const { return 0x6a52b698; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional<::tl2::tasks::TaskInfo> & result); + bool write_result(::basictl::tl_ostream & s, std::optional<::tl2::tasks::TaskInfo> & result); +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatus.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatus.hpp new file mode 100644 index 00000000..4bf033ff --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatus.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tasks.TaskStatusItems.hpp" + + +namespace tl2 { namespace tasks { +struct TaskStatus { + std::variant<::tl2::tasks::TaskStatusNotCurrentlyInEngine, ::tl2::tasks::TaskStatusScheduled, ::tl2::tasks::TaskStatusWaiting, ::tl2::tasks::TaskStatusInProgress> value; + + bool is_NotCurrentlyInEngine() const { return value.index() == 0; } + bool is_Scheduled() const { return value.index() == 1; } + bool is_Waiting() const { return value.index() == 2; } + bool is_InProgress() const { return value.index() == 3; } + + void set_NotCurrentlyInEngine() { value.emplace<0>(); } + void set_Scheduled() { value.emplace<1>(); } + void set_Waiting() { value.emplace<2>(); } + void set_InProgress() { value.emplace<3>(); } + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatusItems.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatusItems.hpp new file mode 100644 index 00000000..23c5b50a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.TaskStatusItems.hpp @@ -0,0 +1,65 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct TaskStatusInProgress { + + std::string_view tl_name() const { return "tasks.taskStatusInProgress"; } + uint32_t tl_tag() const { return 0x06ef70e7; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + +namespace tl2 { namespace tasks { +struct TaskStatusNotCurrentlyInEngine { + + std::string_view tl_name() const { return "tasks.taskStatusNotCurrentlyInEngine"; } + uint32_t tl_tag() const { return 0xb207caaa; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + +namespace tl2 { namespace tasks { +struct TaskStatusScheduled { + + std::string_view tl_name() const { return "tasks.taskStatusScheduled"; } + uint32_t tl_tag() const { return 0x0aca80a9; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + +namespace tl2 { namespace tasks { +struct TaskStatusWaiting { + + std::string_view tl_name() const { return "tasks.taskStatusWaiting"; } + uint32_t tl_tag() const { return 0x16739c2c; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTask.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTask.hpp new file mode 100644 index 00000000..db17ea10 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTask.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tasks.cronTime.hpp" +#include "tasks.task.hpp" + + +namespace tl2 { namespace tasks { +struct CronTask { + std::string type_name; + std::vector queue_id; + ::tl2::tasks::Task task{}; + ::tl2::tasks::CronTime time{}; + + std::string_view tl_name() const { return "tasks.cronTask"; } + uint32_t tl_tag() const { return 0xc90cf28a; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTaskWithId.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTaskWithId.hpp new file mode 100644 index 00000000..3c80a967 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTaskWithId.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tasks.cronTask.hpp" + + +namespace tl2 { namespace tasks { +struct CronTaskWithId { + int32_t id = 0; + int32_t next_time = 0; + ::tl2::tasks::CronTask task{}; + + std::string_view tl_name() const { return "tasks.cronTaskWithId"; } + uint32_t tl_tag() const { return 0x3a958001; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTime.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTime.hpp new file mode 100644 index 00000000..0a6502ca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.cronTime.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct CronTime { + uint32_t fields_mask = 0; + std::vector seconds; + std::vector minutes; + std::vector hours; + std::vector days_of_week; + std::vector days; + std::vector months; + + std::string_view tl_name() const { return "tasks.cronTime"; } + uint32_t tl_tag() const { return 0xd4177d7f; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueStats.hpp new file mode 100644 index 00000000..30b82fb4 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueStats.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct QueueStats { + int32_t waiting_size = 0; + int32_t scheduled_size = 0; + int32_t in_progress_size = 0; + + std::string_view tl_name() const { return "tasks.queueStats"; } + uint32_t tl_tag() const { return 0x1d942543; } + + bool read(::basictl::tl_istream & s, uint32_t nat_fields_mask); + bool write(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const; + + bool read_boxed(::basictl::tl_istream & s, uint32_t nat_fields_mask); + bool write_boxed(::basictl::tl_ostream & s, uint32_t nat_fields_mask)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeInfo.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeInfo.hpp new file mode 100644 index 00000000..8595faca --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeInfo.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tasks.queueTypeSettings.hpp" +#include "tasks.queueTypeStats.hpp" + + +namespace tl2 { namespace tasks { +struct QueueTypeInfo { + std::string type_name; + ::tl2::tasks::QueueTypeSettings settings{}; + ::tl2::tasks::QueueTypeStats stats{}; + + std::string_view tl_name() const { return "tasks.queueTypeInfo"; } + uint32_t tl_tag() const { return 0x38d38d3e; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeSettings.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeSettings.hpp new file mode 100644 index 00000000..afeee92f --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeSettings.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct QueueTypeSettings { + uint32_t fields_mask = 0; + bool is_enabled = false; + bool is_persistent = false; + int32_t priority = 0; + int32_t default_retry_time = 0; + int32_t default_retry_num = 0; + std::string move_to_queue_type_on_error; + bool is_blocking = false; + int32_t timelimit = 0; + int32_t max_queue_size = 0; + + std::string_view tl_name() const { return "tasks.queueTypeSettings"; } + uint32_t tl_tag() const { return 0x561fbc09; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeStats.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeStats.hpp new file mode 100644 index 00000000..70a68001 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.queueTypeStats.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct QueueTypeStats { + uint32_t fields_mask = 0; + int64_t waiting_size = 0; + int64_t scheduled_size = 0; + int64_t in_progress_size = 0; + int32_t num_queues = 0; + + std::string_view tl_name() const { return "tasks.queueTypeStats"; } + uint32_t tl_tag() const { return 0xe1b785f2; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.task.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.task.hpp new file mode 100644 index 00000000..2bb11256 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.task.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tasks { +struct Task { + uint32_t fields_mask = 0; + int32_t flags = 0; + std::vector tag; + std::string data; + int64_t id = 0; + int32_t retries = 0; + int32_t scheduled_time = 0; + int32_t deadline = 0; + + std::string_view tl_name() const { return "tasks.task"; } + uint32_t tl_tag() const { return 0x7c23bc2c; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.taskInfo.hpp b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.taskInfo.hpp new file mode 100644 index 00000000..343df73b --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tasks/types/tasks.taskInfo.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tasks.task.hpp" + + +namespace tl2 { namespace tasks { +struct TaskInfo { + std::string type_name; + std::vector queue_id; + ::tl2::tasks::Task task{}; + + std::string_view tl_name() const { return "tasks.taskInfo"; } + uint32_t tl_tag() const { return 0x06f0c6a6; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tasks + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tlgen2_version.txt b/internal/tlcodegen/test/gen/schema_cpp/tlgen2_version.txt new file mode 100644 index 00000000..e431bfc0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tlgen2_version.txt @@ -0,0 +1,4 @@ +tlgen version: (devel) +schema url: +schema commit: +schema version: 0 (1970-01-01 00:00:00 +0000 UTC) diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.ObjectLimitValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.ObjectLimitValue.hpp new file mode 100644 index 00000000..457cca5a --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.ObjectLimitValue.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tree_stats.ObjectLimitValue.hpp" + +namespace tl2 { namespace details { + +void TreeStatsObjectLimitValueReset(::tl2::tree_stats::ObjectLimitValue& item); +bool TreeStatsObjectLimitValueReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValue& item); +bool TreeStatsObjectLimitValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValue& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueDouble.hpp new file mode 100644 index 00000000..dfec3920 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueDouble.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tree_stats.objectLimitValueDouble.hpp" + +namespace tl2 { namespace details { + +void TreeStatsObjectLimitValueDoubleReset(::tl2::tree_stats::ObjectLimitValueDouble& item); +bool TreeStatsObjectLimitValueDoubleRead(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueDouble& item); +bool TreeStatsObjectLimitValueDoubleWrite(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueDouble& item); +bool TreeStatsObjectLimitValueDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueDouble& item); +bool TreeStatsObjectLimitValueDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueDouble& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueLong.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueLong.hpp new file mode 100644 index 00000000..51c79864 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/headers/tree_stats.objectLimitValueLong.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../types/tree_stats.objectLimitValueLong.hpp" + +namespace tl2 { namespace details { + +void TreeStatsObjectLimitValueLongReset(::tl2::tree_stats::ObjectLimitValueLong& item); +bool TreeStatsObjectLimitValueLongRead(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueLong& item); +bool TreeStatsObjectLimitValueLongWrite(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueLong& item); +bool TreeStatsObjectLimitValueLongReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueLong& item); +bool TreeStatsObjectLimitValueLongWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueLong& item); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/namespace_details.cpp new file mode 100644 index 00000000..c38e485e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/details/namespace_details.cpp @@ -0,0 +1,119 @@ +#include "headers/tree_stats.ObjectLimitValue.hpp" +#include "headers/tree_stats.objectLimitValueLong.hpp" +#include "headers/tree_stats.objectLimitValueDouble.hpp" + + +static const std::string_view TreeStatsObjectLimitValue_tbl_tl_name[]{"tree_stats.objectLimitValueLong", "tree_stats.objectLimitValueDouble"}; +static const uint32_t TreeStatsObjectLimitValue_tbl_tl_tag[]{0x73111993, 0x5dfb8816}; + +bool tl2::tree_stats::ObjectLimitValue::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TreeStatsObjectLimitValueReadBoxed(s, *this)) { return false; } + return true; +} +bool tl2::tree_stats::ObjectLimitValue::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TreeStatsObjectLimitValueWriteBoxed(s, *this)) { return false; } + return true; +} +std::string_view tl2::tree_stats::ObjectLimitValue::tl_name() const { + return TreeStatsObjectLimitValue_tbl_tl_name[value.index()]; +} +uint32_t tl2::tree_stats::ObjectLimitValue::tl_tag() const { + return TreeStatsObjectLimitValue_tbl_tl_tag[value.index()]; +} + + +void tl2::details::TreeStatsObjectLimitValueReset(::tl2::tree_stats::ObjectLimitValue& item) { + item.value.emplace<0>(); // TODO - optimize, if already 0, call Reset function +} + +bool tl2::details::TreeStatsObjectLimitValueReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValue& item) { + uint32_t nat; + s.nat_read(nat); + switch (nat) { + case 0x73111993: + if (item.value.index() != 0) { item.value.emplace<0>(); } + break; + case 0x5dfb8816: + if (item.value.index() != 1) { item.value.emplace<1>(); } + if (!::tl2::details::TreeStatsObjectLimitValueDoubleRead(s, std::get<1>(item.value))) { return false; } + break; + default: + return s.set_error_union_tag(); + } + return true; +} + +bool tl2::details::TreeStatsObjectLimitValueWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValue& item) { + s.nat_write(TreeStatsObjectLimitValue_tbl_tl_tag[item.value.index()]); + switch (item.value.index()) { + case 1: + if (!::tl2::details::TreeStatsObjectLimitValueDoubleWrite(s, std::get<1>(item.value))) { return false; } + break; + } + return true; +} + +void tl2::details::TreeStatsObjectLimitValueDoubleReset(::tl2::tree_stats::ObjectLimitValueDouble& item) { + item = 0; +} + +bool tl2::details::TreeStatsObjectLimitValueDoubleRead(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueDouble& item) { + if (!s.double_read(item)) { return false; } + return true; +} + +bool tl2::details::TreeStatsObjectLimitValueDoubleWrite(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueDouble& item) { + if (!s.double_write(item)) { return false;} + return true; +} + +bool tl2::details::TreeStatsObjectLimitValueDoubleReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueDouble& item) { + if (!s.nat_read_exact_tag(0x5dfb8816)) { return false; } + return tl2::details::TreeStatsObjectLimitValueDoubleRead(s, item); +} + +bool tl2::details::TreeStatsObjectLimitValueDoubleWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueDouble& item) { + if (!s.nat_write(0x5dfb8816)) { return false; } + return tl2::details::TreeStatsObjectLimitValueDoubleWrite(s, item); +} + +bool tl2::tree_stats::ObjectLimitValueLong::read(::basictl::tl_istream & s) { + if (!::tl2::details::TreeStatsObjectLimitValueLongRead(s, *this)) { return false; } + return true; +} + +bool tl2::tree_stats::ObjectLimitValueLong::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::TreeStatsObjectLimitValueLongWrite(s, *this)) { return false; } + return true; +} + +bool tl2::tree_stats::ObjectLimitValueLong::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::TreeStatsObjectLimitValueLongReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::tree_stats::ObjectLimitValueLong::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::TreeStatsObjectLimitValueLongWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::TreeStatsObjectLimitValueLongReset(::tl2::tree_stats::ObjectLimitValueLong& item) { +} + +bool tl2::details::TreeStatsObjectLimitValueLongRead(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueLong& item) { + return true; +} + +bool tl2::details::TreeStatsObjectLimitValueLongWrite(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueLong& item) { + return true; +} + +bool tl2::details::TreeStatsObjectLimitValueLongReadBoxed(::basictl::tl_istream & s, ::tl2::tree_stats::ObjectLimitValueLong& item) { + if (!s.nat_read_exact_tag(0x73111993)) { return false; } + return tl2::details::TreeStatsObjectLimitValueLongRead(s, item); +} + +bool tl2::details::TreeStatsObjectLimitValueLongWriteBoxed(::basictl::tl_ostream & s, const ::tl2::tree_stats::ObjectLimitValueLong& item) { + if (!s.nat_write(0x73111993)) { return false; } + return tl2::details::TreeStatsObjectLimitValueLongWrite(s, item); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.ObjectLimitValue.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.ObjectLimitValue.hpp new file mode 100644 index 00000000..8bec7fb3 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.ObjectLimitValue.hpp @@ -0,0 +1,25 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" +#include "tree_stats.objectLimitValueLong.hpp" +#include "tree_stats.objectLimitValueDouble.hpp" + + +namespace tl2 { namespace tree_stats { +struct ObjectLimitValue { + std::variant<::tl2::tree_stats::ObjectLimitValueLong, ::tl2::tree_stats::ObjectLimitValueDouble> value; + + bool is_Long() const { return value.index() == 0; } + bool is_Double() const { return value.index() == 1; } + + void set_Long() { value.emplace<0>(); } + + std::string_view tl_name() const; + uint32_t tl_tag() const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tree_stats + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueDouble.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueDouble.hpp new file mode 100644 index 00000000..aae40caf --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueDouble.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tree_stats { +using ObjectLimitValueDouble = double; +}} // namespace tl2::tree_stats + diff --git a/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueLong.hpp b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueLong.hpp new file mode 100644 index 00000000..fe39ac0e --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/tree_stats/types/tree_stats.objectLimitValueLong.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace tree_stats { +struct ObjectLimitValueLong { + + std::string_view tl_name() const { return "tree_stats.objectLimitValueLong"; } + uint32_t tl_tag() const { return 0x73111993; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; +}; + +}} // namespace tl2::tree_stats + diff --git a/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.get.hpp b/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.get.hpp new file mode 100644 index 00000000..e27a93c6 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.get.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/unique.get.hpp" +#include "../../../__common/types/int.hpp" + +namespace tl2 { namespace details { + +void UniqueGetReset(::tl2::unique::Get& item); +bool UniqueGetRead(::basictl::tl_istream & s, ::tl2::unique::Get& item); +bool UniqueGetWrite(::basictl::tl_ostream & s, const ::tl2::unique::Get& item); +bool UniqueGetReadBoxed(::basictl::tl_istream & s, ::tl2::unique::Get& item); +bool UniqueGetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::unique::Get& item); + +bool UniqueGetReadResult(::basictl::tl_istream & s, ::tl2::unique::Get& item, std::optional& result); +bool UniqueGetWriteResult(::basictl::tl_ostream & s, ::tl2::unique::Get& item, std::optional& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.stringToInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.stringToInt.hpp new file mode 100644 index 00000000..804ffba0 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/unique/details/headers/unique.stringToInt.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "../../../a_tlgen_helpers_code.hpp" +#include "../../functions/unique.stringToInt.hpp" + +namespace tl2 { namespace details { + +void UniqueStringToIntReset(::tl2::unique::StringToInt& item); +bool UniqueStringToIntRead(::basictl::tl_istream & s, ::tl2::unique::StringToInt& item); +bool UniqueStringToIntWrite(::basictl::tl_ostream & s, const ::tl2::unique::StringToInt& item); +bool UniqueStringToIntReadBoxed(::basictl::tl_istream & s, ::tl2::unique::StringToInt& item); +bool UniqueStringToIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::unique::StringToInt& item); + +bool UniqueStringToIntReadResult(::basictl::tl_istream & s, ::tl2::unique::StringToInt& item, int32_t& result); +bool UniqueStringToIntWriteResult(::basictl::tl_ostream & s, ::tl2::unique::StringToInt& item, int32_t& result); + +}} // namespace tl2::details + diff --git a/internal/tlcodegen/test/gen/schema_cpp/unique/details/namespace_details.cpp b/internal/tlcodegen/test/gen/schema_cpp/unique/details/namespace_details.cpp new file mode 100644 index 00000000..7c2a6467 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/unique/details/namespace_details.cpp @@ -0,0 +1,126 @@ +#include "headers/unique.stringToInt.hpp" +#include "headers/unique.get.hpp" +#include "../../__common/details/headers/int.hpp" + + +bool tl2::unique::Get::read(::basictl::tl_istream & s) { + if (!::tl2::details::UniqueGetRead(s, *this)) { return false; } + return true; +} + +bool tl2::unique::Get::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::UniqueGetWrite(s, *this)) { return false; } + return true; +} + +bool tl2::unique::Get::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::UniqueGetReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::unique::Get::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::UniqueGetWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::UniqueGetReset(::tl2::unique::Get& item) { + item.key.clear(); +} + +bool tl2::details::UniqueGetRead(::basictl::tl_istream & s, ::tl2::unique::Get& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::UniqueGetWrite(::basictl::tl_ostream & s, const ::tl2::unique::Get& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::UniqueGetReadBoxed(::basictl::tl_istream & s, ::tl2::unique::Get& item) { + if (!s.nat_read_exact_tag(0xce89bbf2)) { return false; } + return tl2::details::UniqueGetRead(s, item); +} + +bool tl2::details::UniqueGetWriteBoxed(::basictl::tl_ostream & s, const ::tl2::unique::Get& item) { + if (!s.nat_write(0xce89bbf2)) { return false; } + return tl2::details::UniqueGetWrite(s, item); +} + +bool tl2::details::UniqueGetReadResult(::basictl::tl_istream & s, tl2::unique::Get& item, std::optional& result) { + if (!::tl2::details::IntMaybeReadBoxed(s, result)) { return false; } + return true; +} +bool tl2::details::UniqueGetWriteResult(::basictl::tl_ostream & s, tl2::unique::Get& item, std::optional& result) { + if (!::tl2::details::IntMaybeWriteBoxed(s, result)) { return false; } + return true; +} + +bool tl2::unique::Get::read_result(::basictl::tl_istream & s, std::optional & result) { + return tl2::details::UniqueGetReadResult(s, *this, result); +} +bool tl2::unique::Get::write_result(::basictl::tl_ostream & s, std::optional & result) { + return tl2::details::UniqueGetWriteResult(s, *this, result); +} + +bool tl2::unique::StringToInt::read(::basictl::tl_istream & s) { + if (!::tl2::details::UniqueStringToIntRead(s, *this)) { return false; } + return true; +} + +bool tl2::unique::StringToInt::write(::basictl::tl_ostream & s)const { + if (!::tl2::details::UniqueStringToIntWrite(s, *this)) { return false; } + return true; +} + +bool tl2::unique::StringToInt::read_boxed(::basictl::tl_istream & s) { + if (!::tl2::details::UniqueStringToIntReadBoxed(s, *this)) { return false; } + return true; +} + +bool tl2::unique::StringToInt::write_boxed(::basictl::tl_ostream & s)const { + if (!::tl2::details::UniqueStringToIntWriteBoxed(s, *this)) { return false; } + return true; +} + +void tl2::details::UniqueStringToIntReset(::tl2::unique::StringToInt& item) { + item.key.clear(); +} + +bool tl2::details::UniqueStringToIntRead(::basictl::tl_istream & s, ::tl2::unique::StringToInt& item) { + if (!s.string_read(item.key)) { return false; } + return true; +} + +bool tl2::details::UniqueStringToIntWrite(::basictl::tl_ostream & s, const ::tl2::unique::StringToInt& item) { + if (!s.string_write(item.key)) { return false;} + return true; +} + +bool tl2::details::UniqueStringToIntReadBoxed(::basictl::tl_istream & s, ::tl2::unique::StringToInt& item) { + if (!s.nat_read_exact_tag(0x0f766c35)) { return false; } + return tl2::details::UniqueStringToIntRead(s, item); +} + +bool tl2::details::UniqueStringToIntWriteBoxed(::basictl::tl_ostream & s, const ::tl2::unique::StringToInt& item) { + if (!s.nat_write(0x0f766c35)) { return false; } + return tl2::details::UniqueStringToIntWrite(s, item); +} + +bool tl2::details::UniqueStringToIntReadResult(::basictl::tl_istream & s, tl2::unique::StringToInt& item, int32_t& result) { + if (!s.nat_read_exact_tag(0xa8509bda)) { return false;} + if (!s.int_read(result)) { return false; } + return true; +} +bool tl2::details::UniqueStringToIntWriteResult(::basictl::tl_ostream & s, tl2::unique::StringToInt& item, int32_t& result) { + if (!s.nat_write(0xa8509bda)) { return false; } + if (!s.int_write(result)) { return false;} + return true; +} + +bool tl2::unique::StringToInt::read_result(::basictl::tl_istream & s, int32_t & result) { + return tl2::details::UniqueStringToIntReadResult(s, *this, result); +} +bool tl2::unique::StringToInt::write_result(::basictl::tl_ostream & s, int32_t & result) { + return tl2::details::UniqueStringToIntWriteResult(s, *this, result); +} diff --git a/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.get.hpp b/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.get.hpp new file mode 100644 index 00000000..c096d309 --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.get.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace unique { +struct Get { + std::string key; + + std::string_view tl_name() const { return "unique.get"; } + uint32_t tl_tag() const { return 0xce89bbf2; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, std::optional & result); + bool write_result(::basictl::tl_ostream & s, std::optional & result); +}; + +}} // namespace tl2::unique + diff --git a/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.stringToInt.hpp b/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.stringToInt.hpp new file mode 100644 index 00000000..5d0deeab --- /dev/null +++ b/internal/tlcodegen/test/gen/schema_cpp/unique/functions/unique.stringToInt.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "../../a_tlgen_helpers_code.hpp" + + +namespace tl2 { namespace unique { +struct StringToInt { + std::string key; + + std::string_view tl_name() const { return "unique.stringToInt"; } + uint32_t tl_tag() const { return 0x0f766c35; } + + bool read(::basictl::tl_istream & s); + bool write(::basictl::tl_ostream & s)const; + + bool read_boxed(::basictl::tl_istream & s); + bool write_boxed(::basictl::tl_ostream & s)const; + + bool read_result(::basictl::tl_istream & s, int32_t & result); + bool write_result(::basictl::tl_ostream & s, int32_t & result); +}; + +}} // namespace tl2::unique +