BehaviorCriteria.fromJson constructor
BehaviorCriteria.fromJson(
- Map<String, dynamic> json
)
Implementation
factory BehaviorCriteria.fromJson(Map<String, dynamic> json) {
return BehaviorCriteria(
comparisonOperator:
(json['comparisonOperator'] as String?)?.toComparisonOperator(),
consecutiveDatapointsToAlarm:
json['consecutiveDatapointsToAlarm'] as int?,
consecutiveDatapointsToClear:
json['consecutiveDatapointsToClear'] as int?,
durationSeconds: json['durationSeconds'] as int?,
mlDetectionConfig: json['mlDetectionConfig'] != null
? MachineLearningDetectionConfig.fromJson(
json['mlDetectionConfig'] as Map<String, dynamic>)
: null,
statisticalThreshold: json['statisticalThreshold'] != null
? StatisticalThreshold.fromJson(
json['statisticalThreshold'] as Map<String, dynamic>)
: null,
value: json['value'] != null
? MetricValue.fromJson(json['value'] as Map<String, dynamic>)
: null,
);
}