ResourceUtilizationReport.fromJson constructor

ResourceUtilizationReport.fromJson(
  1. Map _json
)

Implementation

ResourceUtilizationReport.fromJson(core.Map _json)
    : this(
        containers: _json.containsKey('containers')
            ? (_json['containers'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  ResourceUtilizationReport.fromJson(
                      item as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        cpuTime: _json.containsKey('cpuTime')
            ? (_json['cpuTime'] as core.List)
                .map<CPUTime>((value) => CPUTime.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        memoryInfo: _json.containsKey('memoryInfo')
            ? (_json['memoryInfo'] as core.List)
                .map<MemInfo>((value) => MemInfo.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );