toJson method
Implementation
Map<String, dynamic> toJson() => {
if (maxUses != null) 'max_uses': maxUses,
if (maxResults != null) 'max_results': maxResults,
if (allowedDomains != null) 'allowed_domains': allowedDomains,
if (blockedDomains != null) 'blocked_domains': blockedDomains,
if (location != null) 'location': location!.toJson(),
if (mode != null) 'mode': mode,
if (fromDate != null) 'from_date': fromDate,
if (toDate != null) 'to_date': toDate,
if (searchType != null) 'search_type': searchType!.name,
if (contextSize != null) 'context_size': contextSize!.name,
if (searchPrompt != null) 'search_prompt': searchPrompt,
'strategy': strategy.name,
'enabled': enabled,
};