LeaseWorkItemRequest.fromJson constructor

LeaseWorkItemRequest.fromJson(
  1. Map _json
)

Implementation

LeaseWorkItemRequest.fromJson(core.Map _json)
    : this(
        currentWorkerTime: _json.containsKey('currentWorkerTime')
            ? _json['currentWorkerTime'] as core.String
            : null,
        location: _json.containsKey('location')
            ? _json['location'] as core.String
            : null,
        requestedLeaseDuration: _json.containsKey('requestedLeaseDuration')
            ? _json['requestedLeaseDuration'] as core.String
            : null,
        unifiedWorkerRequest: _json.containsKey('unifiedWorkerRequest')
            ? _json['unifiedWorkerRequest']
                as core.Map<core.String, core.dynamic>
            : null,
        workItemTypes: _json.containsKey('workItemTypes')
            ? (_json['workItemTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        workerCapabilities: _json.containsKey('workerCapabilities')
            ? (_json['workerCapabilities'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        workerId: _json.containsKey('workerId')
            ? _json['workerId'] as core.String
            : null,
      );