fromJSON static method
Implementation
static ShareAllPatientDataOptionsSharePatientDataError fromJSON(Map<String, dynamic> data) {
if (data["kotlinType"] == null) {
throw ArgumentError('Missing discriminator: kotlinType');
}
String discriminator = data["kotlinType"];
switch (discriminator) {
case "com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.BulkShareFailure":
return ShareAllPatientDataOptionsBulkShareFailure.fromJSON(data);
case "com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.FailedRequest":
return ShareAllPatientDataOptionsFailedRequest.fromJSON(data);
default:
throw ArgumentError('Invalid subclass $discriminator');
}
}