ServiceNowKnowledgeArticleConfiguration.fromJson constructor

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

Implementation

factory ServiceNowKnowledgeArticleConfiguration.fromJson(
    Map<String, dynamic> json) {
  return ServiceNowKnowledgeArticleConfiguration(
    documentDataFieldName: json['DocumentDataFieldName'] as String,
    crawlAttachments: json['CrawlAttachments'] as bool?,
    documentTitleFieldName: json['DocumentTitleFieldName'] as String?,
    excludeAttachmentFilePatterns:
        (json['ExcludeAttachmentFilePatterns'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
    fieldMappings: (json['FieldMappings'] as List?)
        ?.whereNotNull()
        .map((e) =>
            DataSourceToIndexFieldMapping.fromJson(e as Map<String, dynamic>))
        .toList(),
    includeAttachmentFilePatterns:
        (json['IncludeAttachmentFilePatterns'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
  );
}