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;
  }
    json[r'userId'] = this.userId;
    json[r'inboxId'] = this.inboxId;
    json[r'attachments'] = this.attachments;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'to'] = this.to;
    json[r'bcc'] = this.bcc;
    json[r'cc'] = this.cc;
  if (this.bodyMD5Hash != null) {
    json[r'bodyMD5Hash'] = this.bodyMD5Hash;
  } else {
    json[r'bodyMD5Hash'] = null;
  }
    json[r'virtualSend'] = this.virtualSend;
  return json;
}