2021-12-06 18:31:19 +00:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'backup.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2022-01-25 17:00:47 +00:00
|
|
|
Backup _$BackupFromJson(Map<String, dynamic> json) => Backup(
|
|
|
|
time: DateTime.parse(json['time'] as String),
|
|
|
|
id: json['short_id'] as String,
|
2021-12-06 18:31:19 +00:00
|
|
|
);
|
|
|
|
|
2022-07-25 14:06:55 +00:00
|
|
|
Map<String, dynamic> _$BackupToJson(Backup instance) => <String, dynamic>{
|
|
|
|
'time': instance.time.toIso8601String(),
|
|
|
|
'short_id': instance.id,
|
|
|
|
};
|
|
|
|
|
2022-01-25 17:00:47 +00:00
|
|
|
BackupStatus _$BackupStatusFromJson(Map<String, dynamic> json) => BackupStatus(
|
|
|
|
status: $enumDecode(_$BackupStatusEnumEnumMap, json['status']),
|
|
|
|
progress: (json['progress'] as num).toDouble(),
|
|
|
|
errorMessage: json['error_message'] as String?,
|
|
|
|
);
|
2021-12-06 18:31:19 +00:00
|
|
|
|
2022-07-25 14:06:55 +00:00
|
|
|
Map<String, dynamic> _$BackupStatusToJson(BackupStatus instance) =>
|
|
|
|
<String, dynamic>{
|
2022-08-24 05:35:49 +00:00
|
|
|
'status': _$BackupStatusEnumEnumMap[instance.status],
|
2022-07-25 14:06:55 +00:00
|
|
|
'progress': instance.progress,
|
|
|
|
'error_message': instance.errorMessage,
|
|
|
|
};
|
|
|
|
|
2021-12-06 18:31:19 +00:00
|
|
|
const _$BackupStatusEnumEnumMap = {
|
|
|
|
BackupStatusEnum.noKey: 'NO_KEY',
|
|
|
|
BackupStatusEnum.notInitialized: 'NOT_INITIALIZED',
|
|
|
|
BackupStatusEnum.initialized: 'INITIALIZED',
|
|
|
|
BackupStatusEnum.backingUp: 'BACKING_UP',
|
|
|
|
BackupStatusEnum.restoring: 'RESTORING',
|
|
|
|
BackupStatusEnum.error: 'ERROR',
|
|
|
|
BackupStatusEnum.initializing: 'INITIALIZING',
|
|
|
|
};
|