ImageScanFindingsSummary.fromJson constructor

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

Implementation

factory ImageScanFindingsSummary.fromJson(Map<String, dynamic> json) {
  return ImageScanFindingsSummary(
    findingSeverityCounts:
        (json['findingSeverityCounts'] as Map<String, dynamic>?)
            ?.map((k, e) => MapEntry(k.toFindingSeverity(), e as int)),
    imageScanCompletedAt: timeStampFromJson(json['imageScanCompletedAt']),
    vulnerabilitySourceUpdatedAt:
        timeStampFromJson(json['vulnerabilitySourceUpdatedAt']),
  );
}