Map<String, dynamic> toJson() { final Map<String, dynamic> data = <String, dynamic>{}; if (safetyRatings != null) { data['safetyRatings'] = safetyRatings!.map((v) => v.toJson()).toList(); } return data; }