fromMap static method
Implementation
static Employee? fromMap(Object? body) {
final source = readRecord(body, envelopeKey: 'employee');
if (source == null) return null;
return Employee(
activityLogs: readList<Object>(source['activity_logs'], readAny),
code: readText(source['code']),
contacts: readList<EmployeeContact>(
source['contacts'], EmployeeContact.fromMap),
createdBy: EmployeeCreatedBy.fromMap(source['created_by']),
createdOn: readText(source['created_on']),
customAttributes: readList<Object>(source['custom_attributes'], readAny),
customForm: EmployeeCustomForm.fromMap(source['custom_form']),
description: readText(source['description']),
displayName: readText(source['display_name']),
emailAddress: readText(source['email_address']),
href: readText(source['href']),
id: readText(source['id']),
imageUuid: readAny(source['image_uuid']),
lastUpdatedBy: EmployeeLastUpdatedBy.fromMap(source['last_updated_by']),
lastUpdatedOn: readText(source['last_updated_on']),
name: readText(source['name']),
object: readText(source['object']),
status: readText(source['status']),
version: readInteger(source['version']),
);
}