@override Object toJson() => { if (objective.isNotDefault) 'objective': objective.toJson(), if (featureStatsAnomaly case final featureStatsAnomaly?) 'featureStatsAnomaly': featureStatsAnomaly.toJson(), };