encode static method

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

Implementation

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