json_convert_content.dart 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
  1. // ignore_for_file: non_constant_identifier_names
  2. // ignore_for_file: camel_case_types
  3. // ignore_for_file: prefer_single_quotes
  4. // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
  5. import 'package:flutter/material.dart' show debugPrint;
  6. import 'package:domain/entity/auth_login_entity.dart';
  7. import 'package:domain/entity/captcha_img_entity.dart';
  8. import 'package:domain/entity/comm_payment_detail_entity.dart';
  9. import 'package:domain/entity/facility_book_entity.dart';
  10. import 'package:domain/entity/facility_index_entity.dart';
  11. import 'package:domain/entity/facility_page_entity.dart';
  12. import 'package:domain/entity/feedback_detail_entity.dart';
  13. import 'package:domain/entity/feedback_list_entity.dart';
  14. import 'package:domain/entity/form_content_entity.dart';
  15. import 'package:domain/entity/form_detail_entity.dart';
  16. import 'package:domain/entity/form_list_entity.dart';
  17. import 'package:domain/entity/form_option_entity.dart';
  18. import 'package:domain/entity/form_order_entity.dart';
  19. import 'package:domain/entity/form_submitted_entity.dart';
  20. import 'package:domain/entity/form_submitted_page_entity.dart';
  21. import 'package:domain/entity/garage_sale_history_entity.dart';
  22. import 'package:domain/entity/garage_sale_rent_detail_entity.dart';
  23. import 'package:domain/entity/garage_sale_rent_entity.dart';
  24. import 'package:domain/entity/home_list_entity.dart';
  25. import 'package:domain/entity/id_name_entity.dart';
  26. import 'package:domain/entity/latest_news_detail_entity.dart';
  27. import 'package:domain/entity/latest_news_page_entity.dart';
  28. import 'package:domain/entity/myfollowing_list_entity.dart';
  29. import 'package:domain/entity/myposts_newsfeed_entity.dart';
  30. import 'package:domain/entity/myposts_sale_rent_entity.dart';
  31. import 'package:domain/entity/newsfeed_comment_publish_entity.dart';
  32. import 'package:domain/entity/newsfeed_detail_entity.dart';
  33. import 'package:domain/entity/newsfeed_following_entity.dart';
  34. import 'package:domain/entity/newsfeed_foryou_entity.dart';
  35. import 'package:domain/entity/newsfeed_news_entity.dart';
  36. import 'package:domain/entity/notice_board_announ_detail_entity.dart';
  37. import 'package:domain/entity/notice_board_announ_entity.dart';
  38. import 'package:domain/entity/notice_board_documents_entity.dart';
  39. import 'package:domain/entity/notice_board_event_detail_entity.dart';
  40. import 'package:domain/entity/notice_board_event_entity.dart';
  41. import 'package:domain/entity/notification_page_entity.dart';
  42. import 'package:domain/entity/paid_service_detail_entity.dart';
  43. import 'package:domain/entity/paid_service_entity.dart';
  44. import 'package:domain/entity/paid_service_pay_success_info_entity.dart';
  45. import 'package:domain/entity/payment_intent_entity.dart';
  46. import 'package:domain/entity/payment_page_entity.dart';
  47. import 'package:domain/entity/property_news_detail_entity.dart';
  48. import 'package:domain/entity/property_news_entity.dart';
  49. import 'package:domain/entity/property_sale_rent_entity.dart';
  50. import 'package:domain/entity/repair_service_entity.dart';
  51. import 'package:domain/entity/rewards_active_detail_entity.dart';
  52. import 'package:domain/entity/rewards_buy_entity.dart';
  53. import 'package:domain/entity/rewards_category_entity.dart';
  54. import 'package:domain/entity/rewards_detail_entity.dart';
  55. import 'package:domain/entity/rewards_history_earned_entity.dart';
  56. import 'package:domain/entity/rewards_home_entity.dart';
  57. import 'package:domain/entity/rewards_home_tes_entity.dart';
  58. import 'package:domain/entity/rewards_home_test_entity.dart';
  59. import 'package:domain/entity/rewards_home_tx_entity.dart';
  60. import 'package:domain/entity/rewards_index_entity.dart';
  61. import 'package:domain/entity/rewards_list_entity.dart';
  62. import 'package:domain/entity/rewards_my_detail_entity.dart';
  63. import 'package:domain/entity/rewards_my_entity.dart';
  64. import 'package:domain/entity/rewards_search_entity.dart';
  65. import 'package:domain/entity/server_time.dart';
  66. import 'package:domain/entity/service_category_entity.dart';
  67. import 'package:domain/entity/service_evaluate_list_entity.dart';
  68. import 'package:domain/entity/service_in_progress_entity.dart';
  69. import 'package:domain/entity/service_order_detail_entity.dart';
  70. import 'package:domain/entity/service_repair_detail_entity.dart';
  71. import 'package:domain/entity/service_time_period_entity.dart';
  72. import 'package:domain/entity/text_kon_entity.dart';
  73. import 'package:domain/entity/user_me_entity.dart';
  74. import 'package:domain/entity/visitor_page_entity.dart';
  75. JsonConvert jsonConvert = JsonConvert();
  76. typedef JsonConvertFunction<T> = T Function(Map<String, dynamic> json);
  77. typedef EnumConvertFunction<T> = T Function(String value);
  78. typedef ConvertExceptionHandler = void Function(Object error, StackTrace stackTrace);
  79. extension MapSafeExt<K, V> on Map<K, V> {
  80. T? getOrNull<T>(K? key) {
  81. if (!containsKey(key) || key == null) {
  82. return null;
  83. } else {
  84. return this[key] as T?;
  85. }
  86. }
  87. }
  88. class JsonConvert {
  89. static ConvertExceptionHandler? onError;
  90. JsonConvertClassCollection convertFuncMap = JsonConvertClassCollection();
  91. /// When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment
  92. /// https://flutter.cn/docs/development/tools/hot-reload
  93. /// class MyApp extends StatelessWidget {
  94. /// const MyApp({Key? key})
  95. /// : super(key: key);
  96. ///
  97. /// @override
  98. /// Widget build(BuildContext context) {
  99. /// jsonConvert.reassembleConvertFuncMap();
  100. /// return MaterialApp();
  101. /// }
  102. /// }
  103. void reassembleConvertFuncMap() {
  104. bool isReleaseMode = const bool.fromEnvironment('dart.vm.product');
  105. if (!isReleaseMode) {
  106. convertFuncMap = JsonConvertClassCollection();
  107. }
  108. }
  109. T? convert<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  110. if (value == null) {
  111. return null;
  112. }
  113. if (value is T) {
  114. return value;
  115. }
  116. try {
  117. return _asT<T>(value, enumConvert: enumConvert);
  118. } catch (e, stackTrace) {
  119. debugPrint('asT<$T> $e $stackTrace');
  120. if (onError != null) {
  121. onError!(e, stackTrace);
  122. }
  123. return null;
  124. }
  125. }
  126. List<T?>? convertList<T>(List<dynamic>? value, {EnumConvertFunction? enumConvert}) {
  127. if (value == null) {
  128. return null;
  129. }
  130. try {
  131. return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)).toList();
  132. } catch (e, stackTrace) {
  133. debugPrint('asT<$T> $e $stackTrace');
  134. if (onError != null) {
  135. onError!(e, stackTrace);
  136. }
  137. return <T>[];
  138. }
  139. }
  140. List<T>? convertListNotNull<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  141. if (value == null) {
  142. return null;
  143. }
  144. try {
  145. return (value as List<dynamic>).map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)!).toList();
  146. } catch (e, stackTrace) {
  147. debugPrint('asT<$T> $e $stackTrace');
  148. if (onError != null) {
  149. onError!(e, stackTrace);
  150. }
  151. return <T>[];
  152. }
  153. }
  154. T? _asT<T extends Object?>(dynamic value,
  155. {EnumConvertFunction? enumConvert}) {
  156. final String type = T.toString();
  157. final String valueS = value.toString();
  158. if (enumConvert != null) {
  159. return enumConvert(valueS) as T;
  160. } else if (type == "String") {
  161. return valueS as T;
  162. } else if (type == "int") {
  163. final int? intValue = int.tryParse(valueS);
  164. if (intValue == null) {
  165. return double.tryParse(valueS)?.toInt() as T?;
  166. } else {
  167. return intValue as T;
  168. }
  169. } else if (type == "double") {
  170. return double.parse(valueS) as T;
  171. } else if (type == "DateTime") {
  172. return DateTime.parse(valueS) as T;
  173. } else if (type == "bool") {
  174. if (valueS == '0' || valueS == '1') {
  175. return (valueS == '1') as T;
  176. }
  177. return (valueS == 'true') as T;
  178. } else if (type == "Map" || type.startsWith("Map<")) {
  179. return value as T;
  180. } else {
  181. if (convertFuncMap.containsKey(type)) {
  182. if (value == null) {
  183. return null;
  184. }
  185. var covertFunc = convertFuncMap[type]!;
  186. if (covertFunc is Map<String, dynamic>) {
  187. return covertFunc(value as Map<String, dynamic>) as T;
  188. } else {
  189. return covertFunc(Map<String, dynamic>.from(value)) as T;
  190. }
  191. } else {
  192. throw UnimplementedError('$type unimplemented,you can try running the app again');
  193. }
  194. }
  195. }
  196. //list is returned by type
  197. static M? _getListChildType<M>(List<Map<String, dynamic>> data) {
  198. if (<AuthLoginEntity>[] is M) {
  199. return data.map<AuthLoginEntity>((Map<String, dynamic> e) => AuthLoginEntity.fromJson(e)).toList() as M;
  200. }
  201. if (<CaptchaImgEntity>[] is M) {
  202. return data.map<CaptchaImgEntity>((Map<String, dynamic> e) => CaptchaImgEntity.fromJson(e)).toList() as M;
  203. }
  204. if (<CommPaymentDetailEntity>[] is M) {
  205. return data.map<CommPaymentDetailEntity>((Map<String, dynamic> e) =>
  206. CommPaymentDetailEntity.fromJson(e)).toList() as M;
  207. }
  208. if (<CommPaymentDetailOrderable>[] is M) {
  209. return data.map<CommPaymentDetailOrderable>((Map<String, dynamic> e) =>
  210. CommPaymentDetailOrderable.fromJson(e)).toList() as M;
  211. }
  212. if (<FacilityBookEntity>[] is M) {
  213. return data.map<FacilityBookEntity>((Map<String, dynamic> e) => FacilityBookEntity.fromJson(e)).toList() as M;
  214. }
  215. if (<FacilityBookFacilityType>[] is M) {
  216. return data.map<FacilityBookFacilityType>((Map<String, dynamic> e) => FacilityBookFacilityType.fromJson(e)).toList() as M;
  217. }
  218. if (<FacilityBookFacilities>[] is M) {
  219. return data.map<FacilityBookFacilities>((Map<String, dynamic> e) => FacilityBookFacilities.fromJson(e)).toList() as M;
  220. }
  221. if (<FacilityBookFacilitiesPeriods>[] is M) {
  222. return data.map<FacilityBookFacilitiesPeriods>((Map<String, dynamic> e) => FacilityBookFacilitiesPeriods.fromJson(e)).toList() as M;
  223. }
  224. if (<FacilityIndexEntity>[] is M) {
  225. return data.map<FacilityIndexEntity>((Map<String, dynamic> e) => FacilityIndexEntity.fromJson(e)).toList() as M;
  226. }
  227. if (<FacilityPageEntity>[] is M) {
  228. return data.map<FacilityPageEntity>((Map<String, dynamic> e) => FacilityPageEntity.fromJson(e)).toList() as M;
  229. }
  230. if (<FacilityDetail>[] is M) {
  231. return data.map<FacilityDetail>((Map<String, dynamic> e) => FacilityDetail.fromJson(e)).toList() as M;
  232. }
  233. if (<FacilityPageListBooking>[] is M) {
  234. return data.map<FacilityPageListBooking>((Map<String, dynamic> e) => FacilityPageListBooking.fromJson(e)).toList() as M;
  235. }
  236. if (<FacilityPageListFacility>[] is M) {
  237. return data.map<FacilityPageListFacility>((Map<String, dynamic> e) => FacilityPageListFacility.fromJson(e)).toList() as M;
  238. }
  239. if (<FacilityPageListTimePeriod>[] is M) {
  240. return data.map<FacilityPageListTimePeriod>((Map<String, dynamic> e) => FacilityPageListTimePeriod.fromJson(e)).toList() as M;
  241. }
  242. if (<FacilityOrder>[] is M) {
  243. return data.map<FacilityOrder>((Map<String, dynamic> e) => FacilityOrder.fromJson(e)).toList() as M;
  244. }
  245. if (<FeedbackDetailEntity>[] is M) {
  246. return data.map<FeedbackDetailEntity>((Map<String, dynamic> e) => FeedbackDetailEntity.fromJson(e)).toList() as M;
  247. }
  248. if (<FeedbackDetailReplies>[] is M) {
  249. return data.map<FeedbackDetailReplies>((Map<String, dynamic> e) => FeedbackDetailReplies.fromJson(e)).toList() as M;
  250. }
  251. if (<FeedbackListEntity>[] is M) {
  252. return data.map<FeedbackListEntity>((Map<String, dynamic> e) => FeedbackListEntity.fromJson(e)).toList() as M;
  253. }
  254. if (<FeedbackItemEntity>[] is M) {
  255. return data.map<FeedbackItemEntity>((Map<String, dynamic> e) => FeedbackItemEntity.fromJson(e)).toList() as M;
  256. }
  257. if (<FormContentEntity>[] is M) {
  258. return data.map<FormContentEntity>((Map<String, dynamic> e) => FormContentEntity.fromJson(e)).toList() as M;
  259. }
  260. if (<FormDetailEntity>[] is M) {
  261. return data.map<FormDetailEntity>((Map<String, dynamic> e) => FormDetailEntity.fromJson(e)).toList() as M;
  262. }
  263. if (<FormOrder>[] is M) {
  264. return data.map<FormOrder>((Map<String, dynamic> e) => FormOrder.fromJson(e)).toList() as M;
  265. }
  266. if (<FormListEntity>[] is M) {
  267. return data.map<FormListEntity>((Map<String, dynamic> e) => FormListEntity.fromJson(e)).toList() as M;
  268. }
  269. if (<FormOptionEntity>[] is M) {
  270. return data.map<FormOptionEntity>((Map<String, dynamic> e) => FormOptionEntity.fromJson(e)).toList() as M;
  271. }
  272. if (<FormOrderEntity>[] is M) {
  273. return data.map<FormOrderEntity>((Map<String, dynamic> e) => FormOrderEntity.fromJson(e)).toList() as M;
  274. }
  275. if (<FormOrderOrder>[] is M) {
  276. return data.map<FormOrderOrder>((Map<String, dynamic> e) => FormOrderOrder.fromJson(e)).toList() as M;
  277. }
  278. if (<FormSubmittedEntity>[] is M) {
  279. return data.map<FormSubmittedEntity>((Map<String, dynamic> e) => FormSubmittedEntity.fromJson(e)).toList() as M;
  280. }
  281. if (<FormSubmittedEstateOnlineForm>[] is M) {
  282. return data.map<FormSubmittedEstateOnlineForm>((Map<String, dynamic> e) => FormSubmittedEstateOnlineForm.fromJson(e)).toList() as M;
  283. }
  284. if (<FormSubmittedOrder>[] is M) {
  285. return data.map<FormSubmittedOrder>((Map<String, dynamic> e) => FormSubmittedOrder.fromJson(e)).toList() as M;
  286. }
  287. if (<FormSubmittedPageEntity>[] is M) {
  288. return data.map<FormSubmittedPageEntity>((Map<String, dynamic> e) => FormSubmittedPageEntity.fromJson(e)).toList() as M;
  289. }
  290. if (<GarageSaleHistoryEntity>[] is M) {
  291. return data.map<GarageSaleHistoryEntity>((Map<String, dynamic> e) => GarageSaleHistoryEntity.fromJson(e)).toList() as M;
  292. }
  293. if (<GarageSaleHistoryList>[] is M) {
  294. return data.map<GarageSaleHistoryList>((Map<String, dynamic> e) => GarageSaleHistoryList.fromJson(e)).toList() as M;
  295. }
  296. if (<GarageSaleHistoryListOrderProducts>[] is M) {
  297. return data.map<GarageSaleHistoryListOrderProducts>((Map<String, dynamic> e) => GarageSaleHistoryListOrderProducts.fromJson(e)).toList() as M;
  298. }
  299. if (<GarageSaleRentDetailEntity>[] is M) {
  300. return data.map<GarageSaleRentDetailEntity>((Map<String, dynamic> e) => GarageSaleRentDetailEntity.fromJson(e)).toList() as M;
  301. }
  302. if (<GarageSaleRentDetailAccount>[] is M) {
  303. return data.map<GarageSaleRentDetailAccount>((Map<String, dynamic> e) => GarageSaleRentDetailAccount.fromJson(e)).toList() as M;
  304. }
  305. if (<GarageSaleRentEntity>[] is M) {
  306. return data.map<GarageSaleRentEntity>((Map<String, dynamic> e) => GarageSaleRentEntity.fromJson(e)).toList() as M;
  307. }
  308. if (<GarageSaleRentList>[] is M) {
  309. return data.map<GarageSaleRentList>((Map<String, dynamic> e) => GarageSaleRentList.fromJson(e)).toList() as M;
  310. }
  311. if (<GarageSaleRentListAccount>[] is M) {
  312. return data.map<GarageSaleRentListAccount>((Map<String, dynamic> e) => GarageSaleRentListAccount.fromJson(e)).toList() as M;
  313. }
  314. if (<HomeListEntity>[] is M) {
  315. return data.map<HomeListEntity>((Map<String, dynamic> e) => HomeListEntity.fromJson(e)).toList() as M;
  316. }
  317. if (<HomeListBanners>[] is M) {
  318. return data.map<HomeListBanners>((Map<String, dynamic> e) => HomeListBanners.fromJson(e)).toList() as M;
  319. }
  320. if (<HomeListLatestTransactions>[] is M) {
  321. return data.map<HomeListLatestTransactions>((Map<String, dynamic> e) => HomeListLatestTransactions.fromJson(e)).toList() as M;
  322. }
  323. if (<HomeListPropertyNews>[] is M) {
  324. return data.map<HomeListPropertyNews>((Map<String, dynamic> e) => HomeListPropertyNews.fromJson(e)).toList() as M;
  325. }
  326. if (<IdNameEntity>[] is M) {
  327. return data.map<IdNameEntity>((Map<String, dynamic> e) => IdNameEntity.fromJson(e)).toList() as M;
  328. }
  329. if (<LatestNewsDetailEntity>[] is M) {
  330. return data.map<LatestNewsDetailEntity>((Map<String, dynamic> e) => LatestNewsDetailEntity.fromJson(e)).toList() as M;
  331. }
  332. if (<LatestNewsPageEntity>[] is M) {
  333. return data.map<LatestNewsPageEntity>((Map<String, dynamic> e) => LatestNewsPageEntity.fromJson(e)).toList() as M;
  334. }
  335. if (<LatestNewsList>[] is M) {
  336. return data.map<LatestNewsList>((Map<String, dynamic> e) => LatestNewsList.fromJson(e)).toList() as M;
  337. }
  338. if (<MyfollowingListEntity>[] is M) {
  339. return data.map<MyfollowingListEntity>((Map<String, dynamic> e) => MyfollowingListEntity.fromJson(e)).toList() as M;
  340. }
  341. if (<MypostsNewsfeedEntity>[] is M) {
  342. return data.map<MypostsNewsfeedEntity>((Map<String, dynamic> e) => MypostsNewsfeedEntity.fromJson(e)).toList() as M;
  343. }
  344. if (<MypostsNewsfeedList>[] is M) {
  345. return data.map<MypostsNewsfeedList>((Map<String, dynamic> e) => MypostsNewsfeedList.fromJson(e)).toList() as M;
  346. }
  347. if (<MypostsNewsfeedListAccount>[] is M) {
  348. return data.map<MypostsNewsfeedListAccount>((Map<String, dynamic> e) => MypostsNewsfeedListAccount.fromJson(e)).toList() as M;
  349. }
  350. if (<MypostsSaleRentEntity>[] is M) {
  351. return data.map<MypostsSaleRentEntity>((Map<String, dynamic> e) => MypostsSaleRentEntity.fromJson(e)).toList() as M;
  352. }
  353. if (<MypostsSaleRentList>[] is M) {
  354. return data.map<MypostsSaleRentList>((Map<String, dynamic> e) => MypostsSaleRentList.fromJson(e)).toList() as M;
  355. }
  356. if (<NewsfeedCommentPublishEntity>[] is M) {
  357. return data.map<NewsfeedCommentPublishEntity>((Map<String, dynamic> e) => NewsfeedCommentPublishEntity.fromJson(e)).toList() as M;
  358. }
  359. if (<NewsfeedDetailEntity>[] is M) {
  360. return data.map<NewsfeedDetailEntity>((Map<String, dynamic> e) => NewsfeedDetailEntity.fromJson(e)).toList() as M;
  361. }
  362. if (<NewsfeedDetailAccount>[] is M) {
  363. return data.map<NewsfeedDetailAccount>((Map<String, dynamic> e) => NewsfeedDetailAccount.fromJson(e)).toList() as M;
  364. }
  365. if (<NewsfeedDetailComments>[] is M) {
  366. return data.map<NewsfeedDetailComments>((Map<String, dynamic> e) => NewsfeedDetailComments.fromJson(e)).toList() as M;
  367. }
  368. if (<NewsfeedDetailCommentsAccount>[] is M) {
  369. return data.map<NewsfeedDetailCommentsAccount>((Map<String, dynamic> e) => NewsfeedDetailCommentsAccount.fromJson(e)).toList() as M;
  370. }
  371. if (<NewsfeedDetailCommentsToAccount>[] is M) {
  372. return data.map<NewsfeedDetailCommentsToAccount>((Map<String, dynamic> e) => NewsfeedDetailCommentsToAccount.fromJson(e)).toList() as M;
  373. }
  374. if (<NewsfeedFollowingEntity>[] is M) {
  375. return data.map<NewsfeedFollowingEntity>((Map<String, dynamic> e) => NewsfeedFollowingEntity.fromJson(e)).toList() as M;
  376. }
  377. if (<NewsfeedFollowingList>[] is M) {
  378. return data.map<NewsfeedFollowingList>((Map<String, dynamic> e) => NewsfeedFollowingList.fromJson(e)).toList() as M;
  379. }
  380. if (<NewsfeedFollowingListAccount>[] is M) {
  381. return data.map<NewsfeedFollowingListAccount>((Map<String, dynamic> e) => NewsfeedFollowingListAccount.fromJson(e)).toList() as M;
  382. }
  383. if (<NewsfeedForyouEntity>[] is M) {
  384. return data.map<NewsfeedForyouEntity>((Map<String, dynamic> e) => NewsfeedForyouEntity.fromJson(e)).toList() as M;
  385. }
  386. if (<NewsfeedForyouList>[] is M) {
  387. return data.map<NewsfeedForyouList>((Map<String, dynamic> e) => NewsfeedForyouList.fromJson(e)).toList() as M;
  388. }
  389. if (<NewsfeedForyouListAccount>[] is M) {
  390. return data.map<NewsfeedForyouListAccount>((Map<String, dynamic> e) => NewsfeedForyouListAccount.fromJson(e)).toList() as M;
  391. }
  392. if (<NewsfeedNewsEntity>[] is M) {
  393. return data.map<NewsfeedNewsEntity>((Map<String, dynamic> e) => NewsfeedNewsEntity.fromJson(e)).toList() as M;
  394. }
  395. if (<NewsfeedNewsList>[] is M) {
  396. return data.map<NewsfeedNewsList>((Map<String, dynamic> e) => NewsfeedNewsList.fromJson(e)).toList() as M;
  397. }
  398. if (<NewsfeedNewsListAccount>[] is M) {
  399. return data.map<NewsfeedNewsListAccount>((Map<String, dynamic> e) => NewsfeedNewsListAccount.fromJson(e)).toList() as M;
  400. }
  401. if (<NoticeBoardAnnounDetailEntity>[] is M) {
  402. return data.map<NoticeBoardAnnounDetailEntity>((Map<String, dynamic> e) => NoticeBoardAnnounDetailEntity.fromJson(e)).toList() as M;
  403. }
  404. if (<NoticeBoardAnnounEntity>[] is M) {
  405. return data.map<NoticeBoardAnnounEntity>((Map<String, dynamic> e) => NoticeBoardAnnounEntity.fromJson(e)).toList() as M;
  406. }
  407. if (<NoticeBoardAnnounList>[] is M) {
  408. return data.map<NoticeBoardAnnounList>((Map<String, dynamic> e) => NoticeBoardAnnounList.fromJson(e)).toList() as M;
  409. }
  410. if (<NoticeBoardDocumentsEntity>[] is M) {
  411. return data.map<NoticeBoardDocumentsEntity>((Map<String, dynamic> e) => NoticeBoardDocumentsEntity.fromJson(e)).toList() as M;
  412. }
  413. if (<NoticeBoardDocumentsList>[] is M) {
  414. return data.map<NoticeBoardDocumentsList>((Map<String, dynamic> e) => NoticeBoardDocumentsList.fromJson(e)).toList() as M;
  415. }
  416. if (<NoticeBoardEventDetailEntity>[] is M) {
  417. return data.map<NoticeBoardEventDetailEntity>((Map<String, dynamic> e) => NoticeBoardEventDetailEntity.fromJson(e)).toList() as M;
  418. }
  419. if (<NoticeBoardEventEntity>[] is M) {
  420. return data.map<NoticeBoardEventEntity>((Map<String, dynamic> e) => NoticeBoardEventEntity.fromJson(e)).toList() as M;
  421. }
  422. if (<NoticeBoardEventList>[] is M) {
  423. return data.map<NoticeBoardEventList>((Map<String, dynamic> e) => NoticeBoardEventList.fromJson(e)).toList() as M;
  424. }
  425. if (<NotificationPageEntity>[] is M) {
  426. return data.map<NotificationPageEntity>((Map<String, dynamic> e) => NotificationPageEntity.fromJson(e)).toList() as M;
  427. }
  428. if (<NotificationPageList>[] is M) {
  429. return data.map<NotificationPageList>((Map<String, dynamic> e) => NotificationPageList.fromJson(e)).toList() as M;
  430. }
  431. if (<NotificationPageListData>[] is M) {
  432. return data.map<NotificationPageListData>((Map<String, dynamic> e) => NotificationPageListData.fromJson(e)).toList() as M;
  433. }
  434. if (<PaidServiceDetailEntity>[] is M) {
  435. return data.map<PaidServiceDetailEntity>((Map<String, dynamic> e) => PaidServiceDetailEntity.fromJson(e)).toList() as M;
  436. }
  437. if (<PaidServiceDetailMerchant>[] is M) {
  438. return data.map<PaidServiceDetailMerchant>((Map<String, dynamic> e) => PaidServiceDetailMerchant.fromJson(e)).toList() as M;
  439. }
  440. if (<PaidServiceDetailCategory>[] is M) {
  441. return data.map<PaidServiceDetailCategory>((Map<String, dynamic> e) => PaidServiceDetailCategory.fromJson(e)).toList() as M;
  442. }
  443. if (<PaidServiceDetailProducts>[] is M) {
  444. return data.map<PaidServiceDetailProducts>((Map<String, dynamic> e) => PaidServiceDetailProducts.fromJson(e)).toList() as M;
  445. }
  446. if (<PaidServiceDetailEvaluations>[] is M) {
  447. return data.map<PaidServiceDetailEvaluations>((Map<String, dynamic> e) => PaidServiceDetailEvaluations.fromJson(e)).toList() as M;
  448. }
  449. if (<PaidServiceDetailEvaluationsAccount>[] is M) {
  450. return data.map<PaidServiceDetailEvaluationsAccount>((Map<String, dynamic> e) => PaidServiceDetailEvaluationsAccount.fromJson(e)).toList() as M;
  451. }
  452. if (<PaidServiceEntity>[] is M) {
  453. return data.map<PaidServiceEntity>((Map<String, dynamic> e) => PaidServiceEntity.fromJson(e)).toList() as M;
  454. }
  455. if (<PaidServiceList>[] is M) {
  456. return data.map<PaidServiceList>((Map<String, dynamic> e) => PaidServiceList.fromJson(e)).toList() as M;
  457. }
  458. if (<PaidServiceListMerchant>[] is M) {
  459. return data.map<PaidServiceListMerchant>((Map<String, dynamic> e) => PaidServiceListMerchant.fromJson(e)).toList() as M;
  460. }
  461. if (<PaidServiceListCategory>[] is M) {
  462. return data.map<PaidServiceListCategory>((Map<String, dynamic> e) => PaidServiceListCategory.fromJson(e)).toList() as M;
  463. }
  464. if (<PaidServicePaySuccessInfoEntity>[] is M) {
  465. return data.map<PaidServicePaySuccessInfoEntity>((Map<String, dynamic> e) => PaidServicePaySuccessInfoEntity.fromJson(e)).toList() as M;
  466. }
  467. if (<PaidServicePaySuccessInfoAccount>[] is M) {
  468. return data.map<PaidServicePaySuccessInfoAccount>((Map<String, dynamic> e) => PaidServicePaySuccessInfoAccount.fromJson(e)).toList() as M;
  469. }
  470. if (<PaidServicePaySuccessInfoOrderService>[] is M) {
  471. return data.map<PaidServicePaySuccessInfoOrderService>((Map<String, dynamic> e) => PaidServicePaySuccessInfoOrderService.fromJson(e)).toList() as M;
  472. }
  473. if (<PaidServicePaySuccessInfoMerchant>[] is M) {
  474. return data.map<PaidServicePaySuccessInfoMerchant>((Map<String, dynamic> e) => PaidServicePaySuccessInfoMerchant.fromJson(e)).toList() as M;
  475. }
  476. if (<PaidServicePaySuccessInfoStaff>[] is M) {
  477. return data.map<PaidServicePaySuccessInfoStaff>((Map<String, dynamic> e) => PaidServicePaySuccessInfoStaff.fromJson(e)).toList() as M;
  478. }
  479. if (<PaidServicePaySuccessInfoOrderProducts>[] is M) {
  480. return data.map<PaidServicePaySuccessInfoOrderProducts>((Map<String, dynamic> e) => PaidServicePaySuccessInfoOrderProducts.fromJson(e)).toList() as M;
  481. }
  482. if (<PaidServicePaySuccessInfoEstate>[] is M) {
  483. return data.map<PaidServicePaySuccessInfoEstate>((Map<String, dynamic> e) => PaidServicePaySuccessInfoEstate.fromJson(e)).toList() as M;
  484. }
  485. if (<PaidServicePaySuccessInfoEstateUnit>[] is M) {
  486. return data.map<PaidServicePaySuccessInfoEstateUnit>((Map<String, dynamic> e) => PaidServicePaySuccessInfoEstateUnit.fromJson(e)).toList() as M;
  487. }
  488. if (<PaidServicePaySuccessInfoOrder>[] is M) {
  489. return data.map<PaidServicePaySuccessInfoOrder>((Map<String, dynamic> e) => PaidServicePaySuccessInfoOrder.fromJson(e)).toList() as M;
  490. }
  491. if (<PaymentIntentEntity>[] is M) {
  492. return data.map<PaymentIntentEntity>((Map<String, dynamic> e) => PaymentIntentEntity.fromJson(e)).toList() as M;
  493. }
  494. if (<PaymentPageEntity>[] is M) {
  495. return data.map<PaymentPageEntity>((Map<String, dynamic> e) => PaymentPageEntity.fromJson(e)).toList() as M;
  496. }
  497. if (<PaymentPageList>[] is M) {
  498. return data.map<PaymentPageList>((Map<String, dynamic> e) => PaymentPageList.fromJson(e)).toList() as M;
  499. }
  500. if (<OrderableEntity>[] is M) {
  501. return data.map<OrderableEntity>((Map<String, dynamic> e) =>
  502. OrderableEntity.fromJson(e)).toList() as M;
  503. }
  504. if (<PropertyNewsDetailEntity>[] is M) {
  505. return data.map<PropertyNewsDetailEntity>((Map<String, dynamic> e) => PropertyNewsDetailEntity.fromJson(e)).toList() as M;
  506. }
  507. if (<PropertyNewsEntity>[] is M) {
  508. return data.map<PropertyNewsEntity>((Map<String, dynamic> e) => PropertyNewsEntity.fromJson(e)).toList() as M;
  509. }
  510. if (<PropertyNewsList>[] is M) {
  511. return data.map<PropertyNewsList>((Map<String, dynamic> e) => PropertyNewsList.fromJson(e)).toList() as M;
  512. }
  513. if (<PropertySaleRentEntity>[] is M) {
  514. return data.map<PropertySaleRentEntity>((Map<String, dynamic> e) => PropertySaleRentEntity.fromJson(e)).toList() as M;
  515. }
  516. if (<PropertySaleRentList>[] is M) {
  517. return data.map<PropertySaleRentList>((Map<String, dynamic> e) => PropertySaleRentList.fromJson(e)).toList() as M;
  518. }
  519. if (<RepairServiceEntity>[] is M) {
  520. return data.map<RepairServiceEntity>((Map<String, dynamic> e) => RepairServiceEntity.fromJson(e)).toList() as M;
  521. }
  522. if (<RepairServiceList>[] is M) {
  523. return data.map<RepairServiceList>((Map<String, dynamic> e) => RepairServiceList.fromJson(e)).toList() as M;
  524. }
  525. if (<RepairServiceListMerchant>[] is M) {
  526. return data.map<RepairServiceListMerchant>((Map<String, dynamic> e) => RepairServiceListMerchant.fromJson(e)).toList() as M;
  527. }
  528. if (<RepairServiceListCategory>[] is M) {
  529. return data.map<RepairServiceListCategory>((Map<String, dynamic> e) => RepairServiceListCategory.fromJson(e)).toList() as M;
  530. }
  531. if (<RewardsActiveDetailEntity>[] is M) {
  532. return data.map<RewardsActiveDetailEntity>((Map<String, dynamic> e) => RewardsActiveDetailEntity.fromJson(e)).toList() as M;
  533. }
  534. if (<RewardsActiveDetailData>[] is M) {
  535. return data.map<RewardsActiveDetailData>((Map<String, dynamic> e) => RewardsActiveDetailData.fromJson(e)).toList() as M;
  536. }
  537. if (<RewardsActiveDetailDataAccount>[] is M) {
  538. return data.map<RewardsActiveDetailDataAccount>((Map<String, dynamic> e) => RewardsActiveDetailDataAccount.fromJson(e)).toList() as M;
  539. }
  540. if (<RewardsActiveDetailDataReward>[] is M) {
  541. return data.map<RewardsActiveDetailDataReward>((Map<String, dynamic> e) => RewardsActiveDetailDataReward.fromJson(e)).toList() as M;
  542. }
  543. if (<RewardsBuyEntity>[] is M) {
  544. return data.map<RewardsBuyEntity>((Map<String, dynamic> e) => RewardsBuyEntity.fromJson(e)).toList() as M;
  545. }
  546. if (<RewardsBuyReward>[] is M) {
  547. return data.map<RewardsBuyReward>((Map<String, dynamic> e) => RewardsBuyReward.fromJson(e)).toList() as M;
  548. }
  549. if (<RewardsBuyRewardRedeemable>[] is M) {
  550. return data.map<RewardsBuyRewardRedeemable>((Map<String, dynamic> e) => RewardsBuyRewardRedeemable.fromJson(e)).toList() as M;
  551. }
  552. if (<RewardsCategoryEntity>[] is M) {
  553. return data.map<RewardsCategoryEntity>((Map<String, dynamic> e) => RewardsCategoryEntity.fromJson(e)).toList() as M;
  554. }
  555. if (<RewardsDetailEntity>[] is M) {
  556. return data.map<RewardsDetailEntity>((Map<String, dynamic> e) => RewardsDetailEntity.fromJson(e)).toList() as M;
  557. }
  558. if (<RewardsDetailRedeemable>[] is M) {
  559. return data.map<RewardsDetailRedeemable>((Map<String, dynamic> e) => RewardsDetailRedeemable.fromJson(e)).toList() as M;
  560. }
  561. if (<RewardsHistoryEarnedEntity>[] is M) {
  562. return data.map<RewardsHistoryEarnedEntity>((Map<String, dynamic> e) => RewardsHistoryEarnedEntity.fromJson(e)).toList() as M;
  563. }
  564. if (<RewardsHistoryEarnedList>[] is M) {
  565. return data.map<RewardsHistoryEarnedList>((Map<String, dynamic> e) => RewardsHistoryEarnedList.fromJson(e)).toList() as M;
  566. }
  567. if (<RewardsHomeEntity>[] is M) {
  568. return data.map<RewardsHomeEntity>((Map<String, dynamic> e) => RewardsHomeEntity.fromJson(e)).toList() as M;
  569. }
  570. if (<RewardsHomeData>[] is M) {
  571. return data.map<RewardsHomeData>((Map<String, dynamic> e) => RewardsHomeData.fromJson(e)).toList() as M;
  572. }
  573. if (<RewardsHomeDataRewards>[] is M) {
  574. return data.map<RewardsHomeDataRewards>((Map<String, dynamic> e) => RewardsHomeDataRewards.fromJson(e)).toList() as M;
  575. }
  576. if (<RewardsHomeTesEntity>[] is M) {
  577. return data.map<RewardsHomeTesEntity>((Map<String, dynamic> e) => RewardsHomeTesEntity.fromJson(e)).toList() as M;
  578. }
  579. if (<RewardsHomeTesRewards>[] is M) {
  580. return data.map<RewardsHomeTesRewards>((Map<String, dynamic> e) => RewardsHomeTesRewards.fromJson(e)).toList() as M;
  581. }
  582. if (<RewardsHomeTestEntity>[] is M) {
  583. return data.map<RewardsHomeTestEntity>((Map<String, dynamic> e) => RewardsHomeTestEntity.fromJson(e)).toList() as M;
  584. }
  585. if (<RewardsHomeTxEntity>[] is M) {
  586. return data.map<RewardsHomeTxEntity>((Map<String, dynamic> e) => RewardsHomeTxEntity.fromJson(e)).toList() as M;
  587. }
  588. if (<RewardsIndexEntity>[] is M) {
  589. return data.map<RewardsIndexEntity>((Map<String, dynamic> e) => RewardsIndexEntity.fromJson(e)).toList() as M;
  590. }
  591. if (<RewardsIndexContinuous>[] is M) {
  592. return data.map<RewardsIndexContinuous>((Map<String, dynamic> e) => RewardsIndexContinuous.fromJson(e)).toList() as M;
  593. }
  594. if (<RewardsIndexTasks>[] is M) {
  595. return data.map<RewardsIndexTasks>((Map<String, dynamic> e) => RewardsIndexTasks.fromJson(e)).toList() as M;
  596. }
  597. if (<RewardsListEntity>[] is M) {
  598. return data.map<RewardsListEntity>((Map<String, dynamic> e) => RewardsListEntity.fromJson(e)).toList() as M;
  599. }
  600. if (<RewardsListList>[] is M) {
  601. return data.map<RewardsListList>((Map<String, dynamic> e) => RewardsListList.fromJson(e)).toList() as M;
  602. }
  603. if (<RewardsMyDetailEntity>[] is M) {
  604. return data.map<RewardsMyDetailEntity>((Map<String, dynamic> e) => RewardsMyDetailEntity.fromJson(e)).toList() as M;
  605. }
  606. if (<RewardsMyDetailAccount>[] is M) {
  607. return data.map<RewardsMyDetailAccount>((Map<String, dynamic> e) => RewardsMyDetailAccount.fromJson(e)).toList() as M;
  608. }
  609. if (<RewardsMyDetailReward>[] is M) {
  610. return data.map<RewardsMyDetailReward>((Map<String, dynamic> e) => RewardsMyDetailReward.fromJson(e)).toList() as M;
  611. }
  612. if (<RewardsMyEntity>[] is M) {
  613. return data.map<RewardsMyEntity>((Map<String, dynamic> e) => RewardsMyEntity.fromJson(e)).toList() as M;
  614. }
  615. if (<RewardsMyList>[] is M) {
  616. return data.map<RewardsMyList>((Map<String, dynamic> e) => RewardsMyList.fromJson(e)).toList() as M;
  617. }
  618. if (<RewardsMyListReward>[] is M) {
  619. return data.map<RewardsMyListReward>((Map<String, dynamic> e) => RewardsMyListReward.fromJson(e)).toList() as M;
  620. }
  621. if (<RewardsSearchEntity>[] is M) {
  622. return data.map<RewardsSearchEntity>((Map<String, dynamic> e) => RewardsSearchEntity.fromJson(e)).toList() as M;
  623. }
  624. if (<RewardsSearchRewards>[] is M) {
  625. return data.map<RewardsSearchRewards>((Map<String, dynamic> e) => RewardsSearchRewards.fromJson(e)).toList() as M;
  626. }
  627. if (<ServerTime>[] is M) {
  628. return data.map<ServerTime>((Map<String, dynamic> e) => ServerTime.fromJson(e)).toList() as M;
  629. }
  630. if (<ServiceCategoryEntity>[] is M) {
  631. return data.map<ServiceCategoryEntity>((Map<String, dynamic> e) => ServiceCategoryEntity.fromJson(e)).toList() as M;
  632. }
  633. if (<ServiceEvaluateListEntity>[] is M) {
  634. return data.map<ServiceEvaluateListEntity>((Map<String, dynamic> e) => ServiceEvaluateListEntity.fromJson(e)).toList() as M;
  635. }
  636. if (<ServiceEvaluateListList>[] is M) {
  637. return data.map<ServiceEvaluateListList>((Map<String, dynamic> e) => ServiceEvaluateListList.fromJson(e)).toList() as M;
  638. }
  639. if (<ServiceEvaluateListListAccount>[] is M) {
  640. return data.map<ServiceEvaluateListListAccount>((Map<String, dynamic> e) => ServiceEvaluateListListAccount.fromJson(e)).toList() as M;
  641. }
  642. if (<ServiceInProgressEntity>[] is M) {
  643. return data.map<ServiceInProgressEntity>((Map<String, dynamic> e) => ServiceInProgressEntity.fromJson(e)).toList() as M;
  644. }
  645. if (<ServiceInProgressList>[] is M) {
  646. return data.map<ServiceInProgressList>((Map<String, dynamic> e) => ServiceInProgressList.fromJson(e)).toList() as M;
  647. }
  648. if (<ServiceInProgressListService>[] is M) {
  649. return data.map<ServiceInProgressListService>((Map<String, dynamic> e) => ServiceInProgressListService.fromJson(e)).toList() as M;
  650. }
  651. if (<ServiceInProgressListMerchant>[] is M) {
  652. return data.map<ServiceInProgressListMerchant>((Map<String, dynamic> e) => ServiceInProgressListMerchant.fromJson(e)).toList() as M;
  653. }
  654. if (<ServiceOrderDetailEntity>[] is M) {
  655. return data.map<ServiceOrderDetailEntity>((Map<String, dynamic> e) => ServiceOrderDetailEntity.fromJson(e)).toList() as M;
  656. }
  657. if (<ServiceOrderDetailAccount>[] is M) {
  658. return data.map<ServiceOrderDetailAccount>((Map<String, dynamic> e) => ServiceOrderDetailAccount.fromJson(e)).toList() as M;
  659. }
  660. if (<ServiceOrderDetailOrderService>[] is M) {
  661. return data.map<ServiceOrderDetailOrderService>((Map<String, dynamic> e) => ServiceOrderDetailOrderService.fromJson(e)).toList() as M;
  662. }
  663. if (<ServiceOrderDetailMerchant>[] is M) {
  664. return data.map<ServiceOrderDetailMerchant>((Map<String, dynamic> e) => ServiceOrderDetailMerchant.fromJson(e)).toList() as M;
  665. }
  666. if (<ServiceOrderDetailStaff>[] is M) {
  667. return data.map<ServiceOrderDetailStaff>((Map<String, dynamic> e) => ServiceOrderDetailStaff.fromJson(e)).toList() as M;
  668. }
  669. if (<ServiceOrderDetailOrderProducts>[] is M) {
  670. return data.map<ServiceOrderDetailOrderProducts>((Map<String, dynamic> e) => ServiceOrderDetailOrderProducts.fromJson(e)).toList() as M;
  671. }
  672. if (<ServiceOrderDetailEstate>[] is M) {
  673. return data.map<ServiceOrderDetailEstate>((Map<String, dynamic> e) => ServiceOrderDetailEstate.fromJson(e)).toList() as M;
  674. }
  675. if (<ServiceOrderDetailEstateUnit>[] is M) {
  676. return data.map<ServiceOrderDetailEstateUnit>((Map<String, dynamic> e) => ServiceOrderDetailEstateUnit.fromJson(e)).toList() as M;
  677. }
  678. if (<ServiceOrderDetailOrder>[] is M) {
  679. return data.map<ServiceOrderDetailOrder>((Map<String, dynamic> e) =>
  680. ServiceOrderDetailOrder.fromJson(e)).toList() as M;
  681. }
  682. if (<ServiceRepairDetailEntity>[] is M) {
  683. return data.map<ServiceRepairDetailEntity>((Map<String, dynamic> e) => ServiceRepairDetailEntity.fromJson(e)).toList() as M;
  684. }
  685. if (<ServiceRepairDetailMerchant>[] is M) {
  686. return data.map<ServiceRepairDetailMerchant>((Map<String, dynamic> e) => ServiceRepairDetailMerchant.fromJson(e)).toList() as M;
  687. }
  688. if (<ServiceRepairDetailCategory>[] is M) {
  689. return data.map<ServiceRepairDetailCategory>((Map<String, dynamic> e) => ServiceRepairDetailCategory.fromJson(e)).toList() as M;
  690. }
  691. if (<ServiceTimePeriodEntity>[] is M) {
  692. return data.map<ServiceTimePeriodEntity>((Map<String, dynamic> e) => ServiceTimePeriodEntity.fromJson(e)).toList() as M;
  693. }
  694. if (<TextKonEntity>[] is M) {
  695. return data.map<TextKonEntity>((Map<String, dynamic> e) => TextKonEntity.fromJson(e)).toList() as M;
  696. }
  697. if (<UserMeEntity>[] is M) {
  698. return data.map<UserMeEntity>((Map<String, dynamic> e) => UserMeEntity.fromJson(e)).toList() as M;
  699. }
  700. if (<UserMeHouseholds>[] is M) {
  701. return data.map<UserMeHouseholds>((Map<String, dynamic> e) => UserMeHouseholds.fromJson(e)).toList() as M;
  702. }
  703. if (<UserMeEstates>[] is M) {
  704. return data.map<UserMeEstates>((Map<String, dynamic> e) => UserMeEstates.fromJson(e)).toList() as M;
  705. }
  706. if (<UserMeEstatesAccounts>[] is M) {
  707. return data.map<UserMeEstatesAccounts>((Map<String, dynamic> e) => UserMeEstatesAccounts.fromJson(e)).toList() as M;
  708. }
  709. if (<UserMeEstatesAccountsUnit>[] is M) {
  710. return data.map<UserMeEstatesAccountsUnit>((Map<String, dynamic> e) => UserMeEstatesAccountsUnit.fromJson(e)).toList() as M;
  711. }
  712. if (<UserMeDefaultUnit>[] is M) {
  713. return data.map<UserMeDefaultUnit>((Map<String, dynamic> e) => UserMeDefaultUnit.fromJson(e)).toList() as M;
  714. }
  715. if (<UserMeInformation>[] is M) {
  716. return data.map<UserMeInformation>((Map<String, dynamic> e) => UserMeInformation.fromJson(e)).toList() as M;
  717. }
  718. if (<VisitorPageEntity>[] is M) {
  719. return data.map<VisitorPageEntity>((Map<String, dynamic> e) => VisitorPageEntity.fromJson(e)).toList() as M;
  720. }
  721. if (<VisitorPageList>[] is M) {
  722. return data.map<VisitorPageList>((Map<String, dynamic> e) => VisitorPageList.fromJson(e)).toList() as M;
  723. }
  724. debugPrint("$M not found");
  725. return null;
  726. }
  727. static M? fromJsonAsT<M>(dynamic json) {
  728. if (json is M) {
  729. return json;
  730. }
  731. if (json is List) {
  732. return _getListChildType<M>(json.map((dynamic e) => e as Map<String, dynamic>).toList());
  733. } else {
  734. return jsonConvert.convert<M>(json);
  735. }
  736. }
  737. }
  738. class JsonConvertClassCollection {
  739. Map<String, JsonConvertFunction> convertFuncMap = {
  740. (AuthLoginEntity).toString(): AuthLoginEntity.fromJson,
  741. (CaptchaImgEntity).toString(): CaptchaImgEntity.fromJson,
  742. (CommPaymentDetailEntity).toString(): CommPaymentDetailEntity.fromJson,
  743. (CommPaymentDetailOrderable).toString(): CommPaymentDetailOrderable
  744. .fromJson,
  745. (FacilityBookEntity).toString(): FacilityBookEntity.fromJson,
  746. (FacilityBookFacilityType).toString(): FacilityBookFacilityType.fromJson,
  747. (FacilityBookFacilities).toString(): FacilityBookFacilities.fromJson,
  748. (FacilityBookFacilitiesPeriods).toString(): FacilityBookFacilitiesPeriods.fromJson,
  749. (FacilityIndexEntity).toString(): FacilityIndexEntity.fromJson,
  750. (FacilityPageEntity).toString(): FacilityPageEntity.fromJson,
  751. (FacilityDetail).toString(): FacilityDetail.fromJson,
  752. (FacilityPageListBooking).toString(): FacilityPageListBooking.fromJson,
  753. (FacilityPageListFacility).toString(): FacilityPageListFacility.fromJson,
  754. (FacilityPageListTimePeriod).toString(): FacilityPageListTimePeriod.fromJson,
  755. (FacilityOrder).toString(): FacilityOrder.fromJson,
  756. (FeedbackDetailEntity).toString(): FeedbackDetailEntity.fromJson,
  757. (FeedbackDetailReplies).toString(): FeedbackDetailReplies.fromJson,
  758. (FeedbackListEntity).toString(): FeedbackListEntity.fromJson,
  759. (FeedbackItemEntity).toString(): FeedbackItemEntity.fromJson,
  760. (FormContentEntity).toString(): FormContentEntity.fromJson,
  761. (FormDetailEntity).toString(): FormDetailEntity.fromJson,
  762. (FormOrder).toString(): FormOrder.fromJson,
  763. (FormListEntity).toString(): FormListEntity.fromJson,
  764. (FormOptionEntity).toString(): FormOptionEntity.fromJson,
  765. (FormOrderEntity).toString(): FormOrderEntity.fromJson,
  766. (FormOrderOrder).toString(): FormOrderOrder.fromJson,
  767. (FormSubmittedEntity).toString(): FormSubmittedEntity.fromJson,
  768. (FormSubmittedEstateOnlineForm).toString(): FormSubmittedEstateOnlineForm.fromJson,
  769. (FormSubmittedOrder).toString(): FormSubmittedOrder.fromJson,
  770. (FormSubmittedPageEntity).toString(): FormSubmittedPageEntity.fromJson,
  771. (GarageSaleHistoryEntity).toString(): GarageSaleHistoryEntity.fromJson,
  772. (GarageSaleHistoryList).toString(): GarageSaleHistoryList.fromJson,
  773. (GarageSaleHistoryListOrderProducts).toString(): GarageSaleHistoryListOrderProducts.fromJson,
  774. (GarageSaleRentDetailEntity).toString(): GarageSaleRentDetailEntity.fromJson,
  775. (GarageSaleRentDetailAccount).toString(): GarageSaleRentDetailAccount.fromJson,
  776. (GarageSaleRentEntity).toString(): GarageSaleRentEntity.fromJson,
  777. (GarageSaleRentList).toString(): GarageSaleRentList.fromJson,
  778. (GarageSaleRentListAccount).toString(): GarageSaleRentListAccount.fromJson,
  779. (HomeListEntity).toString(): HomeListEntity.fromJson,
  780. (HomeListBanners).toString(): HomeListBanners.fromJson,
  781. (HomeListLatestTransactions).toString(): HomeListLatestTransactions.fromJson,
  782. (HomeListPropertyNews).toString(): HomeListPropertyNews.fromJson,
  783. (IdNameEntity).toString(): IdNameEntity.fromJson,
  784. (LatestNewsDetailEntity).toString(): LatestNewsDetailEntity.fromJson,
  785. (LatestNewsPageEntity).toString(): LatestNewsPageEntity.fromJson,
  786. (LatestNewsList).toString(): LatestNewsList.fromJson,
  787. (MyfollowingListEntity).toString(): MyfollowingListEntity.fromJson,
  788. (MypostsNewsfeedEntity).toString(): MypostsNewsfeedEntity.fromJson,
  789. (MypostsNewsfeedList).toString(): MypostsNewsfeedList.fromJson,
  790. (MypostsNewsfeedListAccount).toString(): MypostsNewsfeedListAccount.fromJson,
  791. (MypostsSaleRentEntity).toString(): MypostsSaleRentEntity.fromJson,
  792. (MypostsSaleRentList).toString(): MypostsSaleRentList.fromJson,
  793. (NewsfeedCommentPublishEntity).toString(): NewsfeedCommentPublishEntity.fromJson,
  794. (NewsfeedDetailEntity).toString(): NewsfeedDetailEntity.fromJson,
  795. (NewsfeedDetailAccount).toString(): NewsfeedDetailAccount.fromJson,
  796. (NewsfeedDetailComments).toString(): NewsfeedDetailComments.fromJson,
  797. (NewsfeedDetailCommentsAccount).toString(): NewsfeedDetailCommentsAccount.fromJson,
  798. (NewsfeedDetailCommentsToAccount).toString(): NewsfeedDetailCommentsToAccount.fromJson,
  799. (NewsfeedFollowingEntity).toString(): NewsfeedFollowingEntity.fromJson,
  800. (NewsfeedFollowingList).toString(): NewsfeedFollowingList.fromJson,
  801. (NewsfeedFollowingListAccount).toString(): NewsfeedFollowingListAccount.fromJson,
  802. (NewsfeedForyouEntity).toString(): NewsfeedForyouEntity.fromJson,
  803. (NewsfeedForyouList).toString(): NewsfeedForyouList.fromJson,
  804. (NewsfeedForyouListAccount).toString(): NewsfeedForyouListAccount.fromJson,
  805. (NewsfeedNewsEntity).toString(): NewsfeedNewsEntity.fromJson,
  806. (NewsfeedNewsList).toString(): NewsfeedNewsList.fromJson,
  807. (NewsfeedNewsListAccount).toString(): NewsfeedNewsListAccount.fromJson,
  808. (NoticeBoardAnnounDetailEntity).toString(): NoticeBoardAnnounDetailEntity.fromJson,
  809. (NoticeBoardAnnounEntity).toString(): NoticeBoardAnnounEntity.fromJson,
  810. (NoticeBoardAnnounList).toString(): NoticeBoardAnnounList.fromJson,
  811. (NoticeBoardDocumentsEntity).toString(): NoticeBoardDocumentsEntity.fromJson,
  812. (NoticeBoardDocumentsList).toString(): NoticeBoardDocumentsList.fromJson,
  813. (NoticeBoardEventDetailEntity).toString(): NoticeBoardEventDetailEntity.fromJson,
  814. (NoticeBoardEventEntity).toString(): NoticeBoardEventEntity.fromJson,
  815. (NoticeBoardEventList).toString(): NoticeBoardEventList.fromJson,
  816. (NotificationPageEntity).toString(): NotificationPageEntity.fromJson,
  817. (NotificationPageList).toString(): NotificationPageList.fromJson,
  818. (NotificationPageListData).toString(): NotificationPageListData.fromJson,
  819. (PaidServiceDetailEntity).toString(): PaidServiceDetailEntity.fromJson,
  820. (PaidServiceDetailMerchant).toString(): PaidServiceDetailMerchant.fromJson,
  821. (PaidServiceDetailCategory).toString(): PaidServiceDetailCategory.fromJson,
  822. (PaidServiceDetailProducts).toString(): PaidServiceDetailProducts.fromJson,
  823. (PaidServiceDetailEvaluations).toString(): PaidServiceDetailEvaluations.fromJson,
  824. (PaidServiceDetailEvaluationsAccount).toString(): PaidServiceDetailEvaluationsAccount.fromJson,
  825. (PaidServiceEntity).toString(): PaidServiceEntity.fromJson,
  826. (PaidServiceList).toString(): PaidServiceList.fromJson,
  827. (PaidServiceListMerchant).toString(): PaidServiceListMerchant.fromJson,
  828. (PaidServiceListCategory).toString(): PaidServiceListCategory.fromJson,
  829. (PaidServicePaySuccessInfoEntity).toString(): PaidServicePaySuccessInfoEntity.fromJson,
  830. (PaidServicePaySuccessInfoAccount).toString(): PaidServicePaySuccessInfoAccount.fromJson,
  831. (PaidServicePaySuccessInfoOrderService).toString(): PaidServicePaySuccessInfoOrderService.fromJson,
  832. (PaidServicePaySuccessInfoMerchant).toString(): PaidServicePaySuccessInfoMerchant.fromJson,
  833. (PaidServicePaySuccessInfoStaff).toString(): PaidServicePaySuccessInfoStaff.fromJson,
  834. (PaidServicePaySuccessInfoOrderProducts).toString(): PaidServicePaySuccessInfoOrderProducts.fromJson,
  835. (PaidServicePaySuccessInfoEstate).toString(): PaidServicePaySuccessInfoEstate.fromJson,
  836. (PaidServicePaySuccessInfoEstateUnit).toString(): PaidServicePaySuccessInfoEstateUnit.fromJson,
  837. (PaidServicePaySuccessInfoOrder).toString(): PaidServicePaySuccessInfoOrder.fromJson,
  838. (PaymentIntentEntity).toString(): PaymentIntentEntity.fromJson,
  839. (PaymentPageEntity).toString(): PaymentPageEntity.fromJson,
  840. (PaymentPageList).toString(): PaymentPageList.fromJson,
  841. (OrderableEntity).toString(): OrderableEntity.fromJson,
  842. (PropertyNewsDetailEntity).toString(): PropertyNewsDetailEntity.fromJson,
  843. (PropertyNewsEntity).toString(): PropertyNewsEntity.fromJson,
  844. (PropertyNewsList).toString(): PropertyNewsList.fromJson,
  845. (PropertySaleRentEntity).toString(): PropertySaleRentEntity.fromJson,
  846. (PropertySaleRentList).toString(): PropertySaleRentList.fromJson,
  847. (RepairServiceEntity).toString(): RepairServiceEntity.fromJson,
  848. (RepairServiceList).toString(): RepairServiceList.fromJson,
  849. (RepairServiceListMerchant).toString(): RepairServiceListMerchant.fromJson,
  850. (RepairServiceListCategory).toString(): RepairServiceListCategory.fromJson,
  851. (RewardsActiveDetailEntity).toString(): RewardsActiveDetailEntity.fromJson,
  852. (RewardsActiveDetailData).toString(): RewardsActiveDetailData.fromJson,
  853. (RewardsActiveDetailDataAccount).toString(): RewardsActiveDetailDataAccount.fromJson,
  854. (RewardsActiveDetailDataReward).toString(): RewardsActiveDetailDataReward.fromJson,
  855. (RewardsBuyEntity).toString(): RewardsBuyEntity.fromJson,
  856. (RewardsBuyReward).toString(): RewardsBuyReward.fromJson,
  857. (RewardsBuyRewardRedeemable).toString(): RewardsBuyRewardRedeemable.fromJson,
  858. (RewardsCategoryEntity).toString(): RewardsCategoryEntity.fromJson,
  859. (RewardsDetailEntity).toString(): RewardsDetailEntity.fromJson,
  860. (RewardsDetailRedeemable).toString(): RewardsDetailRedeemable.fromJson,
  861. (RewardsHistoryEarnedEntity).toString(): RewardsHistoryEarnedEntity.fromJson,
  862. (RewardsHistoryEarnedList).toString(): RewardsHistoryEarnedList.fromJson,
  863. (RewardsHomeEntity).toString(): RewardsHomeEntity.fromJson,
  864. (RewardsHomeData).toString(): RewardsHomeData.fromJson,
  865. (RewardsHomeDataRewards).toString(): RewardsHomeDataRewards.fromJson,
  866. (RewardsHomeTesEntity).toString(): RewardsHomeTesEntity.fromJson,
  867. (RewardsHomeTesRewards).toString(): RewardsHomeTesRewards.fromJson,
  868. (RewardsHomeTestEntity).toString(): RewardsHomeTestEntity.fromJson,
  869. (RewardsHomeTxEntity).toString(): RewardsHomeTxEntity.fromJson,
  870. (RewardsIndexEntity).toString(): RewardsIndexEntity.fromJson,
  871. (RewardsIndexContinuous).toString(): RewardsIndexContinuous.fromJson,
  872. (RewardsIndexTasks).toString(): RewardsIndexTasks.fromJson,
  873. (RewardsListEntity).toString(): RewardsListEntity.fromJson,
  874. (RewardsListList).toString(): RewardsListList.fromJson,
  875. (RewardsMyDetailEntity).toString(): RewardsMyDetailEntity.fromJson,
  876. (RewardsMyDetailAccount).toString(): RewardsMyDetailAccount.fromJson,
  877. (RewardsMyDetailReward).toString(): RewardsMyDetailReward.fromJson,
  878. (RewardsMyEntity).toString(): RewardsMyEntity.fromJson,
  879. (RewardsMyList).toString(): RewardsMyList.fromJson,
  880. (RewardsMyListReward).toString(): RewardsMyListReward.fromJson,
  881. (RewardsSearchEntity).toString(): RewardsSearchEntity.fromJson,
  882. (RewardsSearchRewards).toString(): RewardsSearchRewards.fromJson,
  883. (ServerTime).toString(): ServerTime.fromJson,
  884. (ServiceCategoryEntity).toString(): ServiceCategoryEntity.fromJson,
  885. (ServiceEvaluateListEntity).toString(): ServiceEvaluateListEntity.fromJson,
  886. (ServiceEvaluateListList).toString(): ServiceEvaluateListList.fromJson,
  887. (ServiceEvaluateListListAccount).toString(): ServiceEvaluateListListAccount.fromJson,
  888. (ServiceInProgressEntity).toString(): ServiceInProgressEntity.fromJson,
  889. (ServiceInProgressList).toString(): ServiceInProgressList.fromJson,
  890. (ServiceInProgressListService).toString(): ServiceInProgressListService.fromJson,
  891. (ServiceInProgressListMerchant).toString(): ServiceInProgressListMerchant.fromJson,
  892. (ServiceOrderDetailEntity).toString(): ServiceOrderDetailEntity.fromJson,
  893. (ServiceOrderDetailAccount).toString(): ServiceOrderDetailAccount.fromJson,
  894. (ServiceOrderDetailOrderService).toString(): ServiceOrderDetailOrderService.fromJson,
  895. (ServiceOrderDetailMerchant).toString(): ServiceOrderDetailMerchant.fromJson,
  896. (ServiceOrderDetailStaff).toString(): ServiceOrderDetailStaff.fromJson,
  897. (ServiceOrderDetailOrderProducts).toString(): ServiceOrderDetailOrderProducts.fromJson,
  898. (ServiceOrderDetailEstate).toString(): ServiceOrderDetailEstate.fromJson,
  899. (ServiceOrderDetailEstateUnit).toString(): ServiceOrderDetailEstateUnit
  900. .fromJson,
  901. (ServiceOrderDetailOrder).toString(): ServiceOrderDetailOrder.fromJson,
  902. (ServiceRepairDetailEntity).toString(): ServiceRepairDetailEntity.fromJson,
  903. (ServiceRepairDetailMerchant).toString(): ServiceRepairDetailMerchant.fromJson,
  904. (ServiceRepairDetailCategory).toString(): ServiceRepairDetailCategory.fromJson,
  905. (ServiceTimePeriodEntity).toString(): ServiceTimePeriodEntity.fromJson,
  906. (TextKonEntity).toString(): TextKonEntity.fromJson,
  907. (UserMeEntity).toString(): UserMeEntity.fromJson,
  908. (UserMeHouseholds).toString(): UserMeHouseholds.fromJson,
  909. (UserMeEstates).toString(): UserMeEstates.fromJson,
  910. (UserMeEstatesAccounts).toString(): UserMeEstatesAccounts.fromJson,
  911. (UserMeEstatesAccountsUnit).toString(): UserMeEstatesAccountsUnit.fromJson,
  912. (UserMeDefaultUnit).toString(): UserMeDefaultUnit.fromJson,
  913. (UserMeInformation).toString(): UserMeInformation.fromJson,
  914. (VisitorPageEntity).toString(): VisitorPageEntity.fromJson,
  915. (VisitorPageList).toString(): VisitorPageList.fromJson,
  916. };
  917. bool containsKey(String type) {
  918. return convertFuncMap.containsKey(type);
  919. }
  920. JsonConvertFunction? operator [](String key) {
  921. return convertFuncMap[key];
  922. }
  923. }