toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'userId'] = this.userId;
    json[r'inboxId'] = this.inboxId;
  if (this.domainId != null) {
    json[r'domainId'] = this.domainId;
  } else {
    json[r'domainId'] = null;
  }
    json[r'to'] = this.to;
  if (this.from != null) {
    json[r'from'] = this.from;
  } else {
    json[r'from'] = null;
  }
  if (this.sender != null) {
    json[r'sender'] = this.sender;
  } else {
    json[r'sender'] = null;
  }
  if (this.recipients != null) {
    json[r'recipients'] = this.recipients;
  } else {
    json[r'recipients'] = null;
  }
  if (this.replyTo != null) {
    json[r'replyTo'] = this.replyTo;
  } else {
    json[r'replyTo'] = null;
  }
  if (this.cc != null) {
    json[r'cc'] = this.cc;
  } else {
    json[r'cc'] = null;
  }
  if (this.bcc != null) {
    json[r'bcc'] = this.bcc;
  } else {
    json[r'bcc'] = null;
  }
  if (this.headers != null) {
    json[r'headers'] = this.headers;
  } else {
    json[r'headers'] = null;
  }
  if (this.headersMap != null) {
    json[r'headersMap'] = this.headersMap;
  } else {
    json[r'headersMap'] = null;
  }
  if (this.attachments != null) {
    json[r'attachments'] = this.attachments;
  } else {
    json[r'attachments'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.body != null) {
    json[r'body'] = this.body;
  } else {
    json[r'body'] = null;
  }
  if (this.bodyExcerpt != null) {
    json[r'bodyExcerpt'] = this.bodyExcerpt;
  } else {
    json[r'bodyExcerpt'] = null;
  }
  if (this.bodyMD5Hash != null) {
    json[r'bodyMD5Hash'] = this.bodyMD5Hash;
  } else {
    json[r'bodyMD5Hash'] = null;
  }
  if (this.isHTML != null) {
    json[r'isHTML'] = this.isHTML;
  } else {
    json[r'isHTML'] = null;
  }
  if (this.charset != null) {
    json[r'charset'] = this.charset;
  } else {
    json[r'charset'] = null;
  }
  if (this.analysis != null) {
    json[r'analysis'] = this.analysis;
  } else {
    json[r'analysis'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
    json[r'read'] = this.read;
    json[r'teamAccess'] = this.teamAccess;
  if (this.html != null) {
    json[r'html'] = this.html;
  } else {
    json[r'html'] = null;
  }
  return json;
}