/// Hauptklasse für die PTV Location Response class PTVModel { List? locations; String? noMatchFeedbackId; PTVModel({this.locations, this.noMatchFeedbackId}); PTVModel.fromJson(Map json) { if (json['locations'] != null) { locations = []; json['locations'].forEach((v) { locations!.add(Locations.fromJson(v)); }); } noMatchFeedbackId = json['noMatchFeedbackId']; } Map toJson() { final Map data = {}; if (locations != null) { data['locations'] = locations!.map((v) => v.toJson()).toList(); } data['noMatchFeedbackId'] = noMatchFeedbackId; return data; } } class Locations { ReferencePosition? referencePosition; Address? address; String? locationType; Quality? quality; String? formattedAddress; String? feedbackId; Locations( {this.referencePosition, this.address, this.locationType, this.quality, this.formattedAddress, this.feedbackId}); Locations.fromJson(Map json) { referencePosition = json['referencePosition'] != null ? ReferencePosition.fromJson(json['referencePosition']) : null; address = json['address'] != null ? Address.fromJson(json['address']) : null; locationType = json['locationType']; quality = json['quality'] != null ? Quality.fromJson(json['quality']) : null; formattedAddress = json['formattedAddress']; feedbackId = json['feedbackId']; } Map toJson() { final Map data = {}; if (referencePosition != null) { data['referencePosition'] = referencePosition!.toJson(); } if (address != null) { data['address'] = address!.toJson(); } data['locationType'] = locationType; if (quality != null) { data['quality'] = quality!.toJson(); } data['formattedAddress'] = formattedAddress; data['feedbackId'] = feedbackId; return data; } } class ReferencePosition { double? latitude; double? longitude; ReferencePosition({this.latitude, this.longitude}); ReferencePosition.fromJson(Map json) { latitude = json['latitude']; longitude = json['longitude']; } Map toJson() { final Map data = {}; data['latitude'] = latitude; data['longitude'] = longitude; return data; } } class Address { String? countryName; String? state; String? province; String? city; String? district; String? subdistrict; String? street; String? houseNumber; String? countryCodeIsoAlpha2; String? countryCodeIsoAlpha3; String? countryCode; Address( {this.countryName, this.state, this.province, this.city, this.district, this.subdistrict, this.street, this.houseNumber, this.countryCodeIsoAlpha2, this.countryCodeIsoAlpha3, this.countryCode}); Address.fromJson(Map json) { countryName = json['countryName']; state = json['state']; province = json['province']; city = json['city']; district = json['district']; subdistrict = json['subdistrict']; street = json['street']; houseNumber = json['houseNumber']; countryCodeIsoAlpha2 = json['countryCodeIsoAlpha2']; countryCodeIsoAlpha3 = json['countryCodeIsoAlpha3']; countryCode = json['countryCode']; } Map toJson() { final Map data = {}; data['countryName'] = countryName; data['state'] = state; data['province'] = province; data['city'] = city; data['district'] = district; data['subdistrict'] = subdistrict; data['street'] = street; data['houseNumber'] = houseNumber; data['countryCodeIsoAlpha2'] = countryCodeIsoAlpha2; data['countryCodeIsoAlpha3'] = countryCodeIsoAlpha3; data['countryCode'] = countryCode; return data; } } class Quality { int? distance; Quality({this.distance}); Quality.fromJson(Map json) { distance = json['distance']; } Map toJson() { final Map data = {}; data['distance'] = distance; return data; } }