Table.fromJson constructor

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

Implementation

factory Table.fromJson(Map<String, dynamic> json) {
  return Table(
    name: json['Name'] as String,
    catalogId: json['CatalogId'] as String?,
    createTime: timeStampFromJson(json['CreateTime']),
    createdBy: json['CreatedBy'] as String?,
    databaseName: json['DatabaseName'] as String?,
    description: json['Description'] as String?,
    isRegisteredWithLakeFormation:
        json['IsRegisteredWithLakeFormation'] as bool?,
    lastAccessTime: timeStampFromJson(json['LastAccessTime']),
    lastAnalyzedTime: timeStampFromJson(json['LastAnalyzedTime']),
    owner: json['Owner'] as String?,
    parameters: (json['Parameters'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    partitionKeys: (json['PartitionKeys'] as List?)
        ?.whereNotNull()
        .map((e) => Column.fromJson(e as Map<String, dynamic>))
        .toList(),
    retention: json['Retention'] as int?,
    storageDescriptor: json['StorageDescriptor'] != null
        ? StorageDescriptor.fromJson(
            json['StorageDescriptor'] as Map<String, dynamic>)
        : null,
    tableType: json['TableType'] as String?,
    targetTable: json['TargetTable'] != null
        ? TableIdentifier.fromJson(
            json['TargetTable'] as Map<String, dynamic>)
        : null,
    updateTime: timeStampFromJson(json['UpdateTime']),
    viewExpandedText: json['ViewExpandedText'] as String?,
    viewOriginalText: json['ViewOriginalText'] as String?,
  );
}