PartitionIndexDescriptor.fromJson constructor

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

Implementation

factory PartitionIndexDescriptor.fromJson(Map<String, dynamic> json) {
  return PartitionIndexDescriptor(
    indexName: json['IndexName'] as String,
    indexStatus: (json['IndexStatus'] as String).toPartitionIndexStatus(),
    keys: (json['Keys'] as List)
        .whereNotNull()
        .map((e) => KeySchemaElement.fromJson(e as Map<String, dynamic>))
        .toList(),
    backfillErrors: (json['BackfillErrors'] as List?)
        ?.whereNotNull()
        .map((e) => BackfillError.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}