DiscoverInputSchemaResponse.fromJson constructor

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

Implementation

factory DiscoverInputSchemaResponse.fromJson(Map<String, dynamic> json) {
  return DiscoverInputSchemaResponse(
    inputSchema: json['InputSchema'] != null
        ? SourceSchema.fromJson(json['InputSchema'] as Map<String, dynamic>)
        : null,
    parsedInputRecords: (json['ParsedInputRecords'] as List?)
        ?.whereNotNull()
        .map((e) =>
            (e as List).whereNotNull().map((e) => e as String).toList())
        .toList(),
    processedInputRecords: (json['ProcessedInputRecords'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    rawInputRecords: (json['RawInputRecords'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}