WorkerHealthReport.fromJson constructor

WorkerHealthReport.fromJson(
  1. Map _json
)

Implementation

WorkerHealthReport.fromJson(core.Map _json)
    : this(
        msg: _json.containsKey('msg') ? _json['msg'] as core.String : null,
        pods: _json.containsKey('pods')
            ? (_json['pods'] as core.List)
                .map((value) => value as core.Map<core.String, core.dynamic>)
                .toList()
            : null,
        reportInterval: _json.containsKey('reportInterval')
            ? _json['reportInterval'] as core.String
            : null,
        vmBrokenCode: _json.containsKey('vmBrokenCode')
            ? _json['vmBrokenCode'] as core.String
            : null,
        vmIsBroken: _json.containsKey('vmIsBroken')
            ? _json['vmIsBroken'] as core.bool
            : null,
        vmIsHealthy: _json.containsKey('vmIsHealthy')
            ? _json['vmIsHealthy'] as core.bool
            : null,
        vmStartupTime: _json.containsKey('vmStartupTime')
            ? _json['vmStartupTime'] as core.String
            : null,
      );