ObjectMetricStatus.fromJson constructor

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

Creates a ObjectMetricStatus from JSON data.

Implementation

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

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

  return ObjectMetricStatus(
    current: tempCurrent,
    describedObject: tempDescribedObject,
    metric: tempMetric,
  );
}