TaskProgressBeanObject.fromJson constructor

TaskProgressBeanObject.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory TaskProgressBeanObject.fromJson(Map<String, Object?> json) {
  return TaskProgressBeanObject(
    description: json[r'description'] as String?,
    elapsedRuntime: (json[r'elapsedRuntime'] as num?)?.toInt() ?? 0,
    finished: (json[r'finished'] as num?)?.toInt(),
    id: json[r'id'] as String? ?? '',
    lastUpdate: (json[r'lastUpdate'] as num?)?.toInt() ?? 0,
    message: json[r'message'] as String?,
    progress: (json[r'progress'] as num?)?.toInt() ?? 0,
    result: json[r'result'],
    self: json[r'self'] as String? ?? '',
    started: (json[r'started'] as num?)?.toInt(),
    status: TaskProgressBeanObjectStatus.fromValue(
        json[r'status'] as String? ?? ''),
    submitted: (json[r'submitted'] as num?)?.toInt() ?? 0,
    submittedBy: (json[r'submittedBy'] as num?)?.toInt() ?? 0,
  );
}