TableDescription.fromJson constructor

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

Implementation

factory TableDescription.fromJson(Map<String, dynamic> json) {
  return TableDescription(
    archivalSummary: json['ArchivalSummary'] != null
        ? ArchivalSummary.fromJson(
            json['ArchivalSummary'] as Map<String, dynamic>)
        : null,
    attributeDefinitions: (json['AttributeDefinitions'] as List?)
        ?.whereNotNull()
        .map((e) => AttributeDefinition.fromJson(e as Map<String, dynamic>))
        .toList(),
    billingModeSummary: json['BillingModeSummary'] != null
        ? BillingModeSummary.fromJson(
            json['BillingModeSummary'] as Map<String, dynamic>)
        : null,
    creationDateTime: timeStampFromJson(json['CreationDateTime']),
    globalSecondaryIndexes: (json['GlobalSecondaryIndexes'] as List?)
        ?.whereNotNull()
        .map((e) => GlobalSecondaryIndexDescription.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    globalTableVersion: json['GlobalTableVersion'] as String?,
    itemCount: json['ItemCount'] as int?,
    keySchema: (json['KeySchema'] as List?)
        ?.whereNotNull()
        .map((e) => KeySchemaElement.fromJson(e as Map<String, dynamic>))
        .toList(),
    latestStreamArn: json['LatestStreamArn'] as String?,
    latestStreamLabel: json['LatestStreamLabel'] as String?,
    localSecondaryIndexes: (json['LocalSecondaryIndexes'] as List?)
        ?.whereNotNull()
        .map((e) => LocalSecondaryIndexDescription.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    provisionedThroughput: json['ProvisionedThroughput'] != null
        ? ProvisionedThroughputDescription.fromJson(
            json['ProvisionedThroughput'] as Map<String, dynamic>)
        : null,
    replicas: (json['Replicas'] as List?)
        ?.whereNotNull()
        .map((e) => ReplicaDescription.fromJson(e as Map<String, dynamic>))
        .toList(),
    restoreSummary: json['RestoreSummary'] != null
        ? RestoreSummary.fromJson(
            json['RestoreSummary'] as Map<String, dynamic>)
        : null,
    sSEDescription: json['SSEDescription'] != null
        ? SSEDescription.fromJson(
            json['SSEDescription'] as Map<String, dynamic>)
        : null,
    streamSpecification: json['StreamSpecification'] != null
        ? StreamSpecification.fromJson(
            json['StreamSpecification'] as Map<String, dynamic>)
        : null,
    tableArn: json['TableArn'] as String?,
    tableId: json['TableId'] as String?,
    tableName: json['TableName'] as String?,
    tableSizeBytes: json['TableSizeBytes'] as int?,
    tableStatus: (json['TableStatus'] as String?)?.toTableStatus(),
  );
}