GoogleDriveConfiguration.fromJson constructor

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

Implementation

factory GoogleDriveConfiguration.fromJson(Map<String, dynamic> json) {
  return GoogleDriveConfiguration(
    secretArn: json['SecretArn'] as String,
    excludeMimeTypes: (json['ExcludeMimeTypes'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    excludeSharedDrives: (json['ExcludeSharedDrives'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    excludeUserAccounts: (json['ExcludeUserAccounts'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    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(),
  );
}