class GenericRespModel { GenericRespModel({ this.data, this.messageStatus, this.totalItemsCount, this.message, }); dynamic data; int? messageStatus; int? totalItemsCount; String? message; factory GenericRespModel.fromJson(Map json) => GenericRespModel( data: json["data"], messageStatus: json["messageStatus"], totalItemsCount: json["totalItemsCount"], message: json["message"], ); Map toJson() => { "data": data, "messageStatus": messageStatus, "totalItemsCount": totalItemsCount, "message": message, }; } class AdsCreationPayloadModel { Ads? ads; VehiclePosting? vehiclePosting; AdsCreationPayloadModel({this.ads, this.vehiclePosting}); AdsCreationPayloadModel.fromJson(Map json) { ads = json['ads'] != null ? Ads.fromJson(json['ads']) : null; vehiclePosting = json['vehiclePosting'] != null ? VehiclePosting.fromJson(json['vehiclePosting']) : null; } Map toJson() { final Map data = {}; if (ads != null) { data['ads'] = ads!.toJson(); } if (vehiclePosting != null) { data['vehiclePosting'] = vehiclePosting!.toJson(); } return data; } } class Ads { int? id; int? adsDurationID; String? startDate; int? countryId; List? specialServiceIDs; bool? isMCHandled; Ads({this.id, this.adsDurationID, this.startDate, this.countryId, this.specialServiceIDs, this.isMCHandled}); Ads.fromJson(Map json) { id = json['id']; adsDurationID = json['adsDurationID']; startDate = json['startDate']; countryId = json['countryId']; specialServiceIDs = json['specialServiceIDs'].cast(); isMCHandled = json['isMCHandled']; } Map toJson() { final Map data = {}; data['id'] = id; data['adsDurationID'] = adsDurationID; data['startDate'] = startDate; data['countryId'] = countryId; data['specialServiceIDs'] = specialServiceIDs; data['isMCHandled'] = isMCHandled; return data; } @override String toString() { return 'Ads{id: $id, adsDurationID: $adsDurationID, startDate: $startDate, countryId: $countryId, specialServiceIDs: $specialServiceIDs, isMCHandled: $isMCHandled}'; } } class VehiclePosting { int? id; String? userID; int? vehicleType; int? vehicleModelID; int? vehicleModelYearID; int? vehicleColorID; int? vehicleCategoryID; int? vehicleConditionID; int? vehicleMileageID; int? vehicleTransmissionID; int? vehicleSellerTypeID; int? cityID; int? price; String? vehicleVIN; String? vehicleDescription; String? vehicleTitle; String? vehicleDescriptionN; bool? isFinanceAvailable; int? warantyYears; int? demandAmount; int? adStatus; List? vehiclePostingImages; List? vehiclePostingDamageParts; String? phoneNo; String? whatsAppNo; VehiclePosting( {this.id, this.userID, this.vehicleType, this.vehicleModelID, this.vehicleModelYearID, this.vehicleColorID, this.vehicleCategoryID, this.vehicleConditionID, this.vehicleMileageID, this.vehicleTransmissionID, this.vehicleSellerTypeID, this.cityID, this.price, this.vehicleVIN, this.vehicleDescription, this.vehicleTitle, this.vehicleDescriptionN, this.isFinanceAvailable, this.warantyYears, this.demandAmount, this.adStatus, this.phoneNo, this.whatsAppNo, this.vehiclePostingImages, this.vehiclePostingDamageParts}); VehiclePosting.fromJson(Map json) { id = json['id']; userID = json['userID']; vehicleType = json['vehicleType']; vehicleModelID = json['vehicleModelID']; vehicleModelYearID = json['vehicleModelYearID']; vehicleColorID = json['vehicleColorID']; vehicleCategoryID = json['vehicleCategoryID']; vehicleConditionID = json['vehicleConditionID']; vehicleMileageID = json['vehicleMileageID']; vehicleTransmissionID = json['vehicleTransmissionID']; vehicleSellerTypeID = json['vehicleSellerTypeID']; cityID = json['cityID']; price = json['price']; vehicleVIN = json['vehicleVIN']; vehicleDescription = json['vehicleDescription']; vehicleTitle = json['vehicleTitle']; vehicleDescriptionN = json['vehicleDescriptionN']; isFinanceAvailable = json['isFinanceAvailable']; warantyYears = json['warantyYears']; demandAmount = json['demandAmount']; adStatus = json['adStatus']; phoneNo = json['phoneNo']; whatsAppNo = json['whatsAppNo']; if (json['vehiclePostingImages'] != null) { vehiclePostingImages = []; json['vehiclePostingImages'].forEach((v) { vehiclePostingImages!.add(VehiclePostingImages.fromJson(v)); }); } if (json['vehiclePostingDamageParts'] != null) { vehiclePostingDamageParts = []; json['vehiclePostingDamageParts'].forEach((v) { vehiclePostingDamageParts!.add(VehiclePostingDamageParts.fromJson(v)); }); } } Map toJson() { final Map data = {}; data['id'] = id; data['userID'] = userID; data['vehicleType'] = vehicleType; data['vehicleModelID'] = vehicleModelID; data['vehicleModelYearID'] = vehicleModelYearID; data['vehicleColorID'] = vehicleColorID; data['vehicleCategoryID'] = vehicleCategoryID; data['vehicleConditionID'] = vehicleConditionID; data['vehicleMileageID'] = vehicleMileageID; data['vehicleTransmissionID'] = vehicleTransmissionID; data['vehicleSellerTypeID'] = vehicleSellerTypeID; data['cityID'] = cityID; data['price'] = price; data['vehicleVIN'] = vehicleVIN; data['vehicleDescription'] = vehicleDescription; data['vehicleTitle'] = vehicleTitle; data['vehicleDescriptionN'] = vehicleDescriptionN; data['isFinanceAvailable'] = isFinanceAvailable; data['warantyYears'] = warantyYears; data['demandAmount'] = demandAmount; data['adStatus'] = adStatus; data['phoneNo'] = phoneNo; data['whatsAppNo'] = whatsAppNo; if (vehiclePostingImages != null) { data['vehiclePostingImages'] = vehiclePostingImages!.map((v) => v.toJson()).toList(); } if (vehiclePostingDamageParts != null) { data['vehiclePostingDamageParts'] = vehiclePostingDamageParts!.map((v) => v.toJson()).toList(); } return data; } @override String toString() { return 'VehiclePosting{id: $id, userID: $userID, vehicleType: $vehicleType, vehicleModelID: $vehicleModelID, vehicleModelYearID: $vehicleModelYearID, vehicleColorID: $vehicleColorID, vehicleCategoryID: $vehicleCategoryID, vehicleConditionID: $vehicleConditionID, vehicleMileageID: $vehicleMileageID, vehicleTransmissionID: $vehicleTransmissionID, vehicleSellerTypeID: $vehicleSellerTypeID, cityID: $cityID, price: $price, vehicleVIN: $vehicleVIN, vehicleDescription: $vehicleDescription, vehicleTitle: $vehicleTitle, vehicleDescriptionN: $vehicleDescriptionN, isFinanceAvailable: $isFinanceAvailable, warantyYears: $warantyYears, demandAmount: $demandAmount, adStatus: $adStatus, vehiclePostingImages: $vehiclePostingImages, vehiclePostingDamageParts: $vehiclePostingDamageParts, phoneNo: $phoneNo, whatsAppNo: $whatsAppNo}'; } } class VehiclePostingImages { int? id; String? imageName; String? imageUrl; String? imageStr; int? vehiclePostingID; String? vehiclePosting; VehiclePostingImages({this.id, this.imageName, this.imageUrl, this.imageStr, this.vehiclePostingID, this.vehiclePosting}); VehiclePostingImages.fromJson(Map json) { id = json['id']; imageName = json['imageName']; imageUrl = json['imageUrl']; imageStr = json['imageStr']; vehiclePostingID = json['vehiclePostingID']; vehiclePosting = json['vehiclePosting']; } Map toJson() { final Map data = {}; data['id'] = id; data['imageName'] = imageName; data['imageUrl'] = imageUrl; data['imageStr'] = imageStr; data['vehiclePostingID'] = vehiclePostingID; data['vehiclePosting'] = vehiclePosting; return data; } @override String toString() { return 'VehiclePostingImages{id: $id, imageName: $imageName, imageUrl: $imageUrl, imageStr: $imageStr, vehiclePostingID: $vehiclePostingID, vehiclePosting: $vehiclePosting}'; } } class RequestPostingImages { int? id; String? requestImage; int? requestID; RequestPostingImages({this.id, this.requestImage, this.requestID}); RequestPostingImages.fromJson(Map json) { id = json['id']; requestImage = json['requestImage']; requestID = json['requestID']; } Map toJson() { final Map data = {}; data['id'] = id ?? 0; data['requestImage'] = requestImage; data['requestID'] = requestID ?? 0; return data; } @override String toString() { return 'RequestPostingImages{id: $id, requestImage: $requestImage, requestID: $requestID}'; } } class VehiclePostingDamageParts { int? id; String? comment; String? vehicleImageBase64; int? vehicleDamagePartID; int? vehiclePostingID; bool? isActive; VehiclePostingDamageParts({this.id, this.comment, this.vehicleImageBase64, this.vehicleDamagePartID, this.vehiclePostingID, this.isActive}); VehiclePostingDamageParts.fromJson(Map json) { id = json['id']; comment = json['comment']; vehicleImageBase64 = json['vehicleImageBase64']; vehicleDamagePartID = json['vehicleDamagePartID']; vehiclePostingID = json['vehiclePostingID']; isActive = json['isActive']; } Map toJson() { final Map data = {}; data['id'] = id; data['comment'] = comment; data['vehicleImageBase64'] = vehicleImageBase64; data['vehicleDamagePartID'] = vehicleDamagePartID; data['vehiclePostingID'] = vehiclePostingID; data['isActive'] = isActive; return data; } // @override // String toString() { // return 'VehiclePostingDamageParts{id: $id, comment: $comment, vehicleImageBase64: $vehicleImageBase64, vehicleDamagePartID: $vehicleDamagePartID, vehiclePostingID: $vehiclePostingID, isActive: $isActive}'; // } }