Crawler.fromJson constructor

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

Implementation

factory Crawler.fromJson(Map<String, dynamic> json) {
  return Crawler(
    classifiers: (json['Classifiers'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    configuration: json['Configuration'] as String?,
    crawlElapsedTime: json['CrawlElapsedTime'] as int?,
    crawlerSecurityConfiguration:
        json['CrawlerSecurityConfiguration'] as String?,
    creationTime: timeStampFromJson(json['CreationTime']),
    databaseName: json['DatabaseName'] as String?,
    description: json['Description'] as String?,
    lastCrawl: json['LastCrawl'] != null
        ? LastCrawlInfo.fromJson(json['LastCrawl'] as Map<String, dynamic>)
        : null,
    lastUpdated: timeStampFromJson(json['LastUpdated']),
    lineageConfiguration: json['LineageConfiguration'] != null
        ? LineageConfiguration.fromJson(
            json['LineageConfiguration'] as Map<String, dynamic>)
        : null,
    name: json['Name'] as String?,
    recrawlPolicy: json['RecrawlPolicy'] != null
        ? RecrawlPolicy.fromJson(
            json['RecrawlPolicy'] as Map<String, dynamic>)
        : null,
    role: json['Role'] as String?,
    schedule: json['Schedule'] != null
        ? Schedule.fromJson(json['Schedule'] as Map<String, dynamic>)
        : null,
    schemaChangePolicy: json['SchemaChangePolicy'] != null
        ? SchemaChangePolicy.fromJson(
            json['SchemaChangePolicy'] as Map<String, dynamic>)
        : null,
    state: (json['State'] as String?)?.toCrawlerState(),
    tablePrefix: json['TablePrefix'] as String?,
    targets: json['Targets'] != null
        ? CrawlerTargets.fromJson(json['Targets'] as Map<String, dynamic>)
        : null,
    version: json['Version'] as int?,
  );
}