toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.userId != null) {
    json[r'userId'] = this.userId;
  } else {
    json[r'userId'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.bodyExcerpt != null) {
    json[r'bodyExcerpt'] = this.bodyExcerpt;
  } else {
    json[r'bodyExcerpt'] = null;
  }
    json[r'attachmentCount'] = this.attachmentCount;
  if (this.from != null) {
    json[r'from'] = this.from;
  } else {
    json[r'from'] = null;
  }
  if (this.rawUrl != null) {
    json[r'rawUrl'] = this.rawUrl;
  } else {
    json[r'rawUrl'] = null;
  }
  if (this.rawKey != null) {
    json[r'rawKey'] = this.rawKey;
  } else {
    json[r'rawKey'] = null;
  }
  if (this.rawBucket != null) {
    json[r'rawBucket'] = this.rawBucket;
  } else {
    json[r'rawBucket'] = null;
  }
  if (this.canRestore != null) {
    json[r'canRestore'] = this.canRestore;
  } else {
    json[r'canRestore'] = null;
  }
    json[r'to'] = this.to;
    json[r'cc'] = this.cc;
    json[r'bcc'] = this.bcc;
    json[r'inboxIds'] = this.inboxIds;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
  return json;
}