WorkerMessage.fromJson constructor
WorkerMessage.fromJson(
- Map _json
Implementation
WorkerMessage.fromJson(core.Map _json)
: this(
labels: _json.containsKey('labels')
? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
key,
item as core.String,
),
)
: null,
time: _json.containsKey('time') ? _json['time'] as core.String : null,
workerHealthReport: _json.containsKey('workerHealthReport')
? WorkerHealthReport.fromJson(_json['workerHealthReport']
as core.Map<core.String, core.dynamic>)
: null,
workerLifecycleEvent: _json.containsKey('workerLifecycleEvent')
? WorkerLifecycleEvent.fromJson(_json['workerLifecycleEvent']
as core.Map<core.String, core.dynamic>)
: null,
workerMessageCode: _json.containsKey('workerMessageCode')
? WorkerMessageCode.fromJson(_json['workerMessageCode']
as core.Map<core.String, core.dynamic>)
: null,
workerMetrics: _json.containsKey('workerMetrics')
? ResourceUtilizationReport.fromJson(
_json['workerMetrics'] as core.Map<core.String, core.dynamic>)
: null,
workerShutdownNotice: _json.containsKey('workerShutdownNotice')
? WorkerShutdownNotice.fromJson(_json['workerShutdownNotice']
as core.Map<core.String, core.dynamic>)
: null,
);