toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'userId'] = this.userId;
if (this.sentId != null) {
json[r'sentId'] = this.sentId;
} else {
json[r'sentId'] = null;
}
if (this.remoteMtaIp != null) {
json[r'remoteMtaIp'] = this.remoteMtaIp;
} else {
json[r'remoteMtaIp'] = null;
}
if (this.inboxId != null) {
json[r'inboxId'] = this.inboxId;
} else {
json[r'inboxId'] = null;
}
if (this.reportingMta != null) {
json[r'reportingMta'] = this.reportingMta;
} else {
json[r'reportingMta'] = null;
}
json[r'recipients'] = this.recipients;
if (this.smtpResponse != null) {
json[r'smtpResponse'] = this.smtpResponse;
} else {
json[r'smtpResponse'] = null;
}
if (this.smtpStatusCode != null) {
json[r'smtpStatusCode'] = this.smtpStatusCode;
} else {
json[r'smtpStatusCode'] = null;
}
if (this.processingTimeMillis != null) {
json[r'processingTimeMillis'] = this.processingTimeMillis;
} else {
json[r'processingTimeMillis'] = null;
}
if (this.received != null) {
json[r'received'] = this.received!.toUtc().toIso8601String();
} else {
json[r'received'] = null;
}
if (this.subject != null) {
json[r'subject'] = this.subject;
} else {
json[r'subject'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}