core.Map<core.String, core.dynamic> toJson() => { if (customFields != null) 'customFields': customFields!, if (field != null) 'field': field!, if (metric != null) 'metric': metric!, };