Map<String, Object?> encode() => { if (trendGroupSort != null) 'trend_group_sort': [for (final e in trendGroupSort!) e.encode()], };