AuditFinding.fromJson constructor
AuditFinding.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AuditFinding.fromJson(Map<String, dynamic> json) {
return AuditFinding(
checkName: json['checkName'] as String?,
findingId: json['findingId'] as String?,
findingTime: timeStampFromJson(json['findingTime']),
isSuppressed: json['isSuppressed'] as bool?,
nonCompliantResource: json['nonCompliantResource'] != null
? NonCompliantResource.fromJson(
json['nonCompliantResource'] as Map<String, dynamic>)
: null,
reasonForNonCompliance: json['reasonForNonCompliance'] as String?,
reasonForNonComplianceCode: json['reasonForNonComplianceCode'] as String?,
relatedResources: (json['relatedResources'] as List?)
?.whereNotNull()
.map((e) => RelatedResource.fromJson(e as Map<String, dynamic>))
.toList(),
severity: (json['severity'] as String?)?.toAuditFindingSeverity(),
taskId: json['taskId'] as String?,
taskStartTime: timeStampFromJson(json['taskStartTime']),
);
}