JobRun.fromJson constructor
Implementation
factory JobRun.fromJson(Map<String, dynamic> json) {
return JobRun(
allocatedCapacity: json['AllocatedCapacity'] as int?,
arguments: (json['Arguments'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
attempt: json['Attempt'] as int?,
completedOn: timeStampFromJson(json['CompletedOn']),
errorMessage: json['ErrorMessage'] as String?,
executionTime: json['ExecutionTime'] as int?,
glueVersion: json['GlueVersion'] as String?,
id: json['Id'] as String?,
jobName: json['JobName'] as String?,
jobRunState: (json['JobRunState'] as String?)?.toJobRunState(),
lastModifiedOn: timeStampFromJson(json['LastModifiedOn']),
logGroupName: json['LogGroupName'] as String?,
maxCapacity: json['MaxCapacity'] as double?,
notificationProperty: json['NotificationProperty'] != null
? NotificationProperty.fromJson(
json['NotificationProperty'] as Map<String, dynamic>)
: null,
numberOfWorkers: json['NumberOfWorkers'] as int?,
predecessorRuns: (json['PredecessorRuns'] as List?)
?.whereNotNull()
.map((e) => Predecessor.fromJson(e as Map<String, dynamic>))
.toList(),
previousRunId: json['PreviousRunId'] as String?,
securityConfiguration: json['SecurityConfiguration'] as String?,
startedOn: timeStampFromJson(json['StartedOn']),
timeout: json['Timeout'] as int?,
triggerName: json['TriggerName'] as String?,
workerType: (json['WorkerType'] as String?)?.toWorkerType(),
);
}