PutItemOutput.fromJson constructor

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

Implementation

factory PutItemOutput.fromJson(Map<String, dynamic> json) {
  return PutItemOutput(
    attributes: (json['Attributes'] as Map<String, dynamic>?)?.map((k, e) =>
        MapEntry(k, AttributeValue.fromJson(e as Map<String, dynamic>))),
    consumedCapacity: json['ConsumedCapacity'] != null
        ? ConsumedCapacity.fromJson(
            json['ConsumedCapacity'] as Map<String, dynamic>)
        : null,
    itemCollectionMetrics: json['ItemCollectionMetrics'] != null
        ? ItemCollectionMetrics.fromJson(
            json['ItemCollectionMetrics'] as Map<String, dynamic>)
        : null,
  );
}