ResourceMetadata.fromJson constructor

ResourceMetadata.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ResourceMetadata.fromJson(Map<String, dynamic> json) {
  return ResourceMetadata(
    id: json['Id'] as String?,
    name: json['Name'] as String?,
    originalName: json['OriginalName'] as String?,
    owner: json['Owner'] != null
        ? UserMetadata.fromJson(json['Owner'] as Map<String, dynamic>)
        : null,
    parentId: json['ParentId'] as String?,
    type: (json['Type'] as String?)?.toResourceType(),
    versionId: json['VersionId'] as String?,
  );
}