SalesforceConfiguration.fromJson constructor

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

Implementation

factory SalesforceConfiguration.fromJson(Map<String, dynamic> json) {
  return SalesforceConfiguration(
    secretArn: json['SecretArn'] as String,
    serverUrl: json['ServerUrl'] as String,
    chatterFeedConfiguration: json['ChatterFeedConfiguration'] != null
        ? SalesforceChatterFeedConfiguration.fromJson(
            json['ChatterFeedConfiguration'] as Map<String, dynamic>)
        : null,
    crawlAttachments: json['CrawlAttachments'] as bool?,
    excludeAttachmentFilePatterns:
        (json['ExcludeAttachmentFilePatterns'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
    includeAttachmentFilePatterns:
        (json['IncludeAttachmentFilePatterns'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
    knowledgeArticleConfiguration:
        json['KnowledgeArticleConfiguration'] != null
            ? SalesforceKnowledgeArticleConfiguration.fromJson(
                json['KnowledgeArticleConfiguration'] as Map<String, dynamic>)
            : null,
    standardObjectAttachmentConfiguration:
        json['StandardObjectAttachmentConfiguration'] != null
            ? SalesforceStandardObjectAttachmentConfiguration.fromJson(
                json['StandardObjectAttachmentConfiguration']
                    as Map<String, dynamic>)
            : null,
    standardObjectConfigurations:
        (json['StandardObjectConfigurations'] as List?)
            ?.whereNotNull()
            .map((e) => SalesforceStandardObjectConfiguration.fromJson(
                e as Map<String, dynamic>))
            .toList(),
  );
}