encode static method

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

Implementation

static Map<String, dynamic> encode(CryptoActor value) {
	switch (value) {
		case CryptoActorStub entity:
			Map<String, dynamic> entityJson = CryptoActorStub.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.CryptoActorStub";
			return entityJson;
		case EncryptedPatient entity:
			Map<String, dynamic> entityJson = EncryptedPatient.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.EncryptedPatient";
			return entityJson;
		case DecryptedPatient entity:
			Map<String, dynamic> entityJson = DecryptedPatient.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.DecryptedPatient";
			return entityJson;
		case Device entity:
			Map<String, dynamic> entityJson = Device.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.Device";
			return entityJson;
		case HealthcareParty entity:
			Map<String, dynamic> entityJson = HealthcareParty.encode(entity);
			entityJson["kotlinType"] = "com.icure.cardinal.sdk.model.HealthcareParty";
			return entityJson;
		default:
			throw ArgumentError('Invalid subclass $value');
	}
}