encode static method

Map<String, dynamic> encode(
  1. EncryptedDocument value
)
override

Implementation

static Map<String, dynamic> encode(EncryptedDocument value) {
	Map<String, dynamic> entityAsMap = {
		"id" : value.id,
		"rev" : value.rev,
		"created" : value.created,
		"modified" : value.modified,
		"author" : value.author,
		"responsible" : value.responsible,
		"medicalLocationId" : value.medicalLocationId,
		"tags" : value.tags.map((x0) => CodeStub.encode(x0)).toList(),
		"codes" : value.codes.map((x0) => CodeStub.encode(x0)).toList(),
		"endOfLife" : value.endOfLife,
		"deletionDate" : value.deletionDate,
		"documentLocation" : value.documentLocation == null ? null : DocumentLocation.encode(value.documentLocation!),
		"documentType" : value.documentType == null ? null : DocumentType.encode(value.documentType!),
		"documentStatus" : value.documentStatus == null ? null : DocumentStatus.encode(value.documentStatus!),
		"externalUri" : value.externalUri,
		"name" : value.name,
		"version" : value.version,
		"storedICureDocumentId" : value.storedICureDocumentId,
		"externalUuid" : value.externalUuid,
		"size" : value.size,
		"hash" : value.hash,
		"openingContactId" : value.openingContactId,
		"attachmentId" : value.attachmentId,
		"objectStoreReference" : value.objectStoreReference,
		"mainUti" : value.mainUti,
		"otherUtis" : value.otherUtis.map((x0) => x0).toList(),
		"secondaryAttachments" : value.secondaryAttachments.map((k0, v0) => MapEntry(k0, DataAttachment.encode(v0))),
		"deletedAttachments" : value.deletedAttachments.map((x0) => DeletedAttachment.encode(x0)).toList(),
		"encryptedAttachment" : value.encryptedAttachment == null ? null : base64Encode(value.encryptedAttachment as List<int>),
		"decryptedAttachment" : value.decryptedAttachment == null ? null : base64Encode(value.decryptedAttachment as List<int>),
		"secretForeignKeys" : value.secretForeignKeys.map((x0) => x0).toList(),
		"cryptedForeignKeys" : value.cryptedForeignKeys.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
		"delegations" : value.delegations.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
		"encryptionKeys" : value.encryptionKeys.map((k0, v0) => MapEntry(k0, v0.map((x1) => Delegation.encode(x1)).toList())),
		"encryptedSelf" : value.encryptedSelf,
		"securityMetadata" : value.securityMetadata == null ? null : SecurityMetadata.encode(value.securityMetadata!)
	};
	return entityAsMap;
}