initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'run_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_RunState _$RunStateFromJson(Map<String, dynamic> json) => _RunState(
|
||||
running: json['running'] as bool? ?? false,
|
||||
targetId: json['target_id'] as String? ?? '',
|
||||
method: $enumDecodeNullable(_$BackupMethodEnumMap, json['method']),
|
||||
percent: (json['percent'] as num?)?.toDouble() ?? 0,
|
||||
eta: json['eta'] as String?,
|
||||
message: json['message'] as String?,
|
||||
startedAt: json['started_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['started_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RunStateToJson(_RunState instance) => <String, dynamic>{
|
||||
'running': instance.running,
|
||||
'target_id': instance.targetId,
|
||||
'method': _$BackupMethodEnumMap[instance.method],
|
||||
'percent': instance.percent,
|
||||
'eta': instance.eta,
|
||||
'message': instance.message,
|
||||
'started_at': instance.startedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
const _$BackupMethodEnumMap = {
|
||||
BackupMethod.rsync: 'rsync',
|
||||
BackupMethod.restic: 'restic',
|
||||
BackupMethod.external: 'external',
|
||||
};
|
||||
Reference in New Issue
Block a user