toJson method
Implementation
Map<String, dynamic> toJson() {
final messageType = this.messageType;
final senderId = this.senderId;
return {
if (messageType != null) 'MessageType': messageType.toValue(),
if (senderId != null) 'SenderId': senderId,
};
}