DocumentDescription.fromJson constructor

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

Implementation

factory DocumentDescription.fromJson(Map<String, dynamic> json) {
  return DocumentDescription(
    approvedVersion: json['ApprovedVersion'] as String?,
    attachmentsInformation: (json['AttachmentsInformation'] as List?)
        ?.whereNotNull()
        .map((e) => AttachmentInformation.fromJson(e as Map<String, dynamic>))
        .toList(),
    author: json['Author'] as String?,
    createdDate: timeStampFromJson(json['CreatedDate']),
    defaultVersion: json['DefaultVersion'] as String?,
    description: json['Description'] as String?,
    documentFormat: (json['DocumentFormat'] as String?)?.toDocumentFormat(),
    documentType: (json['DocumentType'] as String?)?.toDocumentType(),
    documentVersion: json['DocumentVersion'] as String?,
    hash: json['Hash'] as String?,
    hashType: (json['HashType'] as String?)?.toDocumentHashType(),
    latestVersion: json['LatestVersion'] as String?,
    name: json['Name'] as String?,
    owner: json['Owner'] as String?,
    parameters: (json['Parameters'] as List?)
        ?.whereNotNull()
        .map((e) => DocumentParameter.fromJson(e as Map<String, dynamic>))
        .toList(),
    pendingReviewVersion: json['PendingReviewVersion'] as String?,
    platformTypes: (json['PlatformTypes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toPlatformType())
        .toList(),
    requires: (json['Requires'] as List?)
        ?.whereNotNull()
        .map((e) => DocumentRequires.fromJson(e as Map<String, dynamic>))
        .toList(),
    reviewInformation: (json['ReviewInformation'] as List?)
        ?.whereNotNull()
        .map((e) => ReviewInformation.fromJson(e as Map<String, dynamic>))
        .toList(),
    reviewStatus: (json['ReviewStatus'] as String?)?.toReviewStatus(),
    schemaVersion: json['SchemaVersion'] as String?,
    sha1: json['Sha1'] as String?,
    status: (json['Status'] as String?)?.toDocumentStatus(),
    statusInformation: json['StatusInformation'] as String?,
    tags: (json['Tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    targetType: json['TargetType'] as String?,
    versionName: json['VersionName'] as String?,
  );
}