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