Map<String, dynamic> toMap() { return { 'facets': facets?.toMap(), 'totalItems': totalItems, 'items': items?.map((x) => x.toMap()).toList(), }; }