@override Object toJson() => { 'parent': parent, 'memory': ?memory?.toJson(), if (memoryId.isNotDefault) 'memoryId': memoryId, };