toJson method
Implementation
Map<String, Object?> toJson() {
var createdAt = this.createdAt;
var message = this.message;
var number = this.number;
var minorEdit = this.minorEdit;
var authorId = this.authorId;
var attachment = this.attachment;
final json = <String, Object?>{};
if (createdAt != null) {
json[r'createdAt'] = createdAt.toIso8601String();
}
if (message != null) {
json[r'message'] = message;
}
if (number != null) {
json[r'number'] = number;
}
json[r'minorEdit'] = minorEdit;
if (authorId != null) {
json[r'authorId'] = authorId;
}
if (attachment != null) {
json[r'attachment'] = attachment.toJson();
}
return json;
}