toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
    json[r'id'] = this.id;
    json[r'userId'] = this.userId;
  if (this.inboxId != null) {
    json[r'inboxId'] = this.inboxId;
  } else {
    json[r'inboxId'] = null;
  }
  if (this.sentEmailId != null) {
    json[r'sentEmailId'] = this.sentEmailId;
  } else {
    json[r'sentEmailId'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  if (this.recipient != null) {
    json[r'recipient'] = this.recipient;
  } else {
    json[r'recipient'] = null;
  }
    json[r'seen'] = this.seen;
  if (this.seenAt != null) {
    json[r'seenAt'] = this.seenAt!.toUtc().toIso8601String();
  } else {
    json[r'seenAt'] = null;
  }
  return json;
}