fromJson static method
Returns a new EntityContact instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static EntityContact fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return EntityContact(
entityId: mapValueOfType<int>(json, r'EntityId'),
contactAssetModelId: mapValueOfType<int>(json, r'ContactAssetModelId'),
contactId: mapValueOfType<int>(json, r'ContactId'),
dateCreated: mapDateTime(json, r'DateCreated', ''),
dateModified: mapDateTime(json, r'DateModified', ''),
role: EntityContactRoleEnum.fromJson(json[r'Role']),
contactExternalIdentifier: mapValueOfType<String>(json, r'ContactExternalIdentifier'),
contactName: mapValueOfType<String>(json, r'ContactName'),
contactDescription: mapValueOfType<String>(json, r'ContactDescription'),
contact: ContactInfo.fromJson(json[r'Contact']),
);
}
return null;
}