BatchGetItemOutput.fromJson constructor

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

Implementation

factory BatchGetItemOutput.fromJson(Map<String, dynamic> json) {
  return BatchGetItemOutput(
    consumedCapacity: (json['ConsumedCapacity'] as List?)
        ?.whereNotNull()
        .map((e) => ConsumedCapacity.fromJson(e as Map<String, dynamic>))
        .toList(),
    responses: (json['Responses'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(
            k,
            (e as List)
                .whereNotNull()
                .map((e) => (e as Map<String, dynamic>).map((k, e) =>
                    MapEntry(k,
                        AttributeValue.fromJson(e as Map<String, dynamic>))))
                .toList())),
    unprocessedKeys: (json['UnprocessedKeys'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(
            k, KeysAndAttributes.fromJson(e as Map<String, dynamic>))),
  );
}