toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.createdAt != null) {
json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
} else {
json[r'createdAt'] = null;
}
if (this.creatorSubjectId != null) {
json[r'creatorSubjectId'] = this.creatorSubjectId;
} else {
json[r'creatorSubjectId'] = null;
}
if (this.creatorSubjectName != null) {
json[r'creatorSubjectName'] = this.creatorSubjectName;
} else {
json[r'creatorSubjectName'] = null;
}
if (this.text != null) {
json[r'text'] = this.text;
} else {
json[r'text'] = null;
}
json[r'attachmentIds'] = this.attachmentIds;
if (this.modifiedAt != null) {
json[r'modifiedAt'] = this.modifiedAt!.toUtc().toIso8601String();
} else {
json[r'modifiedAt'] = null;
}
if (this.messageType != null) {
json[r'messageType'] = this.messageType;
} else {
json[r'messageType'] = null;
}
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
} else {
json[r'deletedAt'] = null;
}
if (this.deletedBySubjectId != null) {
json[r'deletedBySubjectId'] = this.deletedBySubjectId;
} else {
json[r'deletedBySubjectId'] = null;
}
if (this.deletedByName != null) {
json[r'deletedByName'] = this.deletedByName;
} else {
json[r'deletedByName'] = null;
}
if (this.allowEdit != null) {
json[r'allowEdit'] = this.allowEdit;
} else {
json[r'allowEdit'] = null;
}
return json;
}