JobExecution.fromJson constructor

JobExecution.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory JobExecution.fromJson(Map<String, dynamic> json) {
  return JobExecution(
    approximateSecondsBeforeTimedOut:
        json['approximateSecondsBeforeTimedOut'] as int?,
    executionNumber: json['executionNumber'] as int?,
    jobDocument: json['jobDocument'] as String?,
    jobId: json['jobId'] as String?,
    lastUpdatedAt: json['lastUpdatedAt'] as int?,
    queuedAt: json['queuedAt'] as int?,
    startedAt: json['startedAt'] as int?,
    status: (json['status'] as String?)?.toJobExecutionStatus(),
    statusDetails: (json['statusDetails'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    thingName: json['thingName'] as String?,
    versionNumber: json['versionNumber'] as int?,
  );
}