ExternalMetricStatus.fromJson constructor

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

Creates a ExternalMetricStatus from JSON data.

Implementation

factory ExternalMetricStatus.fromJson(Map<String, dynamic> json) {
  final tempCurrentJson = json['current'];
  final tempMetricJson = json['metric'];

  final MetricValueStatus tempCurrent =
      MetricValueStatus.fromJson(tempCurrentJson);
  final MetricIdentifier tempMetric =
      MetricIdentifier.fromJson(tempMetricJson);

  return ExternalMetricStatus(
    current: tempCurrent,
    metric: tempMetric,
  );
}