encode static method
Implementation
static Map<String, dynamic> encode(Device value) {
Map<String, dynamic> entityAsMap = {
"id" : value.id,
"rev" : value.rev,
"deletionDate" : value.deletionDate,
"identifiers" : value.identifiers.map((x0) => Identifier.encode(x0)).toList(),
"created" : value.created,
"modified" : value.modified,
"author" : value.author,
"responsible" : value.responsible,
"tags" : value.tags.map((x0) => CodeStub.encode(x0)).toList(),
"codes" : value.codes.map((x0) => CodeStub.encode(x0)).toList(),
"endOfLife" : value.endOfLife,
"medicalLocationId" : value.medicalLocationId,
"externalId" : value.externalId,
"name" : value.name,
"type" : value.type,
"brand" : value.brand,
"model" : value.model,
"serialNumber" : value.serialNumber,
"parentId" : value.parentId,
"picture" : value.picture == null ? null : base64Encode(value.picture as List<int>),
"properties" : value.properties.map((x0) => DecryptedPropertyStub.encode(x0)).toList(),
"hcPartyKeys" : value.hcPartyKeys.map((k0, v0) => MapEntry(k0, v0.map((x1) => x1).toList())),
"aesExchangeKeys" : value.aesExchangeKeys.map((k0, v0) => MapEntry(k0, v0.map((k1, v1) => MapEntry(k1, v1.map((k2, v2) => MapEntry(k2, v2)))))),
"transferKeys" : value.transferKeys.map((k0, v0) => MapEntry(k0, v0.map((k1, v1) => MapEntry(k1, v1)))),
"privateKeyShamirPartitions" : value.privateKeyShamirPartitions.map((k0, v0) => MapEntry(k0, v0)),
"publicKey" : value.publicKey,
"publicKeysForOaepWithSha256" : value.publicKeysForOaepWithSha256.map((x0) => x0).toList()
};
return entityAsMap;
}