Converts to JSON.
Map<String, dynamic> toJson() => { 'file_id': fileId, if (tools != null) 'tools': tools!.map((t) => t.toJson()).toList(), };