toJson method
Implementation
Map<String, Object?> toJson() => {
if (granularity != null) 'granularity': granularity,
if (singleThread != null) 'singleThread': singleThread,
if (targetId != null) 'targetId': targetId,
'threadId': threadId,
};