toMap method
Implementation
Map<String, dynamic> toMap() {
return {
if (name != null) 'name': name,
if (value != null) 'value': value,
if (values != null) 'values': values,
if (docCountErrorUpperBound != null)
'docCountErrorUpperBound': docCountErrorUpperBound,
if (sumOtherDocCount != null) 'sumOtherDocCount': sumOtherDocCount,
if (docCount != null) 'docCount': docCount,
if (hits != null) 'hits': hits!.map((i) => i.toMap()).toList(),
if (buckets != null) 'buckets': buckets!.map((i) => i.toMap()).toList(),
};
}