2022-08-24 05:35:49 +00:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'server_job.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
ServerJob _$ServerJobFromJson(Map<String, dynamic> json) => ServerJob(
|
|
|
|
name: json['name'] as String,
|
|
|
|
description: json['description'] as String,
|
2022-09-18 16:29:06 +00:00
|
|
|
status: $enumDecode(_$JobStatusEnumEnumMap, json['status']),
|
2022-08-24 05:35:49 +00:00
|
|
|
uid: json['uid'] as String,
|
2023-06-29 09:53:13 +00:00
|
|
|
typeId: json['typeId'] as String,
|
2022-09-08 19:58:45 +00:00
|
|
|
updatedAt: DateTime.parse(json['updatedAt'] as String),
|
2022-08-29 18:18:07 +00:00
|
|
|
createdAt: DateTime.parse(json['createdAt'] as String),
|
2022-08-24 05:35:49 +00:00
|
|
|
error: json['error'] as String?,
|
|
|
|
progress: json['progress'] as int?,
|
|
|
|
result: json['result'] as String?,
|
2022-08-29 18:18:07 +00:00
|
|
|
statusText: json['statusText'] as String?,
|
2022-09-08 19:58:45 +00:00
|
|
|
finishedAt: json['finishedAt'] == null
|
|
|
|
? null
|
|
|
|
: DateTime.parse(json['finishedAt'] as String),
|
2023-07-10 09:00:46 +00:00
|
|
|
);
|
2022-08-24 05:35:49 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> _$ServerJobToJson(ServerJob instance) => <String, dynamic>{
|
|
|
|
'name': instance.name,
|
|
|
|
'description': instance.description,
|
2022-09-18 16:29:06 +00:00
|
|
|
'status': _$JobStatusEnumEnumMap[instance.status]!,
|
2022-08-24 05:35:49 +00:00
|
|
|
'uid': instance.uid,
|
2023-06-29 09:53:13 +00:00
|
|
|
'typeId': instance.typeId,
|
2022-09-08 19:58:45 +00:00
|
|
|
'updatedAt': instance.updatedAt.toIso8601String(),
|
2022-08-29 18:18:07 +00:00
|
|
|
'createdAt': instance.createdAt.toIso8601String(),
|
2022-08-24 05:35:49 +00:00
|
|
|
'error': instance.error,
|
|
|
|
'progress': instance.progress,
|
|
|
|
'result': instance.result,
|
2022-08-29 18:18:07 +00:00
|
|
|
'statusText': instance.statusText,
|
2022-09-08 19:58:45 +00:00
|
|
|
'finishedAt': instance.finishedAt?.toIso8601String(),
|
2022-08-24 05:35:49 +00:00
|
|
|
};
|
2022-09-18 16:29:06 +00:00
|
|
|
|
|
|
|
const _$JobStatusEnumEnumMap = {
|
|
|
|
JobStatusEnum.created: 'CREATED',
|
|
|
|
JobStatusEnum.running: 'RUNNING',
|
|
|
|
JobStatusEnum.finished: 'FINISHED',
|
|
|
|
JobStatusEnum.error: 'ERROR',
|
|
|
|
};
|