toJson method

Map<String, dynamic> toJson()

Implementation

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