fromJson static method

Run fromJson(
  1. dynamic value
)

Returns a new Run instance and imports

Implementation

// ignore: prefer_constructors_over_static_methods
static Run fromJson(dynamic value) {
  final json = value.cast<String, dynamic>();
  return Run(
    id: mapValueOfType<String>(json, r'id'),
    taskID: mapValueOfType<String>(json, r'taskID'),
    status: RunStatusEnum.fromJson(json[r'status']),
    scheduledFor: mapDateTime(json, r'scheduledFor', ''),
    log: LogEvent.listFromJson(json[r'log']),
    startedAt: mapDateTime(json, r'startedAt', ''),
    finishedAt: mapDateTime(json, r'finishedAt', ''),
    requestedAt: mapDateTime(json, r'requestedAt', ''),
    links: json[r'links'] == null ? null : RunLinks.fromJson(json[r'links']),
  );
}