ListWorkerBlocksResponse.fromJson constructor

ListWorkerBlocksResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ListWorkerBlocksResponse.fromJson(Map<String, dynamic> json) {
  return ListWorkerBlocksResponse(
    nextToken: json['NextToken'] as String?,
    numResults: json['NumResults'] as int?,
    workerBlocks: (json['WorkerBlocks'] as List?)
        ?.whereNotNull()
        .map((e) => WorkerBlock.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}