LeaseWorkItemResponse.fromJson constructor

LeaseWorkItemResponse.fromJson(
  1. Map _json
)

Implementation

LeaseWorkItemResponse.fromJson(core.Map _json)
    : this(
        unifiedWorkerResponse: _json.containsKey('unifiedWorkerResponse')
            ? (_json['unifiedWorkerResponse']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.Object,
                ),
              )
            : null,
        workItems: _json.containsKey('workItems')
            ? (_json['workItems'] as core.List)
                .map<WorkItem>((value) => WorkItem.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );