BackupJob.fromJson constructor
BackupJob.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BackupJob.fromJson(Map<String, dynamic> json) {
return BackupJob(
accountId: json['AccountId'] as String?,
backupJobId: json['BackupJobId'] as String?,
backupOptions: (json['BackupOptions'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
backupSizeInBytes: json['BackupSizeInBytes'] as int?,
backupType: json['BackupType'] as String?,
backupVaultArn: json['BackupVaultArn'] as String?,
backupVaultName: json['BackupVaultName'] as String?,
bytesTransferred: json['BytesTransferred'] as int?,
completionDate: timeStampFromJson(json['CompletionDate']),
createdBy: json['CreatedBy'] != null
? RecoveryPointCreator.fromJson(
json['CreatedBy'] as Map<String, dynamic>)
: null,
creationDate: timeStampFromJson(json['CreationDate']),
expectedCompletionDate: timeStampFromJson(json['ExpectedCompletionDate']),
iamRoleArn: json['IamRoleArn'] as String?,
percentDone: json['PercentDone'] as String?,
recoveryPointArn: json['RecoveryPointArn'] as String?,
resourceArn: json['ResourceArn'] as String?,
resourceType: json['ResourceType'] as String?,
startBy: timeStampFromJson(json['StartBy']),
state: (json['State'] as String?)?.toBackupJobState(),
statusMessage: json['StatusMessage'] as String?,
);
}