toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
    json[r'subject'] = this.subject;
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
    json[r'body'] = this.body;
  if (this.isRead != null) {
    json[r'is_read'] = this.isRead;
  } else {
    json[r'is_read'] = null;
  }
  if (this.created != null) {
    json[r'created'] = this.created!.toUtc().toIso8601String();
  } else {
    json[r'created'] = null;
  }
  if (this.eventAlias != null) {
    json[r'event_alias'] = this.eventAlias;
  } else {
    json[r'event_alias'] = null;
  }
  return json;
}