initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'backup_config.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_BackupConfig _$BackupConfigFromJson(Map<String, dynamic> json) =>
|
||||
_BackupConfig(
|
||||
sourcePath: json['source_path'] as String?,
|
||||
targets:
|
||||
(json['targets'] as List<dynamic>?)
|
||||
?.map((e) => BackupTarget.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const <BackupTarget>[],
|
||||
nextRun: json['next_run'] == null
|
||||
? null
|
||||
: DateTime.parse(json['next_run'] as String),
|
||||
lastRun: json['last_run'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_run'] as String),
|
||||
history:
|
||||
(json['history'] as List<dynamic>?)
|
||||
?.map((e) => BackupExecution.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const <BackupExecution>[],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BackupConfigToJson(_BackupConfig instance) =>
|
||||
<String, dynamic>{
|
||||
'source_path': instance.sourcePath,
|
||||
'targets': instance.targets.map((e) => e.toJson()).toList(),
|
||||
'next_run': instance.nextRun?.toIso8601String(),
|
||||
'last_run': instance.lastRun?.toIso8601String(),
|
||||
'history': instance.history.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
Reference in New Issue
Block a user