toJson method

Map<String, dynamic> toJson()

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'identifiers'] = identifiers;
  if (created != null) {
    json[r'created'] = created;
  }
  if (modified != null) {
    json[r'modified'] = modified;
  }
  if (author != null) {
    json[r'author'] = author;
  }
  if (responsible != null) {
    json[r'responsible'] = responsible;
  }
  json[r'tags'] = tags.toList();
  json[r'codes'] = codes.toList();
  if (endOfLife != null) {
    json[r'endOfLife'] = endOfLife;
  }
  if (medicalLocationId != null) {
    json[r'medicalLocationId'] = medicalLocationId;
  }
  if (externalId != null) {
    json[r'externalId'] = externalId;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (type != null) {
    json[r'type'] = type;
  }
  if (brand != null) {
    json[r'brand'] = brand;
  }
  if (model != null) {
    json[r'model'] = model;
  }
  if (serialNumber != null) {
    json[r'serialNumber'] = serialNumber;
  }
  if (parentId != null) {
    json[r'parentId'] = parentId;
  }
  json[r'picture'] = picture;
  json[r'properties'] = properties.toList();
  json[r'hcPartyKeys'] = hcPartyKeys;
  json[r'aesExchangeKeys'] = aesExchangeKeys;
  json[r'transferKeys'] = transferKeys;
  json[r'privateKeyShamirPartitions'] = privateKeyShamirPartitions;
  if (publicKey != null) {
    json[r'publicKey'] = publicKey;
  }
  return json;
}