toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.provider != null) {
    json[r'provider'] = this.provider;
  } else {
    json[r'provider'] = null;
  }
  if (this.accountId != null) {
    json[r'accountId'] = this.accountId;
  } else {
    json[r'accountId'] = null;
  }
    json[r'channelId'] = this.channelId;
    json[r'userId'] = this.userId;
    json[r'text'] = this.text;
  if (this.threadId != null) {
    json[r'threadId'] = this.threadId;
  } else {
    json[r'threadId'] = null;
  }
    json[r'timestamp'] = this.timestamp.toUtc().toIso8601String();
  if (this.replyCount != null) {
    json[r'replyCount'] = this.replyCount;
  } else {
    json[r'replyCount'] = null;
  }
    json[r'extra'] = this.extra;
  return json;
}