Device.fromJSON constructor

Device.fromJSON(
  1. Map<String, dynamic> data
)

Implementation

factory Device.fromJSON(Map<String, dynamic> data) {
	return Device(
		(data["id"] as String),
		rev: (data["rev"] as String?),
		deletionDate: (data["deletionDate"] as int?),
		identifiers: (data["identifiers"] as List<dynamic>).map((x0) => Identifier.fromJSON(x0) ).toList(),
		created: (data["created"] as int?),
		modified: (data["modified"] as int?),
		author: (data["author"] as String?),
		responsible: (data["responsible"] as String?),
		tags: (data["tags"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
		codes: (data["codes"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
		endOfLife: (data["endOfLife"] as int?),
		medicalLocationId: (data["medicalLocationId"] as String?),
		externalId: (data["externalId"] as String?),
		name: (data["name"] as String?),
		type: (data["type"] as String?),
		brand: (data["brand"] as String?),
		model: (data["model"] as String?),
		serialNumber: (data["serialNumber"] as String?),
		parentId: (data["parentId"] as String?),
		picture: data["picture"] == null ? null : base64Decode(data["picture"] as String),
		properties: (data["properties"] as List<dynamic>).map((x0) => DecryptedPropertyStub.fromJSON(x0) ).toSet(),
		hcPartyKeys: (data["hcPartyKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => (x1 as HexString) ).toList())),
		aesExchangeKeys: (data["aesExchangeKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as SpkiHexString), (v0 as Map<String, dynamic>).map((k1, v1) => MapEntry((k1 as String), (v1 as Map<String, dynamic>).map((k2, v2) => MapEntry((k2 as AesExchangeKeyEncryptionKeypairIdentifier), (v2 as HexString))))))),
		transferKeys: (data["transferKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as AesExchangeKeyEncryptionKeypairIdentifier), (v0 as Map<String, dynamic>).map((k1, v1) => MapEntry((k1 as AesExchangeKeyEncryptionKeypairIdentifier), (v1 as HexString))))),
		privateKeyShamirPartitions: (data["privateKeyShamirPartitions"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as HexString))),
		publicKey: (data["publicKey"] as SpkiHexString?),
		publicKeysForOaepWithSha256: (data["publicKeysForOaepWithSha256"] as List<dynamic>).map((x0) => (x0 as SpkiHexString) ).toSet(),
	);
}