SharePointConfiguration.fromJson constructor

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

Implementation

factory SharePointConfiguration.fromJson(Map<String, dynamic> json) {
  return SharePointConfiguration(
    secretArn: json['SecretArn'] as String,
    sharePointVersion:
        (json['SharePointVersion'] as String).toSharePointVersion(),
    urls: (json['Urls'] as List)
        .whereNotNull()
        .map((e) => e as String)
        .toList(),
    crawlAttachments: json['CrawlAttachments'] as bool?,
    disableLocalGroups: json['DisableLocalGroups'] as bool?,
    documentTitleFieldName: json['DocumentTitleFieldName'] as String?,
    exclusionPatterns: (json['ExclusionPatterns'] 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(),
    inclusionPatterns: (json['InclusionPatterns'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    useChangeLog: json['UseChangeLog'] as bool?,
    vpcConfiguration: json['VpcConfiguration'] != null
        ? DataSourceVpcConfiguration.fromJson(
            json['VpcConfiguration'] as Map<String, dynamic>)
        : null,
  );
}