SalesforceKnowledgeArticleConfiguration.fromJson constructor

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

Implementation

factory SalesforceKnowledgeArticleConfiguration.fromJson(
    Map<String, dynamic> json) {
  return SalesforceKnowledgeArticleConfiguration(
    includedStates: (json['IncludedStates'] as List)
        .whereNotNull()
        .map((e) => (e as String).toSalesforceKnowledgeArticleState())
        .toList(),
    customKnowledgeArticleTypeConfigurations:
        (json['CustomKnowledgeArticleTypeConfigurations'] as List?)
            ?.whereNotNull()
            .map((e) =>
                SalesforceCustomKnowledgeArticleTypeConfiguration.fromJson(
                    e as Map<String, dynamic>))
            .toList(),
    standardKnowledgeArticleTypeConfiguration:
        json['StandardKnowledgeArticleTypeConfiguration'] != null
            ? SalesforceStandardKnowledgeArticleTypeConfiguration.fromJson(
                json['StandardKnowledgeArticleTypeConfiguration']
                    as Map<String, dynamic>)
            : null,
  );
}