DocumentMetadata.fromJson constructor
DocumentMetadata.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DocumentMetadata.fromJson(Map<String, dynamic> json) {
return DocumentMetadata(
createdTimestamp: timeStampFromJson(json['CreatedTimestamp']),
creatorId: json['CreatorId'] as String?,
id: json['Id'] as String?,
labels: (json['Labels'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
latestVersionMetadata: json['LatestVersionMetadata'] != null
? DocumentVersionMetadata.fromJson(
json['LatestVersionMetadata'] as Map<String, dynamic>)
: null,
modifiedTimestamp: timeStampFromJson(json['ModifiedTimestamp']),
parentFolderId: json['ParentFolderId'] as String?,
resourceState: (json['ResourceState'] as String?)?.toResourceStateType(),
);
}