ServiceNowServiceCatalogConfiguration.fromJson constructor

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

Implementation

factory ServiceNowServiceCatalogConfiguration.fromJson(
    Map<String, dynamic> json) {
  return ServiceNowServiceCatalogConfiguration(
    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(),
  );
}