DetectMitigationActionsTaskSummary.fromJson constructor

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

Implementation

factory DetectMitigationActionsTaskSummary.fromJson(
    Map<String, dynamic> json) {
  return DetectMitigationActionsTaskSummary(
    actionsDefinition: (json['actionsDefinition'] as List?)
        ?.whereNotNull()
        .map((e) => MitigationAction.fromJson(e as Map<String, dynamic>))
        .toList(),
    onlyActiveViolationsIncluded:
        json['onlyActiveViolationsIncluded'] as bool?,
    suppressedAlertsIncluded: json['suppressedAlertsIncluded'] as bool?,
    target: json['target'] != null
        ? DetectMitigationActionsTaskTarget.fromJson(
            json['target'] as Map<String, dynamic>)
        : null,
    taskEndTime: timeStampFromJson(json['taskEndTime']),
    taskId: json['taskId'] as String?,
    taskStartTime: timeStampFromJson(json['taskStartTime']),
    taskStatistics: json['taskStatistics'] != null
        ? DetectMitigationActionsTaskStatistics.fromJson(
            json['taskStatistics'] as Map<String, dynamic>)
        : null,
    taskStatus: (json['taskStatus'] as String?)
        ?.toDetectMitigationActionsTaskStatus(),
    violationEventOccurrenceRange:
        json['violationEventOccurrenceRange'] != null
            ? ViolationEventOccurrenceRange.fromJson(
                json['violationEventOccurrenceRange'] as Map<String, dynamic>)
            : null,
  );
}