Backup.fromJson constructor
Implementation
factory Backup.fromJson(Map<String, dynamic> json) {
return Backup(
backupId: json['BackupId'] as String,
creationTime:
nonNullableTimeStampFromJson(json['CreationTime'] as Object),
fileSystem:
FileSystem.fromJson(json['FileSystem'] as Map<String, dynamic>),
lifecycle: (json['Lifecycle'] as String).toBackupLifecycle(),
type: (json['Type'] as String).toBackupType(),
directoryInformation: json['DirectoryInformation'] != null
? ActiveDirectoryBackupAttributes.fromJson(
json['DirectoryInformation'] as Map<String, dynamic>)
: null,
failureDetails: json['FailureDetails'] != null
? BackupFailureDetails.fromJson(
json['FailureDetails'] as Map<String, dynamic>)
: null,
kmsKeyId: json['KmsKeyId'] as String?,
progressPercent: json['ProgressPercent'] as int?,
resourceARN: json['ResourceARN'] as String?,
tags: (json['Tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}