toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.from != null) {
    json[r'from'] = this.from;
  } else {
    json[r'from'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.userId != null) {
    json[r'userId'] = this.userId;
  } else {
    json[r'userId'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  return json;
}