toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = id;
if (rev != null) {
json[r'rev'] = rev;
}
if (deletionDate != null) {
json[r'deletionDate'] = deletionDate;
}
json[r'label'] = label;
if (context != null) {
json[r'context'] = context;
}
if (type != null) {
json[r'type'] = type;
}
if (code != null) {
json[r'code'] = code;
}
if (version != null) {
json[r'version'] = version;
}
if (author != null) {
json[r'author'] = author;
}
json[r'regions'] = regions.toList();
json[r'periodicity'] = periodicity;
if (level != null) {
json[r'level'] = level;
}
json[r'links'] = links;
json[r'qualifiedLinks'] = qualifiedLinks;
json[r'flags'] = flags.toList();
json[r'searchTerms'] = searchTerms..map((k, v) => MapEntry(k, v.toList()));
if (data != null) {
json[r'data'] = data;
}
json[r'appendices'] = appendices;
json[r'disabled'] = disabled;
json[r'valorisations'] = valorisations.toList();
json[r'category'] = category;
if (consultationCode != null) {
json[r'consultationCode'] = consultationCode;
}
if (hasRelatedCode != null) {
json[r'hasRelatedCode'] = hasRelatedCode;
}
if (needsPrescriber != null) {
json[r'needsPrescriber'] = needsPrescriber;
}
json[r'relatedCodes'] = relatedCodes.toList();
if (ngroup != null) {
json[r'ngroup'] = ngroup;
}
json[r'letterValues'] = letterValues;
return json;
}