toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.domainId != null) {
    json[r'domainId'] = this.domainId;
  } else {
    json[r'domainId'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.to != null) {
    json[r'to'] = this.to;
  } else {
    json[r'to'] = null;
  }
  if (this.from != null) {
    json[r'from'] = this.from;
  } else {
    json[r'from'] = null;
  }
  if (this.bcc != null) {
    json[r'bcc'] = this.bcc;
  } else {
    json[r'bcc'] = null;
  }
  if (this.cc != null) {
    json[r'cc'] = this.cc;
  } else {
    json[r'cc'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'read'] = this.read;
  if (this.attachments != null) {
    json[r'attachments'] = this.attachments;
  } else {
    json[r'attachments'] = null;
  }
  return json;
}