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,
      );