Backup.fromJson constructor
Implementation
factory Backup.fromJson(Map<String, dynamic> json) {
return Backup(
backupArn: json['BackupArn'] as String?,
backupId: json['BackupId'] as String?,
backupType: (json['BackupType'] as String?)?.toBackupType(),
createdAt: timeStampFromJson(json['CreatedAt']),
description: json['Description'] as String?,
engine: json['Engine'] as String?,
engineModel: json['EngineModel'] as String?,
engineVersion: json['EngineVersion'] as String?,
instanceProfileArn: json['InstanceProfileArn'] as String?,
instanceType: json['InstanceType'] as String?,
keyPair: json['KeyPair'] as String?,
preferredBackupWindow: json['PreferredBackupWindow'] as String?,
preferredMaintenanceWindow: json['PreferredMaintenanceWindow'] as String?,
s3DataSize: json['S3DataSize'] as int?,
s3DataUrl: json['S3DataUrl'] as String?,
s3LogUrl: json['S3LogUrl'] as String?,
securityGroupIds: (json['SecurityGroupIds'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
serverName: json['ServerName'] as String?,
serviceRoleArn: json['ServiceRoleArn'] as String?,
status: (json['Status'] as String?)?.toBackupStatus(),
statusDescription: json['StatusDescription'] as String?,
subnetIds: (json['SubnetIds'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
toolsVersion: json['ToolsVersion'] as String?,
userArn: json['UserArn'] as String?,
);
}