fromJson static method
Returns a new AttributeDefinitionEntity instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static AttributeDefinitionEntity fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AttributeDefinitionEntity(
fullName: mapValueOfType<String>(json, r'FullName'),
assetModelId: mapValueOfType<int>(json, r'AssetModelId'),
attributeDefinitionId: mapValueOfType<int>(json, r'AttributeDefinitionId'),
model: Model.fromJson(json[r'Model']),
values: AttributeValueEntity.listFromJson(json[r'Values']),
groupName: mapValueOfType<String>(json, r'GroupName'),
groupType: AttributeDefinitionEntityGroupTypeEnum.fromJson(json[r'GroupType']),
name: mapValueOfType<String>(json, r'Name'),
canonicalName: mapValueOfType<String>(json, r'CanonicalName'),
imported: mapValueOfType<bool>(json, r'Imported'),
semanticType: mapValueOfType<String>(json, r'SemanticType'),
unit: mapValueOfType<String>(json, r'Unit'),
dataType: AttributeDefinitionEntityDataTypeEnum.fromJson(json[r'DataType']),
dateCreated: mapDateTime(json, r'DateCreated', ''),
dateModified: mapDateTime(json, r'DateModified', ''),
);
}
return null;
}