class CommonDatumObjModel { CommonDatumObjModel({ required this.status, required this.statusCode, required this.message, required this.data, }); final String? status; final int? statusCode; final String? message; final List data; factory CommonDatumObjModel.fromJson(Map json) { return CommonDatumObjModel( status: json["status"], statusCode: json["status_code"], message: json["message"], data: json["data"] == null ? [] : List.from( json["data"]!.map((x) => CommonDatumObjModelData.fromJson(x))), ); } } class CommonDatumObjModelData { CommonDatumObjModelData({ required this.id, required this.likecount, required this.isISaved, required this.tagsXid, required this.isILiked, required this.totalComment, required this.totalSave, required this.iamPrincipalXid, required this.postIn, required this.caption, required this.image, required this.manageTagsXids, required this.postAs, required this.ctaTitle, required this.ctaLink, required this.createdAt, required this.likeIcon, required this.totalViewCount, required this.totalReactionCount, required this.totalCommentCount, required this.totalImpressionCount, required this.totalPopularScore, required this.totalHoursAgo, this.iamPrincipal, this.community, required this.attachTags, }); final int? id; final int? likecount; final bool? isISaved; final List tagsXid; final bool? isILiked; final int? totalComment; final int? totalSave; final int? iamPrincipalXid; final int? postIn; final String? caption; final String? image; final String? manageTagsXids; final String? postAs; final String? ctaTitle; final String? ctaLink; final DateTime? createdAt; final LikeIcon1? likeIcon; final int? totalViewCount; final int? totalReactionCount; final int? totalCommentCount; final int? totalImpressionCount; final int? totalPopularScore; final int? totalHoursAgo; final IamPrincipal? iamPrincipal; final Community? community; final List attachTags; factory CommonDatumObjModelData.fromJson(Map json) { return CommonDatumObjModelData( id: json["id"], likecount: json["likecount"], isISaved: json["is_i_saved"], tagsXid: json["tags_xid"] == null ? [] : List.from(json["tags_xid"]!.map((x) => x)), isILiked: json["is_i_liked"], totalComment: json["total_comment"], totalSave: json["total_save"], iamPrincipalXid: json["iam_principal_xid"], postIn: json["post_in"], caption: json["caption"], image: json["image"], manageTagsXids: json["manage_tags_xids"], postAs: json["post_as"], ctaTitle: json["cta_title"], ctaLink: json["cta_link"], createdAt: DateTime.tryParse(json["created_at"] ?? ""), likeIcon: json["likeIcon"] == null ? null : LikeIcon1.fromJson(json["likeIcon"]), totalViewCount: json["totalViewCount"], totalReactionCount: json["totalReactionCount"], totalCommentCount: json["totalCommentCount"], totalImpressionCount: json["totalImpressionCount"], totalPopularScore: json["totalPopularScore"], totalHoursAgo: json["totalHoursAgo"], iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]), community: json["community"] == null ? null : Community.fromJson(json["community"]), attachTags: json["attach_tags"] == null ? [] : List.from( json["attach_tags"]!.map((x) => AttachTag1.fromJson(x))), ); } } class AttachTag1 { AttachTag1({ required this.managePostXid, required this.manageTagXid, required this.manageTag, }); final int? managePostXid; final int? manageTagXid; final ManageTagPopular? manageTag; factory AttachTag1.fromJson(Map json) { return AttachTag1( managePostXid: json["manage_post_xid"], manageTagXid: json["manage_tag_xid"], manageTag: json["manage_tag"] == null ? null : ManageTagPopular.fromJson(json["manage_tag"]), ); } } class ManageTagPopular { ManageTagPopular({ required this.id, required this.isPinned, required this.name, }); final int? id; final bool? isPinned; final String? name; factory ManageTagPopular.fromJson(Map json) { return ManageTagPopular( id: json["id"], isPinned: json["is_pinned"], name: json["name"], ); } } class Community { Community({ required this.id, required this.communityProfilePhoto, required this.communityName, }); final int? id; final String? communityProfilePhoto; final String? communityName; factory Community.fromJson(Map json) { return Community( id: json["id"], communityProfilePhoto: json["community_profile_photo"], communityName: json["community_name"], ); } } class IamPrincipal { IamPrincipal({ required this.id, required this.isUserPinned, required this.principalTypeXid, required this.userName, required this.fullName, required this.profilePhoto, }); final int? id; final bool? isUserPinned; final int? principalTypeXid; final String? userName; final String? fullName; final String? profilePhoto; factory IamPrincipal.fromJson(Map json) { return IamPrincipal( id: json["id"], isUserPinned: json["is_user_pinned"], principalTypeXid: json["principal_type_xid"], userName: json["user_name"], fullName: json["full_name"], profilePhoto: json["profile_photo"], ); } } class LikeIcon1 { LikeIcon1({ required this.likeIconsXid, required this.likeIcon, }); final int? likeIconsXid; final LikeIconClass1? likeIcon; factory LikeIcon1.fromJson(Map json) { return LikeIcon1( likeIconsXid: json["like_icons_xid"], likeIcon: json["like_icon"] == null ? null : LikeIconClass1.fromJson(json["like_icon"]), ); } } class LikeIconClass1 { LikeIconClass1({ required this.id, required this.image, }); final int? id; final String? image; factory LikeIconClass1.fromJson(Map json) { return LikeIconClass1( id: json["id"], image: json["image"], ); } }