encode static method

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

Implementation

static Map<String, dynamic> encode(Document value) {
	switch (value) {
		case EncryptedDocument entity:
			Map<String, dynamic> entityJson = EncryptedDocument.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.EncryptedDocument";
			return entityJson;
		case DecryptedDocument entity:
			Map<String, dynamic> entityJson = DecryptedDocument.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.DecryptedDocument";
			return entityJson;
	}
}