Anomaly.fromJson constructor
Anomaly.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Anomaly.fromJson(Map<String, dynamic> json) {
return Anomaly(
anomalyId: json['AnomalyId'] as String,
anomalyScore:
AnomalyScore.fromJson(json['AnomalyScore'] as Map<String, dynamic>),
impact: Impact.fromJson(json['Impact'] as Map<String, dynamic>),
monitorArn: json['MonitorArn'] as String,
anomalyEndDate: json['AnomalyEndDate'] as String?,
anomalyStartDate: json['AnomalyStartDate'] as String?,
dimensionValue: json['DimensionValue'] as String?,
feedback: (json['Feedback'] as String?)?.toAnomalyFeedbackType(),
rootCauses: (json['RootCauses'] as List?)
?.whereNotNull()
.map((e) => RootCause.fromJson(e as Map<String, dynamic>))
.toList(),
);
}