AttackDetail.fromJson constructor

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

Implementation

factory AttackDetail.fromJson(Map<String, dynamic> json) {
  return AttackDetail(
    attackCounters: (json['AttackCounters'] as List?)
        ?.whereNotNull()
        .map((e) => SummarizedCounter.fromJson(e as Map<String, dynamic>))
        .toList(),
    attackId: json['AttackId'] as String?,
    attackProperties: (json['AttackProperties'] as List?)
        ?.whereNotNull()
        .map((e) => AttackProperty.fromJson(e as Map<String, dynamic>))
        .toList(),
    endTime: timeStampFromJson(json['EndTime']),
    mitigations: (json['Mitigations'] as List?)
        ?.whereNotNull()
        .map((e) => Mitigation.fromJson(e as Map<String, dynamic>))
        .toList(),
    resourceArn: json['ResourceArn'] as String?,
    startTime: timeStampFromJson(json['StartTime']),
    subResources: (json['SubResources'] as List?)
        ?.whereNotNull()
        .map((e) => SubResourceSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}