fromJson static method
Returns a new SpaceInfo instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static SpaceInfo fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return SpaceInfo(
levelName: mapValueOfType<String>(json, r'LevelName'),
level: LevelInfo.fromJson(json[r'Level']),
assetModelId: mapValueOfType<int>(json, r'AssetModelId'),
entityId: mapValueOfType<int>(json, r'EntityId'),
name: mapValueOfType<String>(json, r'Name'),
description: mapValueOfType<String>(json, r'Description'),
externalIdentifier: mapValueOfType<String>(json, r'ExternalIdentifier'),
externalObjectType: mapValueOfType<String>(json, r'ExternalObjectType'),
externalObjectName: mapValueOfType<String>(json, r'ExternalObjectName'),
model: ModelInfo.fromJson(json[r'Model']),
modelName: mapValueOfType<String>(json, r'ModelName'),
dateCreated: mapDateTime(json, r'DateCreated', ''),
dateModified: mapDateTime(json, r'DateModified', ''),
);
}
return null;
}