toJson method
Implementation
@override
Object toJson() => {
if (objectiveSpec case final objectiveSpec?)
'objectiveSpec': objectiveSpec.toJson(),
if (notificationSpec case final notificationSpec?)
'notificationSpec': notificationSpec.toJson(),
if (outputSpec case final outputSpec?) 'outputSpec': outputSpec.toJson(),
};