fromMap static method
Implementation
static LabourAvailability? fromMap(Object? body) {
final source = readRecord(body);
if (source == null) return null;
return LabourAvailability(
availableList: readList<Object>(source['available_list'], readAny),
code: readText(source['code']),
displayName: readText(source['display_name']),
emailAddress: readText(source['email_address']),
id: readText(source['id']),
labourProfile:
LabourAvailabilityLabourProfile.fromMap(source['labour_profile']),
name: readText(source['name']),
object: readText(source['object']),
processedScheduleList: readAny(source['processed_schedule_list']),
scheduleList: readList<LabourAvailabilityScheduleList>(
source['schedule_list'], LabourAvailabilityScheduleList.fromMap),
sessionList: readList<LabourAvailabilitySessionList>(
source['session_list'], LabourAvailabilitySessionList.fromMap),
status: readText(source['status']),
unavailableList: readList<Object>(source['unavailable_list'], readAny),
useCustomAvailability: readFlag(source['use_custom_availability']),
version: readInteger(source['version']),
);
}