AwsSecurityFinding.fromJson constructor
AwsSecurityFinding.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AwsSecurityFinding.fromJson(Map<String, dynamic> json) {
return AwsSecurityFinding(
awsAccountId: json['AwsAccountId'] as String,
createdAt: json['CreatedAt'] as String,
description: json['Description'] as String,
generatorId: json['GeneratorId'] as String,
id: json['Id'] as String,
productArn: json['ProductArn'] as String,
resources: (json['Resources'] as List)
.whereNotNull()
.map((e) => Resource.fromJson(e as Map<String, dynamic>))
.toList(),
schemaVersion: json['SchemaVersion'] as String,
severity: Severity.fromJson(json['Severity'] as Map<String, dynamic>),
title: json['Title'] as String,
types: (json['Types'] as List)
.whereNotNull()
.map((e) => e as String)
.toList(),
updatedAt: json['UpdatedAt'] as String,
compliance: json['Compliance'] != null
? Compliance.fromJson(json['Compliance'] as Map<String, dynamic>)
: null,
confidence: json['Confidence'] as int?,
criticality: json['Criticality'] as int?,
firstObservedAt: json['FirstObservedAt'] as String?,
lastObservedAt: json['LastObservedAt'] as String?,
malware: (json['Malware'] as List?)
?.whereNotNull()
.map((e) => Malware.fromJson(e as Map<String, dynamic>))
.toList(),
network: json['Network'] != null
? Network.fromJson(json['Network'] as Map<String, dynamic>)
: null,
networkPath: (json['NetworkPath'] as List?)
?.whereNotNull()
.map((e) => NetworkPathComponent.fromJson(e as Map<String, dynamic>))
.toList(),
note: json['Note'] != null
? Note.fromJson(json['Note'] as Map<String, dynamic>)
: null,
patchSummary: json['PatchSummary'] != null
? PatchSummary.fromJson(json['PatchSummary'] as Map<String, dynamic>)
: null,
process: json['Process'] != null
? ProcessDetails.fromJson(json['Process'] as Map<String, dynamic>)
: null,
productFields: (json['ProductFields'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
recordState: (json['RecordState'] as String?)?.toRecordState(),
relatedFindings: (json['RelatedFindings'] as List?)
?.whereNotNull()
.map((e) => RelatedFinding.fromJson(e as Map<String, dynamic>))
.toList(),
remediation: json['Remediation'] != null
? Remediation.fromJson(json['Remediation'] as Map<String, dynamic>)
: null,
sourceUrl: json['SourceUrl'] as String?,
threatIntelIndicators: (json['ThreatIntelIndicators'] as List?)
?.whereNotNull()
.map((e) => ThreatIntelIndicator.fromJson(e as Map<String, dynamic>))
.toList(),
userDefinedFields: (json['UserDefinedFields'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
verificationState:
(json['VerificationState'] as String?)?.toVerificationState(),
vulnerabilities: (json['Vulnerabilities'] as List?)
?.whereNotNull()
.map((e) => Vulnerability.fromJson(e as Map<String, dynamic>))
.toList(),
workflow: json['Workflow'] != null
? Workflow.fromJson(json['Workflow'] as Map<String, dynamic>)
: null,
workflowState: (json['WorkflowState'] as String?)?.toWorkflowState(),
);
}