core.Map<core.String, core.dynamic> toJson() => { if (mode != null) 'mode': mode!, if (name != null) 'name': name!, if (type != null) 'type': type!, };