BatchWriteItemOutput.fromJson constructor

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

Implementation

factory BatchWriteItemOutput.fromJson(Map<String, dynamic> json) {
  return BatchWriteItemOutput(
    responses: (json['Responses'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, BatchWriteResponse.fromJson(e as Map<String, dynamic>))),
    unprocessedItems: (json['UnprocessedItems'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(
            k,
            (e as List)
                .whereNotNull()
                .map((e) => WriteRequest.fromJson(e as Map<String, dynamic>))
                .toList())),
  );
}