toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'type': type.name,
'connection': connection,
if (models != null) 'models': (models!.toList()..sort()),
if (lagThreshold != null) 'lagThreshold': _format(lagThreshold!),
};