PodsMetricStatus.fromJson constructor

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

Creates a PodsMetricStatus from JSON data.

Implementation

factory PodsMetricStatus.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 PodsMetricStatus(
    current: tempCurrent,
    metric: tempMetric,
  );
}