toJson method
Implementation
Map<String, dynamic> toJson() => {
'mailboxPath': mailboxPath,
'mailboxType': mailboxType.name,
if (ownerPeerId != null) 'ownerPeerId': ownerPeerId,
'messageCount': messageCount,
'timestamp': timestamp,
if (serverPeerId != null) 'serverPeerId': serverPeerId,
};