ResourceMetricStatus.fromJson constructor

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

Creates a ResourceMetricStatus from JSON data.

Implementation

factory ResourceMetricStatus.fromJson(Map<String, dynamic> json) {
  final tempCurrentJson = json['current'];
  final tempNameJson = json['name'];

  final MetricValueStatus tempCurrent =
      MetricValueStatus.fromJson(tempCurrentJson);
  final String tempName = tempNameJson;

  return ResourceMetricStatus(
    current: tempCurrent,
    name: tempName,
  );
}