Map<String, Object?> toJson() { var levels = this.levels; final json = <String, Object?>{}; json[r'levels'] = levels.map((i) => i.toJson()).toList(); return json; }