WorkItemServiceState.fromJson constructor

WorkItemServiceState.fromJson(
  1. Map _json
)

Implementation

WorkItemServiceState.fromJson(core.Map _json)
    : this(
        completeWorkStatus: _json.containsKey('completeWorkStatus')
            ? Status.fromJson(_json['completeWorkStatus']
                as core.Map<core.String, core.dynamic>)
            : null,
        harnessData: _json.containsKey('harnessData')
            ? _json['harnessData'] as core.Map<core.String, core.dynamic>
            : null,
        hotKeyDetection: _json.containsKey('hotKeyDetection')
            ? HotKeyDetection.fromJson(_json['hotKeyDetection']
                as core.Map<core.String, core.dynamic>)
            : null,
        leaseExpireTime: _json.containsKey('leaseExpireTime')
            ? _json['leaseExpireTime'] as core.String
            : null,
        metricShortId: _json.containsKey('metricShortId')
            ? (_json['metricShortId'] as core.List)
                .map((value) => MetricShortId.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        nextReportIndex: _json.containsKey('nextReportIndex')
            ? _json['nextReportIndex'] as core.String
            : null,
        reportStatusInterval: _json.containsKey('reportStatusInterval')
            ? _json['reportStatusInterval'] as core.String
            : null,
        splitRequest: _json.containsKey('splitRequest')
            ? ApproximateSplitRequest.fromJson(
                _json['splitRequest'] as core.Map<core.String, core.dynamic>)
            : null,
        suggestedStopPoint: _json.containsKey('suggestedStopPoint')
            ? ApproximateProgress.fromJson(_json['suggestedStopPoint']
                as core.Map<core.String, core.dynamic>)
            : null,
        suggestedStopPosition: _json.containsKey('suggestedStopPosition')
            ? Position.fromJson(_json['suggestedStopPosition']
                as core.Map<core.String, core.dynamic>)
            : null,
      );