@override Object toJson() => { if (memory != null) 'memory': memory!.toJson(), if (action.isNotDefault) 'action': action.toJson(), };