ContainerResourceMetricStatus.fromJson constructor

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

Creates a ContainerResourceMetricStatus from JSON data.

Implementation

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

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

  return ContainerResourceMetricStatus(
    container: tempContainer,
    current: tempCurrent,
    name: tempName,
  );
}